upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / fluxctl / trunk / PKGBUILD
blob06ff0db170a4a95a3a5eeccd59244ddfdca5a6e1
1 # Maintainer: Christian Rebischke <chris.rebischke@archlinux.org>
3 pkgname=fluxctl
4 _pkgname=flux
5 pkgver=1.25.4
6 pkgrel=1
7 pkgdesc="Controller for the GitOps Kubernetes operator flux"
8 arch=('x86_64')
9 url="https://github.com/fluxcd/flux"
10 license=('Apache')
11 makedepends=('go' 'git')
12 depends=('glibc')
13 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/fluxcd/flux/archive/${pkgver}.tar.gz")
14 sha512sums=('5050d8b035f804b9c1c767664b761f3ee739f7b4160624c60627cc1eec6eb9b552c5779da7910410927425de8d1ff5abf01f476e5fa0cb9aebb7d916ae8f57d5')
15 b2sums=('1ec352b6e6f328208abaead491674db0adc43286d7c58ef2ab5f1030d58efa272b4c41ea08411e5d9765bedb87b79c484561f495489af8ce954057eb2df150c9')
16 options=("!lto")
18 build() {
19   cd "${_pkgname}-${pkgver}/cmd/fluxctl"
20   export CGO_CPPFLAGS="${CPPFLAGS}"
21   export CGO_CFLAGS="${CFLAGS}"
22   export CGO_CXXFLAGS="${CXXFLAGS}"
23   export CGO_LDFLAGS="${LDFLAGS}"
24   export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
25   go build -ldflags "-w -X main.version="${pkgver}" -linkmode=external" .
26   chmod +x ./fluxctl
29 check() {
30   cd "${_pkgname}-${pkgver}/cmd/fluxctl"
31   go test ./...
34 package() {
35   cd "${_pkgname}-${pkgver}/cmd/fluxctl"
36   install -Dsm755 ./fluxctl "${pkgdir}/usr/bin/fluxctl"