aboutsummaryrefslogtreecommitdiffstats
path: root/community/k9s/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/k9s/APKBUILD')
-rw-r--r--community/k9s/APKBUILD63
1 files changed, 63 insertions, 0 deletions
diff --git a/community/k9s/APKBUILD b/community/k9s/APKBUILD
new file mode 100644
index 00000000000..25f0e3d338e
--- /dev/null
+++ b/community/k9s/APKBUILD
@@ -0,0 +1,63 @@
+# Contributor: Galen Abell <galen@galenabell.com>
+# Maintainer: Galen Abell <galen@galenabell.com>
+pkgname=k9s
+_pkgname=github.com/derailed/k9s
+pkgver=0.32.4
+pkgrel=0
+pkgdesc="Kubernetes TUI"
+url="https://k9scli.io"
+# riscv64 FTBS
+arch="all !x86 !armhf !riscv64" # tests fail
+license="Apache-2.0"
+makedepends="go"
+subpackages="
+ $pkgname-bash-completion
+ $pkgname-zsh-completion
+ $pkgname-fish-completion
+ "
+options="net chmod-clean"
+source="
+ $pkgname-$pkgver.tar.gz::https://github.com/derailed/k9s/archive/v$pkgver.tar.gz
+ disable-version-check.patch
+ "
+
+case $CARCH in
+ armv7) options="$options !check" ;;
+esac
+
+export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
+export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
+export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
+
+build() {
+ local ldflags="
+ -X $_pkgname/cmd.version=$pkgver
+ -X $_pkgname/cmd.commit=AlpineLinux
+ -X $_pkgname/cmd.date=$(date +%FT%T%Z)
+ "
+ go build -ldflags "-s -w $ldflags" -tags netgo -o execs/$pkgname
+
+ ./execs/k9s completion bash >k9s.bash
+ ./execs/k9s completion zsh >k9s.zsh
+ ./execs/k9s completion fish >k9s.fish
+}
+
+check() {
+ go test ./...
+}
+
+package() {
+ install -Dm755 execs/$pkgname "$pkgdir"/usr/bin/$pkgname
+
+ install -Dm644 k9s.bash \
+ "$pkgdir"/usr/share/bash-completion/completions/k9s
+ install -Dm644 k9s.zsh \
+ "$pkgdir"/usr/share/zsh/site-functions/_k9s
+ install -Dm644 k9s.fish \
+ "$pkgdir"/usr/share/fish/vendor_completions.d/k9s.fish
+}
+
+sha512sums="
+6b3b1b68a7b019aed81d86c263642e95da10ec637081c615abaa6b0d7c8d5434513e3dea4fab48eb37f03ee392e573474f3d7c5094e92942e3b873c742722f4e k9s-0.32.4.tar.gz
+b44e038f22f757c725d7f300cbe6fbc3ea8f3c4b23db9d75aeae218a95ac275e0b89c72e3c3d0742f2c22ea1fd618cca3f1536afd521e74170fd5eb353547be0 disable-version-check.patch
+"