summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorml2020-07-28 15:53:31 +0200
committerml2020-07-28 15:53:31 +0200
commit2df851193949418e04ba04dce219849dbfecc377 (patch)
tree21e0b5c159ba886e32f2aea9a7a2714969f739b9
downloadaur-2df851193949418e04ba04dce219849dbfecc377.tar.gz
newpkg: kubectl-neat 1.2.0-1
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD40
3 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..cd0d85b6f0a4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = kubectl-neat
+ pkgdesc = Clean up Kuberntes yaml and json output to make it readable
+ pkgver = 1.2.0
+ pkgrel = 1
+ url = https://github.com/itaysk/kubectl-neat
+ arch = x86_64
+ arch = aarch64
+ groups = kubectl-plugins
+ license = Apache
+ makedepends = go
+ depends = kubectl
+ source = https://github.com/itaysk/kubectl-neat/archive/v1.2.0/kubectl-neat-1.2.0.tar.gz
+ sha256sums = c241d4cc5f5d13d4f496974f9c9580477d07a9e433d77f5412aa6e7be493afdc
+
+pkgname = kubectl-neat
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f1ecb611e6e2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/pkg/
+/src/
+/*.log
+/*.tar.gz
+/*.pkg.tar*
+/*.src.tar*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7b0fc3434700
--- /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}"
+}