parent
cb091d0331
commit
c4a0b5a1b2
|
@ -1,54 +1,28 @@
|
|||
# Template file for 'kubernetes-helm'
|
||||
pkgname=kubernetes-helm
|
||||
version=3.12.0
|
||||
version=3.15.1
|
||||
revision=1
|
||||
hostmakedepends="go make mercurial tar"
|
||||
build_style=go
|
||||
build_helper=qemu
|
||||
go_import_path="helm.sh/helm/v3"
|
||||
go_package="./cmd/helm"
|
||||
go_mod_mode=off
|
||||
go_ldflags="-X helm.sh/helm/v3/internal/version.version=v${version}"
|
||||
short_desc="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=320076ba47bfdf31f753e92fe8464a1314600ff365acce3b361e067488364b33
|
||||
changelog="https://github.com/helm/helm/releases"
|
||||
distfiles="https://github.com/helm/helm/archive/refs/tags/v${version}.tar.gz"
|
||||
checksum=3c5380a50e12f80fd5c7c269d5c1956f31933aed740e3ecf0ab12bc853e0cf28
|
||||
conflicts="helm"
|
||||
nopie=true
|
||||
nopie=yes
|
||||
|
||||
_convert_arch() {
|
||||
case "$1" in
|
||||
aarch64*) echo arm64;;
|
||||
armv6*) echo arm;;
|
||||
armv7*) echo arm;;
|
||||
i686*) echo 386;;
|
||||
x86_64*) echo amd64;;
|
||||
ppc64le*) echo ppc64le;;
|
||||
esac
|
||||
}
|
||||
|
||||
export _go_target_arch=$(_convert_arch $XBPS_TARGET_MACHINE)
|
||||
export _go_host_arch=$(_convert_arch $XBPS_MACHINE)
|
||||
|
||||
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-${version}
|
||||
}
|
||||
|
||||
do_build() {
|
||||
cd golib/src/k8s.io/helm
|
||||
make build-cross TARGETS="linux/${_go_target_arch} linux/${_go_host_arch}" APP="..." LDFLAGS="-X helm.sh/helm/v3/internal/version.version=v${version} -X helm.sh/helm/v3/internal/version.metadata="
|
||||
|
||||
_dist/linux-${_go_host_arch}/helm completion bash > completion.bash
|
||||
_dist/linux-${_go_host_arch}/helm completion zsh > completion.zsh
|
||||
}
|
||||
|
||||
do_install() {
|
||||
cd golib/src/k8s.io/helm
|
||||
|
||||
# Copy helm binary
|
||||
vbin _dist/linux-${_go_target_arch}/helm
|
||||
|
||||
# Copy completion files
|
||||
vinstall completion.bash 644 usr/share/bash-completion/completions helm
|
||||
vinstall completion.zsh 644 usr/share/$pkgname
|
||||
LDFLAGS="-fuse-ld=bfd"
|
||||
|
||||
post_install() {
|
||||
for shell in bash zsh; do
|
||||
vtargetrun "${DESTDIR}/usr/bin/helm" completion "${shell}" > "helm.${shell}"
|
||||
vcompletion "helm.${shell}" "${shell}"
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue