# Template file for 'kubernetes-helm'
pkgname=kubernetes-helm
version=4.2.4
revision=1
_major_version=${version%%.*}
build_style=go
build_helper=qemu
go_import_path="helm.sh/helm/v${_major_version}"
go_package="./cmd/helm"
go_mod_mode=off
go_ldflags="-X helm.sh/helm/v${_major_version}/internal/version.version=v${version%.*}"
make_check_args="-skip=^TestInstallRelease_Wait$"
checkdepends="git"
short_desc="Kubernetes Package Manager"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://helm.sh/"
changelog="https://github.com/helm/helm/releases"
distfiles="https://github.com/helm/helm/archive/refs/tags/v${version}.tar.gz"
checksum=f1a1aa56fff071cfa1eecc18c6a7212b2e5c7a0a123fd8e4dcae620bd51b4286
conflicts="helm"
nopie=yes

LDFLAGS="-fuse-ld=bfd"

# Skip WASM plugin tests on i686
if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
	make_check_args="-skip TestRuntimeExtismV1InvokePlugin"
fi

post_install() {
	for shell in bash zsh; do
		vtargetrun "${DESTDIR}/usr/bin/helm" completion "${shell}" > "helm.${shell}"
		vcompletion "helm.${shell}" "${shell}"
	done
}
