summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3c183231699714bed547c9327d6535ed083259e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Maintainer: Adrian Goll <goll at riseup dot net>
# Contributor: Lukas Grossar <lukas.grossar@gmail.com>
# Contributor: Ivan Shapovalov <intelfx@intelfx.name>

pkgname=kubernetes-helm3
pkgver=3.1.0
pkgrel=1
pkgdesc="A tool to manage Kubernetes charts"
arch=('i686' 'x86_64' 'arm' 'aarch64')
url="https://github.com/helm/helm"
makedepends=('git' 'glide' 'go')
depends=('socat')
optdepends=(
  'kubectl: check cluster status'
  'kubectl-bin: check cluster status - binary package'
)
conflicts=('kubernetes-helm-bin')
license=('Apache')
source=("git+https://github.com/helm/helm#tag=v${pkgver}")
md5sums=('SKIP')

prepare() {
  mkdir -p "$srcdir/src/helm.sh"
  mv -T "$srcdir/helm" "$srcdir/src/helm.sh/helm"
}

build() {
  export GOPATH="$srcdir"
  cd "$GOPATH/src/helm.sh/helm"
  make
}

package() {
  install -Dm755 "$srcdir/src/helm.sh/helm/bin/helm" "$pkgdir/usr/bin/helm3"

  "$pkgdir/usr/bin/helm3" completion bash | install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/helm3"
  "$pkgdir/usr/bin/helm3" completion zsh | install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_helm3"
}