void-packages/srcpkgs/kubernetes-helm/template

49 lines
1.5 KiB
Bash

pkgname=kubernetes-helm
version=2.9.1
revision=1
hostmakedepends="go make git mercurial"
short_desc="The Kubernetes Package Manager"
maintainer="Kyle Nusbaum <knusbaum+void@sdf.org>"
license="Apache-2.0"
homepage="https://helm.sh/"
distfiles="https://github.com/helm/helm/archive/v${version}.tar.gz"
checksum=2fee31764117024d1cc4f597d23791c60feef7c3ceedd143cfdbbafca7a7e126
nopie=true
conflicts="helm"
wrksrc="helm-${version}"
_go_target_arch=$(source /void-packages/common/environment/build-style/go.sh; echo $GOARCH)
do_extract() {
mkdir -p golib/src/k8s.io/helm
tar -xvzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/v${version}.tar.gz \
-C golib/src/k8s.io/helm \
--strip-components 1 \
helm-2.9.1
}
pre_build() {
export GOPATH="$(pwd)/golib"
## The current version of glide in the repository has
## a bug that prevents building, so pull the current
## version from git.
CC=/bin/gcc go get github.com/Masterminds/glide
CC=/bin/gcc go get github.com/mitchellh/gox
CC=/bin/gcc go install github.com/Masterminds/glide
CC=/bin/gcc go install github.com/mitchellh/gox
PATH="$PATH:$(pwd)/golib/bin/"
export PATH
}
do_build() {
cd golib/src/k8s.io/helm
TARGETS="linux/${_go_target_arch}" make bootstrap build-cross APP="..."
}
do_install() {
vbin golib/src/k8s.io/helm/_dist/linux-${_go_target_arch}/helm
vbin golib/src/k8s.io/helm/_dist/linux-${_go_target_arch}/rudder
vbin golib/src/k8s.io/helm/_dist/linux-${_go_target_arch}/tiller
vlicense golib/src/k8s.io/helm/LICENSE
}