1 # Maintainer: Christian Rebischke <chris.rebischke@archlinux.org>
2 # Contributor: sseneca <me at ssene dot ca>
3 # Contributor: ml <ml@visu.li>
6 _pkgname=sealed-secrets
9 pkgdesc="A Kubernetes controller and tool for one-way encrypted Secrets"
11 url="https://github.com/bitnami-labs/sealed-secrets"
15 source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
16 sha512sums=('27d3661a6c08f756f1eb28ac24d9808a5cdb2bad86c5c49461588b1c6d2c372bdc9ce84af1284abaee9e7177483ff2847128c613f062b2c9ac302abfbfb13e98')
20 cd "${_pkgname}-${pkgver}/cmd/kubeseal"
21 export CGO_CPPFLAGS="${CPPFLAGS}"
22 export CGO_CFLAGS="${CFLAGS}"
23 export CGO_CXXFLAGS="${CXXFLAGS}"
24 export CGO_LDFLAGS="${LDFLAGS}"
25 export CGO_LDFLAGS="${LDFLAGS}"
26 export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
28 go build -ldflags="-linkmode=external -X=main.VERSION=v${pkgver}" .
32 cd "${_pkgname}-${pkgver}"
34 go test ./cmd/kubeseal/... ./pkg/...
38 cd "${_pkgname}-${pkgver}/cmd/kubeseal/"
40 install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"