archrelease: copy trunk to community-any
[ArchLinux/community.git] / kubeseal / trunk / PKGBUILD
blob8fc70c7a7bb8ffb58d6c51cf20446929aed23dee
1 # Maintainer: Christian Rebischke <chris.rebischke@archlinux.org>
2 # Contributor: sseneca <me at ssene dot ca>
3 # Contributor: ml <ml@visu.li>
5 pkgname=kubeseal
6 _pkgname=sealed-secrets
7 pkgver=0.20.5
8 pkgrel=1
9 pkgdesc="A Kubernetes controller and tool for one-way encrypted Secrets"
10 arch=('x86_64')
11 url="https://github.com/bitnami-labs/sealed-secrets"
12 license=('Apache')
13 makedepends=('go')
14 depends=('glibc')
15 source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
16 sha512sums=('27d3661a6c08f756f1eb28ac24d9808a5cdb2bad86c5c49461588b1c6d2c372bdc9ce84af1284abaee9e7177483ff2847128c613f062b2c9ac302abfbfb13e98')
17 options=('!lto')
19 build() {
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}" .
31 check() {
32   cd "${_pkgname}-${pkgver}"
34   go test ./cmd/kubeseal/... ./pkg/...
37 package() {
38   cd "${_pkgname}-${pkgver}/cmd/kubeseal/"
40   install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"