summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Finelli2020-12-05 10:57:09 -0500
committerMario Finelli2020-12-05 10:57:09 -0500
commitfa9e8030b6a069e0a3b89bbcce7eaf6217256259 (patch)
tree5a860bf1865d999049dae24bca1d08c2f8fbc23f
downloadaur-fa9e8030b6a069e0a3b89bbcce7eaf6217256259.tar.gz
Initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD40
-rw-r--r--helm-gcs.install4
4 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a178ed256296
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = helm-gcs
+ pkgdesc = Helm plugin to manage chart repositories on GCS
+ pkgver = 0.3.7
+ pkgrel = 1
+ url = https://github.com/hayorov/helm-gcs
+ install = helm-gcs.install
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ depends = helm
+ source = https://github.com/hayorov/helm-gcs/archive/0.3.7.tar.gz
+ sha256sums = 25f012b4a500ec9922c93114ca9349f00f3baecfaa1af795c850bbfa508cc2a7
+
+pkgname = helm-gcs
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..5c2dd18df608
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!.gitignore
+!PKGBUILD
+!helm-gcs.install
+!.SRCINFO
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"
+}
diff --git a/helm-gcs.install b/helm-gcs.install
new file mode 100644
index 000000000000..ab786ddc87e5
--- /dev/null
+++ b/helm-gcs.install
@@ -0,0 +1,4 @@
+post_install() {
+ echo "Run the following command to finish plugin installation:"
+ echo -e "\thelm plugin install /usr/lib/helm/plugins/gcs"
+}