diff options
author | Andreas 'Segaja' Schleifer | 2020-08-03 22:01:06 +0200 |
---|---|---|
committer | Andreas 'Segaja' Schleifer | 2020-08-03 22:01:06 +0200 |
commit | 7892dcc42c36cc1058b8e0e3af047ca38e035585 (patch) | |
tree | 28db32e86835c9b97aebef8ee5a3d30b2f0facb7 /PKGBUILD | |
download | aur-7892dcc42c36cc1058b8e0e3af047ca38e035585.tar.gz |
initial version of the package
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1fcefd087b19 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Andreas 'Segaja' Schleifer <archlinux at segaja dot de> + +pkgname=stern +pkgdesc="Multi pod and container log tailing for Kubernetes" +pkgver=1.11.0 +pkgrel=1 +arch=('x86_64') +url="https://github.com/wercker/stern" +license=('apache') +depends=('glibc') +makedepends=('go') +source=( + ${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz + gomodules.patch::https://github.com/wercker/stern/commit/30c4a62d610f8695267e2e5ca0d1b32491bbc04d.patch +) +sha256sums=('d6f47d3a6f47680d3e4afebc8b01a14f0affcd8fb625132af14bb77843f0333f' + '872b9c67fcf8ee622a40a1eec020bced187bb833ea0beeace2c283e2889f1f4e') + +build() { + cd ${pkgname}-${pkgver} + + patch -p1 -i ../gomodules.patch + + export GO11MODULE=on + export CGO_LDFLAGS="${LDFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath" + + go build -o "./out/${pkgname}" +} + +package() { + cd ${pkgname}-${pkgver} + + install -Dm 755 "./out/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" + + "${pkgdir}/usr/bin/${pkgname}" --completion=bash | install -Dm644 /dev/stdin "${pkgdir}/usr/share/bash-completion/completions/${pkgname}" + "${pkgdir}/usr/bin/${pkgname}" --completion=zsh | install -Dm644 /dev/stdin "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}" +} |