mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-12 12:12:24 +01:00
54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
# Contributor: Hoang Nguyen <folliekazetani@protonmail.com>
|
|
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
|
|
pkgname=stern
|
|
pkgver=1.26.0
|
|
pkgrel=2
|
|
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"
|
|
|
|
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="
|
|
a27a0d18e364a6a69992bf4ce04657a5ec20365b4e7fd166d905aefa7064f0e35d96da5954e42361caea0f58da1c858ee13dda5de9c4a7dfe9c8eaa869fdd828 stern-1.26.0.tar.gz
|
|
"
|