From 8fed66513c2dc05b185ad73111dd65dd8e9afa56 Mon Sep 17 00:00:00 2001 From: Martin Chlumsky Date: Sun, 23 Jul 2023 22:14:41 -0400 Subject: [PATCH] New package: flux-2.0.1 --- srcpkgs/flux/template | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 srcpkgs/flux/template diff --git a/srcpkgs/flux/template b/srcpkgs/flux/template new file mode 100644 index 000000000000..bed37e17ce6a --- /dev/null +++ b/srcpkgs/flux/template @@ -0,0 +1,37 @@ +# Template file for 'flux' +pkgname=flux +version=2.0.1 +revision=1 +build_style=go +build_helper="qemu" +go_import_path=github.com/fluxcd/flux2/v2 +go_ldflags="-X main.VERSION=${version}" +go_package="${go_import_path}/cmd/flux" +hostmakedepends="tar" +short_desc="Open and extensible continuous delivery solution for Kubernetes" +maintainer="Martin Chlumsky " +license="Apache-2.0" +homepage="https://fluxcd.io" +distfiles="https://github.com/fluxcd/flux2/archive/refs/tags/v${version}.tar.gz https://github.com/fluxcd/flux2/releases/download/v${version}/manifests.tar.gz" +checksum="b4c57d94d81eea40ea7180e814d2e6984b8787d296a21b1b662397a9a23d5407 5df034f909448c4d73017d881c25badbe9d8092be51e2a76553417de94234de2" +skip_extraction="manifests.tar.gz" + +# fix: collect2: fatal error: cannot find 'ld' +export LDFLAGS="-fuse-ld=bfd" + +pre_build() { + # In the github flux repository, manifests are generated through a shell script that calls kustomize which is not + # available in Void linux. As a workaround, we use the manifests from the github releases instead. + # https://github.com/fluxcd/flux2/blob/44d69d6fc0c353e79c1bad021a4aca135033bce8/manifests/scripts/bundle.sh#L37 + mkdir cmd/flux/manifests + tar xv -f /host/sources/flux-${version}/manifests.tar.gz -C cmd/flux/manifests/ +} + +post_install() { + flux=$(find $GOPATH/bin -name flux) + + for shell in bash fish zsh; do + vtargetrun ${flux} completion ${shell} > completion.${shell} + vcompletion completion.${shell} ${shell} + done +}