1 # Maintainer: Christian Rebischke <chris.rebischke@archlinux.org>
7 pkgdesc="Controller for the GitOps Kubernetes operator flux"
9 url="https://github.com/fluxcd/flux"
11 makedepends=('go' 'git')
13 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/fluxcd/flux/archive/${pkgver}.tar.gz")
14 sha512sums=('5050d8b035f804b9c1c767664b761f3ee739f7b4160624c60627cc1eec6eb9b552c5779da7910410927425de8d1ff5abf01f476e5fa0cb9aebb7d916ae8f57d5')
15 b2sums=('1ec352b6e6f328208abaead491674db0adc43286d7c58ef2ab5f1030d58efa272b4c41ea08411e5d9765bedb87b79c484561f495489af8ce954057eb2df150c9')
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" .
30 cd "${_pkgname}-${pkgver}/cmd/fluxctl"
35 cd "${_pkgname}-${pkgver}/cmd/fluxctl"
36 install -Dsm755 ./fluxctl "${pkgdir}/usr/bin/fluxctl"