diff --git a/srcpkgs/argocd/template b/srcpkgs/argocd/template new file mode 100644 index 00000000000000..d0e3ac7c45c879 --- /dev/null +++ b/srcpkgs/argocd/template @@ -0,0 +1,40 @@ +# Template file for 'argocd' +pkgname=argocd +version=3.4.3 +revision=1 +archs="x86_64* aarch64*" +build_style=go +go_import_path="github.com/argoproj/argo-cd/v3" +go_package="${go_import_path}/cmd" +go_ldflags="-X ${go_import_path}/common.version=${version} + -X ${go_import_path}/common.buildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ) + -X ${go_import_path}/common.gitCommit=void-linux-${revision} + -compressdwarf=false + -linkmode=external" +short_desc="Declarative continuous deployment for Kubernetes" +maintainer="Aaron Duxler " +license="Apache-2.0" +homepage="https://argoproj.github.io/cd/" +distfiles="https://github.com/argoproj/argo-cd/archive/v${version}.tar.gz" +checksum=4c14774e6107ab128546df8d891259ccd15ce738611b4a797e61d041ab2a2f29 + +export GOFLAGS="-buildmode=pie" + +do_check() { + go test -p "$XBPS_MAKEJOBS" ./cmd/... +} + +post_build() { + for shell in bash fish zsh; do + CGO_ENABLED=0 GOARCH="" go run cmd/main.go completion "$shell" \ + >"completion.$shell" + done +} + +post_install() { + for shell in bash fish zsh; do + vcompletion "completion.$shell" "$shell" + done + + mv ${DESTDIR}/usr/bin/cmd ${DESTDIR}/usr/bin/argocd +}