1 # Maintainer: Christian Rebischke <chris.rebischke@archlinux.org>
4 pkgname=("spire-agent" "spire-server")
7 pkgdesc="SPIFFE Runtime Environment"
8 url='https://github.com/spiffe/spire'
13 source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/spiffe/spire/archive/v${pkgver}.tar.gz")
14 sha512sums=('68140c66fd2410a299b637f6fbac1573756c505baa9bad6f685f5a729fbfdd0efc18db4c1e9569c3d6cff36a4bd60337301543c7c76b76e89511df8e0db74e3c')
15 b2sums=('514cefd45718479f68a429517bd347856437ab5419041ca5fa53eac579d1e42faa01847866cf36968ddaf753048bef5e8939ceb3a9f0032fcc83fe917f0c2012')
18 cd "${pkgbase}-${pkgver}"
19 export CGO_CPPFLAGS="${CPPFLAGS}"
20 export CGO_CFLAGS="${CFLAGS}"
21 export CGO_CXXFLAGS="${CXXFLAGS}"
22 export CGO_LDFLAGS="${LDFLAGS}"
23 export GOFLAGS="-buildmode=pie -ldflags=-linkmode=external -trimpath -mod=readonly -modcacherw"
25 go build -o spire-agent .
26 cd ../../cmd/spire-server
27 go build -o spire-server .
31 cd "${pkgbase}-${pkgver}"
32 # test is blocking for some reason..
36 package_spire-agent() {
37 pkgdesc="SPIFFE runtime environment (agent)"
38 provides=("spire-agent")
40 cd "${pkgbase}-${pkgver}"
41 install -Dsm755 cmd/spire-agent/spire-agent "${pkgdir}/usr/bin/spire-agent"
44 package_spire-server() {
45 pkgdesc="SPIFFE runtime environment (server)"
46 provides=("spire-server")
48 cd "${pkgbase}-${pkgver}"
49 install -Dsm755 cmd/spire-server/spire-server "${pkgdir}/usr/bin/spire-server"