mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
56 lines
1.4 KiB
Plaintext
56 lines
1.4 KiB
Plaintext
# Contributor: Galen Abell <galen@galenabell.com>
|
|
# Maintainer: Galen Abell <galen@galenabell.com>
|
|
pkgname=k9s
|
|
_pkgname=github.com/derailed/k9s
|
|
pkgver=0.27.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"
|
|
|
|
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 "$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/completions/k9s.fish
|
|
}
|
|
|
|
sha512sums="
|
|
a56a0cf185a2c902c5b1bdc9d7bcea108189fb1cc2aa1d4aaa907982acd7532607a5f9a703d0fd8880f50d0a6e1b1971f0319418ed47f9fe6306528e8141f35c k9s-0.27.4.tar.gz
|
|
"
|