aports/testing/flux/APKBUILD
2023-10-12 06:27:02 +02:00

60 lines
1.5 KiB
Plaintext

# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=flux
pkgver=2.1.1
pkgrel=1
pkgdesc="Open and extensible continuous delivery solution for Kubernetes"
url="https://fluxcd.io/"
arch="all"
license="Apache-2.0"
makedepends="go bash kustomize"
subpackages="
$pkgname-bash-completion
$pkgname-fish-completion
$pkgname-zsh-completion
"
source="https://github.com/fluxcd/flux2/archive/v$pkgver/flux-$pkgver.tar.gz"
builddir="$srcdir/flux2-$pkgver"
export CGO_ENABLED=0
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
# secfixes:
# 0.36.0-r0:
# - CVE-2022-39272
build() {
bash ./manifests/scripts/bundle.sh
go build -v \
-ldflags "-X main.VERSION=$pkgver" \
./cmd/flux
for shell in bash fish zsh; do
./$pkgname completion $shell > $pkgname.$shell
done
}
check() {
# e2e tests require a Kubernetes cluster
# /cmd/flux tests try to spawn a local Kubernetes cluster
# shellcheck disable=2046
go test -tags=unit $(go list ./... | grep -v /cmd/flux)
}
package() {
install -Dm755 $pkgname -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="
463b1eb7c6f97bd91521b20269baa3c7b36eda42f68c25c10a376a6cc0cf8e73b371cf515a8e7f59029aacfc59f518367e28b9f474f91298add32357121b1085 flux-2.1.1.tar.gz
"