void-packages/srcpkgs/kubernetes-helm/template

50 lines
1.5 KiB
Bash
Raw Normal View History

2018-08-04 05:24:54 +02:00
# Template file for 'kubernetes-helm'
2018-07-24 06:11:41 +02:00
pkgname=kubernetes-helm
2018-08-18 00:23:39 +02:00
version=2.10.0
2018-07-24 06:11:41 +02:00
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"
2018-08-18 00:23:39 +02:00
checksum=544511a814a0aefc4f74e196d96bea7930d83df059551d0b57c28439f6df4137
2018-07-24 06:11:41 +02:00
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 \
2018-08-18 00:23:39 +02:00
helm-${version}
2018-07-24 06:11:41 +02:00
}
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
}