[arch-commits] Commit in (tanka tanka/repos tanka/trunk tanka/trunk/PKGBUILD)

Christian Rebischke shibumi at archlinux.org
Sun Nov 8 23:14:03 UTC 2020


    Date: Sunday, November 8, 2020 @ 23:14:03
  Author: shibumi
Revision: 746736

add tanka to community

Added:
  tanka/
  tanka/repos/
  tanka/trunk/
  tanka/trunk/PKGBUILD

----------+
 PKGBUILD |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

Added: tanka/trunk/PKGBUILD
===================================================================
--- tanka/trunk/PKGBUILD	                        (rev 0)
+++ tanka/trunk/PKGBUILD	2020-11-08 23:14:03 UTC (rev 746736)
@@ -0,0 +1,43 @@
+# Maintainer: Christian Rebischke <chris.rebischke at 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"
+}



More information about the arch-commits mailing list