summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorml2020-07-28 15:53:31 +0200
committerml2020-07-28 15:53:31 +0200
commit2df851193949418e04ba04dce219849dbfecc377 (patch)
tree21e0b5c159ba886e32f2aea9a7a2714969f739b9 /PKGBUILD
downloadaur-2df851193949418e04ba04dce219849dbfecc377.tar.gz
newpkg: kubectl-neat 1.2.0-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..7b0fc343470
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: ml <ml@visu.li>
+pkgname=kubectl-neat
+pkgver=1.2.0
+pkgrel=1
+pkgdesc='Clean up Kuberntes yaml and json output to make it readable'
+arch=('x86_64' 'aarch64')
+url='https://github.com/itaysk/kubectl-neat'
+license=('Apache')
+depends=('kubectl')
+makedepends=('go')
+groups=('kubectl-plugins')
+source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha256sums=('c241d4cc5f5d13d4f496974f9c9580477d07a9e433d77f5412aa6e7be493afdc')
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+ go mod download
+}
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ export CGO_ENABLED=1
+ export CGO_LDFLAGS="$LDFLAGS"
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
+ export GOFLAGS='-buildmode=pie -trimpath -modcacherw -mod=readonly'
+ go build -o "$pkgname"
+}
+
+check() {
+ cd "${pkgname}-${pkgver}"
+ go test -short ./...
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+ install -Dm755 ${pkgname} -t "${pkgdir}/usr/bin"
+ install -Dm644 demo.png Readme.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+}