aboutsummaryrefslogtreecommitdiffstats
path: root/community/k9s/APKBUILD
blob: f0cc252a6d976fbcb20927168d4a20d6149f9f32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=k9s
_pkgname=github.com/derailed/k9s
pkgver=0.25.18
pkgrel=3
_commit=6085039f # git rev-parse --short HEAD
_date=2021-12-28T17:08:34UTC # git show -s --format=%ci | date -u +%FT%T%Z
pkgdesc="Kubernetes TUI"
url="https://k9scli.io"
# riscv64 FTBS
arch="all !x86 !armhf !riscv64 !aarch64" # tests fail
license="Apache-2.0"
makedepends="go"
options="net chmod-clean"
source="$pkgname-$pkgver.tar.gz::https://github.com/derailed/k9s/archive/v$pkgver.tar.gz"

export GOPATH="$srcdir/go"
export GOCACHE="$srcdir/go-build"
export GOTMPDIR="$srcdir"

build() {
	local ldflags="-w -s -X $_pkgname/cmd.version=$pkgver -X $_pkgname/cmd.commit=$_commit -X $_pkgname/cmd.date=$_date"
	go build -ldflags "$ldflags" -a -tags netgo -o execs/$pkgname main.go
}

check() {
	go test ./...
}

package() {
	install -Dm755 execs/$pkgname "$pkgdir"/usr/bin/$pkgname
}

sha512sums="
e295fd63b8e166da626f81cde3ef3d5e195448d1017958ed40293d7161d20ed3730151b375ddb5036da958197b43f6b236b8f3575754972cd77ad7afa60ccf4a  k9s-0.25.18.tar.gz
"