mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-13 06:06:44 +02:00
53 lines
1.4 KiB
Text
53 lines
1.4 KiB
Text
maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
|
|
pkgname=stern
|
|
pkgver=1.32.0
|
|
pkgrel=3
|
|
pkgdesc="Multi pod and container log tailing for Kubernetes"
|
|
url="https://github.com/stern/stern"
|
|
arch="all"
|
|
license="Apache-2.0"
|
|
makedepends="go"
|
|
checkdepends="tzdata"
|
|
subpackages="
|
|
$pkgname-bash-completion
|
|
$pkgname-zsh-completion
|
|
$pkgname-fish-completion
|
|
"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/stern/stern/archive/refs/tags/v$pkgver.tar.gz"
|
|
options="net"
|
|
|
|
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
|
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
|
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
|
|
|
build() {
|
|
_goldflags="
|
|
-X github.com/stern/stern/cmd.version=$pkgver
|
|
-X github.com/stern/stern/cmd.commit=AlpineLinux
|
|
-X github.com/stern/stern/cmd.date=$(date +%FT%T%Z)
|
|
"
|
|
go build -v -o bin/$pkgname -ldflags "$_goldflags"
|
|
|
|
for shell in bash fish zsh; do
|
|
./bin/stern --completion $shell > stern.$shell
|
|
done
|
|
}
|
|
|
|
check() {
|
|
go test ./...
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 bin/$pkgname -t "$pkgdir"/usr/bin/
|
|
|
|
install -Dm644 stern.bash \
|
|
"$pkgdir"/usr/share/bash-completion/completions/stern
|
|
install -Dm644 stern.zsh \
|
|
"$pkgdir"/usr/share/zsh/site-functions/_stern
|
|
install -Dm644 stern.fish \
|
|
"$pkgdir"/usr/share/fish/vendor_completions.d/stern.fish
|
|
}
|
|
|
|
sha512sums="
|
|
24571f6af3a17853d2b420b2dd14c5976c7c84e23a9ea24d197a43b4d8d604d845e9e302b5393efc66d6bb1e43ad3262e44e119b7aead3c1520553944ccc2caa stern-1.32.0.tar.gz
|
|
"
|