diff options
author | Mario Finelli | 2020-12-05 10:57:09 -0500 |
---|---|---|
committer | Mario Finelli | 2020-12-05 10:57:09 -0500 |
commit | fa9e8030b6a069e0a3b89bbcce7eaf6217256259 (patch) | |
tree | 5a860bf1865d999049dae24bca1d08c2f8fbc23f /PKGBUILD | |
download | aur-fa9e8030b6a069e0a3b89bbcce7eaf6217256259.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..aaea69d5557a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Mario Finelli <mario at finel dot li> + +pkgname=helm-gcs +pkgver=0.3.7 +pkgrel=1 +pkgdesc='Helm plugin to manage chart repositories on GCS' +arch=('x86_64') +url='https://github.com/hayorov/helm-gcs' +license=('MIT') +install=helm-gcs.install +depends=('helm') +makedepends=('go') +source=("https://github.com/hayorov/helm-gcs/archive/${pkgver}.tar.gz") +sha256sums=('25f012b4a500ec9922c93114ca9349f00f3baecfaa1af795c850bbfa508cc2a7') + +prepare() { + cd "${pkgname}-${pkgver}" + go mod download + sed -i '/^hooks:$/Q' plugin.yaml +} + +build() { + cd "${pkgname}-${pkgver}" + export CGO_ENABLED=1 + export CGO_LDFLAGS="$LDFLAGS" + export CGO_CFLAGS="$CFLAGS" + export CGO_CPPFLAGS="$CPPFLAGS" + export CGO_CXXFLAGS="$CXXFLAGS" + export GOFLAGS='-buildmode=pie -modcacherw -mod=readonly -trimpath' + go build -o bin/helm-gcs -ldflags "-linkmode=external -X github.com/hayorov/helm-gcs/cmd/helm-gcs/cmd.version=${pkgver}" cmd/helm-gcs/main.go +} + +package() { + cd "${pkgname}-${pkgver}" + # /usr/lib/helm/plugins follows other helm plugins on the AUR (e.g., helm-diff) + install -Dm0755 bin/helm-gcs -t "${pkgdir}/usr/lib/helm/plugins/${pkgname##helm-}/bin" + install -m0644 plugin.yaml -t "${pkgdir}/usr/lib/helm/plugins/${pkgname##helm-}" + + install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} |