# Template file for 'stern'
pkgname=stern
version=1.31.0
revision=1
build_style=go
go_import_path="github.com/stern/stern"
short_desc="Multi pod and container log tailing for Kubernetes"
maintainer="Kyle Nusbaum <knusbaum+void@sdf.org>"
license="Apache-2.0"
homepage="https://github.com/stern/stern"
distfiles="https://github.com/stern/stern/archive/v${version}.tar.gz"
checksum=b74b001035637c4e7058845005ee16a86421355baf9ee38d466dea8fd8aa0a02

# fix: collect2: fatal error: cannot find 'ld'
export LDFLAGS="-fuse-ld=bfd"

post_build() {
	for shell in bash fish zsh; do
		CGO_ENABLED=0 GOARCH="" go run main.go --completion "$shell" \
			>"completion.$shell"
	done
}

post_install() {
	for shell in bash fish zsh; do
		vcompletion "completion.$shell" "$shell"
	done
}
