summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorml2021-06-15 20:48:05 +0200
committerml2021-06-15 20:48:33 +0200
commit9f2cae8d70735d1c63f957fd562a2b4dd0f28ef3 (patch)
tree561536400e228194747530b283a160d80fea1c22 /PKGBUILD
downloadaur-9f2cae8d70735d1c63f957fd562a2b4dd0f28ef3.tar.gz
updpkg: kubectl-tree 0.4.0-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD28
1 files changed, 28 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ebe7606820af
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: ml <>
+pkgname=kubectl-tree
+pkgver=0.4.0
+pkgrel=1
+pkgdesc='Browse object hierarchies as a tree'
+arch=('x86_64' 'aarch64')
+url='https://github.com/ahmetb/kubectl-tree'
+license=('Apache')
+depends=('kubectl')
+makedepends=('go')
+groups=('kubectl-plugins')
+source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
+sha256sums=('fcea81b6c54a524ea15f7169c8750a7349258f966079fd6c29115aa04133c9db')
+
+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 -trimpath -modcacherw'
+ go build -ldflags="-linkmode=external -X=main.version=$pkgver" ./cmd/"$pkgname"
+}
+
+package() {
+ install -Dm755 "$pkgname-$pkgver/$pkgname" -t "$pkgdir/usr/bin"
+}