summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Lisin2020-04-02 19:10:44 +0200
committerMatthias Lisin2020-04-02 19:10:44 +0200
commit9cb80a91e9686a0fd7394765317692bd36d1448e (patch)
treee4d3feda681631602c8eed997b1797356334c02a
downloadaur-9cb80a91e9686a0fd7394765317692bd36d1448e.tar.gz
newpkg: sonobuoy 0.18.0-1
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD38
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..54ac0a3e2ded
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = sonobuoy
+ pkgdesc = Diagnostic tool for Kubernetes clusters
+ pkgver = 0.18.0
+ pkgrel = 1
+ url = https://github.com/vmware-tanzu/sonobuoy
+ arch = x86_64
+ license = Apache
+ makedepends = go
+ makedepends = gzip
+ makedepends = git
+ depends = glibc
+ optdepends = docker: sonobuoy images subcommand
+ optdepends = kubectl: advances workflows
+ source = sonobuoy-0.18.0.tar.gz::https://github.com/vmware-tanzu/sonobuoy/archive/v0.18.0.tar.gz
+ sha256sums = 8333e5af4483b154e339de168e3fc67d296983fb480a5d3845e8c78cfb9fbeee
+
+pkgname = sonobuoy
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3047fc7eb577
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: ml <ml@visu.li>
+pkgname=sonobuoy
+pkgver=0.18.0
+pkgrel=1
+pkgdesc='Diagnostic tool for Kubernetes clusters'
+arch=('x86_64')
+url='https://github.com/vmware-tanzu/sonobuoy'
+license=('Apache')
+depends=('glibc')
+optdepends=(
+ 'docker: sonobuoy images subcommand'
+ 'kubectl: advances workflows')
+makedepends=('go' 'gzip' 'git')
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
+sha256sums=('8333e5af4483b154e339de168e3fc67d296983fb480a5d3845e8c78cfb9fbeee')
+
+build() {
+ # illegal packaging technique
+ _commit=$(zcat "${pkgname}-${pkgver}.tar.gz" | git get-tar-commit-id)
+ cd "${pkgname}-${pkgver}"
+ export CGO_LDFLAGS="$LDFLAGS"
+ export GOFLAGS='-buildmode=pie -modcacherw -trimpath'
+ _defines=(
+ "github.com/vmware-tanzu/sonobuoy/pkg/buildinfo.Version=v${pkgver}"
+ "github.com/vmware-tanzu/sonobuoy/pkg/buildinfo.GitSHA=${_commit}"
+ )
+ go build -o "$pkgname" -ldflags "${_defines[*]/#/-X=}"
+}
+
+check() {
+ cd "${pkgname}-${pkgver}"
+ go test ./cmd/... ./pkg/...
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+ install -Dm755 "$pkgname" -t "${pkgdir}/usr/bin"
+}