1 # Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
4 pkgdesc="Multi pod and container log tailing for Kubernetes"
8 url="https://github.com/stern/stern"
13 optdepends=('bash-completion: for bash completion support')
14 source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
15 sha512sums=('c7fc531c9d01b32cd5edfdb2f036f7524fee2fb13eec35d01e7c053a383db3f3f98454329bfcc8660cb5b1f851364e8adb5637539035712e6defbf3a6cd0d9b3')
16 b2sums=('089b3fe36f452c3fa8b44b924af59de129284d189d42088cd272253d6f1b52a5fa96c0a09b7153f63e739724899ab20f35cb4cdd6aa78ce9100f90e4cccf56e6')
19 cd "${pkgname}-${pkgver}"
21 export CGO_CPPFLAGS="${CPPFLAGS}"
22 export CGO_CFLAGS="${CFLAGS}"
23 export CGO_CXXFLAGS="${CXXFLAGS}"
24 export CGO_LDFLAGS="${LDFLAGS}"
25 export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
28 -ldflags "-linkmode external -X \"github.com/stern/stern/cmd.version=${pkgver}\"" \
33 cd "${pkgname}-${pkgver}"
39 cd "${pkgname}-${pkgver}"
41 install --verbose -D --mode=0755 "./out/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
43 "${pkgdir}/usr/bin/${pkgname}" --completion=bash | install --verbose -D --mode=0644 /dev/stdin "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
44 "${pkgdir}/usr/bin/${pkgname}" --completion=fish | install --verbose -D --mode=0644 /dev/stdin "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish"
45 "${pkgdir}/usr/bin/${pkgname}" --completion=zsh | install --verbose -D --mode=0644 /dev/stdin "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
47 install --verbose -D --mode=0644 *.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"