|
|
@ -13,31 +13,38 @@ conflicts=("flux-bin")
|
|
|
|
replaces=("flux-cli")
|
|
|
|
replaces=("flux-cli")
|
|
|
|
depends=("glibc")
|
|
|
|
depends=("glibc")
|
|
|
|
makedepends=("go")
|
|
|
|
makedepends=("go")
|
|
|
|
optdepends=("kubectl")
|
|
|
|
optdepends=('kubectl: for apply actions on the Kubernetes cluster',
|
|
|
|
|
|
|
|
'bash-completion: auto-completion for flux in Bash',
|
|
|
|
|
|
|
|
'zsh-completions: auto-completion for flux in ZSH')
|
|
|
|
source=(
|
|
|
|
source=(
|
|
|
|
"$pkgname-$pkgver.tar.gz::https://github.com/fluxcd/flux2/archive/v$pkgver.tar.gz"
|
|
|
|
"${pkgname}-${pkgver}.tar.gz::https://github.com/fluxcd/flux2/archive/v${pkgver}.tar.gz"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
sha256sums=(
|
|
|
|
sha256sums=(
|
|
|
|
${SHA256SUM}
|
|
|
|
${SHA256SUM}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
_srcname=flux
|
|
|
|
|
|
|
|
|
|
|
|
build() {
|
|
|
|
build() {
|
|
|
|
cd "flux2-$pkgver"
|
|
|
|
cd "flux2-${pkgver}"
|
|
|
|
export CGO_LDFLAGS="$LDFLAGS"
|
|
|
|
export CGO_LDFLAGS="$LDFLAGS"
|
|
|
|
export CGO_CFLAGS="$CFLAGS"
|
|
|
|
export CGO_CFLAGS="$CFLAGS"
|
|
|
|
export CGO_CXXFLAGS="$CXXFLAGS"
|
|
|
|
export CGO_CXXFLAGS="$CXXFLAGS"
|
|
|
|
export CGO_CPPFLAGS="$CPPFLAGS"
|
|
|
|
export CGO_CPPFLAGS="$CPPFLAGS"
|
|
|
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
|
|
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
|
|
|
go build -ldflags "-X main.VERSION=$pkgver" -o flux-bin ./cmd/flux
|
|
|
|
go build -ldflags "-X main.VERSION=${pkgver}" -o ${_srcname} ./cmd/flux
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
check() {
|
|
|
|
check() {
|
|
|
|
cd "flux2-$pkgver"
|
|
|
|
cd "flux2-${pkgver}"
|
|
|
|
make test
|
|
|
|
make test
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
package() {
|
|
|
|
package() {
|
|
|
|
cd "flux2-$pkgver"
|
|
|
|
cd "flux2-${pkgver}"
|
|
|
|
install -Dm755 flux-bin "$pkgdir/usr/bin/flux"
|
|
|
|
install -Dm755 ${_srcname} "${pkgdir}/usr/bin/${_srcname}"
|
|
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
|
|
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"${pkgdir}/usr/bin/${_srcname}" completion bash | install -Dm644 /dev/stdin "${pkgdir}/usr/share/bash-completion/completions/${_srcname}"
|
|
|
|
|
|
|
|
"${pkgdir}/usr/bin/${_srcname}" completion fish | install -Dm644 /dev/stdin "${pkgdir}/usr/share/fish/vendor_completions.d/${_srcname}.fish"
|
|
|
|
|
|
|
|
"${pkgdir}/usr/bin/${_srcname}" completion zsh | install -Dm644 /dev/stdin "${pkgdir}/usr/share/zsh/site-functions/_${_srcname}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|