# Contributor: Michał Polański # Maintainer: Michał Polański pkgname=kustomize pkgver=5.1.1 pkgrel=1 pkgdesc="Template-free customization of Kubernetes YAML manifests" url="https://kustomize.io/" license="Apache-2.0" arch="all" makedepends="go" subpackages=" $pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion " source="https://github.com/kubernetes-sigs/kustomize/archive/kustomize/v$pkgver/kustomize-$pkgver.tar.gz" builddir="$srcdir/kustomize-kustomize-v$pkgver/kustomize" export CGO_ENABLED=0 export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { local builddate="$(date -u "+%Y-%m-%dT%TZ" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})" go build -ldflags=" -X sigs.k8s.io/kustomize/api/provenance.version=$pkgver -X sigs.k8s.io/kustomize/api/provenance.buildDate=$builddate " ./kustomize completion bash > $pkgname.bash ./kustomize completion fish > $pkgname.fish ./kustomize completion zsh > $pkgname.zsh } check() { go test ./... } package() { install -Dm755 kustomize -t "$pkgdir"/usr/bin/ install -Dm644 $pkgname.bash "$pkgdir"/usr/share/bash-completion/completions/$pkgname install -Dm644 $pkgname.fish "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish install -Dm644 $pkgname.zsh "$pkgdir"/usr/share/zsh/site-functions/_$pkgname } sha512sums=" 26a19c8d5c5ed03697713e424f6c8e91c9b03af99e13eb68b4a5ac821002d6f657d691eb461a4826d150767a3f92d6e19abef8c9ed41f5a163acff896c61c50f kustomize-5.1.1.tar.gz "