Date: Sunday, November 8, 2020 @ 23:14:20 Author: shibumi Revision: 746737
archrelease: copy trunk to community-x86_64 Added: tanka/repos/community-x86_64/ tanka/repos/community-x86_64/PKGBUILD (from rev 746736, tanka/trunk/PKGBUILD) ----------+ PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) Copied: tanka/repos/community-x86_64/PKGBUILD (from rev 746736, tanka/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2020-11-08 23:14:20 UTC (rev 746737) @@ -0,0 +1,43 @@ +# Maintainer: Christian Rebischke <chris.rebisc...@archlinux.org> + +pkgname=tanka +pkgver=0.12.0 +pkgrel=2 +pkgdesc="Flexible, reusable and concise configuration for Kubernetes" +arch=('x86_64') +url="https://github.com/grafana/tanka" +license=('Apache') +makedepends=('go') +depends=('glibc') +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/grafana/tanka/archive/v${pkgver}.tar.gz") +sha512sums=('a768d12423f63dcd95d4b27655874c916673bf5ebf7209951148644c611cf23060bf8852237f0df2841829524965a9b6454f1a7e4f7a1904d6896bc7388b3ef3') + +prepare() { + export GOPATH="${srcdir}" + mkdir -p src/github.com/grafana "${GOPATH}/bin" + mv "${pkgname}-${pkgver}" "src/github.com/grafana/${pkgname}" + export PACKAGE_ROOT="${GOPATH}/src/github.com/grafana/${pkgname}" +} + +build() { + cd "${PACKAGE_ROOT}/cmd/tk/" + export CGO_ENABLED=1 + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + export GOLDFLAGS="-s -w -linkmode=external -X github.com/grafana/tanka/pkg/tanka.CURRENT_VERSION=${pkgver}" + go build -v . + chmod +x ./tk +} + +check() { + cd "${PACKAGE_ROOT}" + go test -v ./... +} + +package() { + cd "${PACKAGE_ROOT}/cmd/tk/" + install -Dsm755 ./tk "${pkgdir}/usr/bin/tk" +}