summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorml2020-05-10 12:34:12 +0200
committerml2020-05-10 12:34:12 +0200
commitb757a430784c9829c5c12965857c7df4139eed87 (patch)
tree6405d82645faa6eaa8c407ecb7c503cd6d03c441
parent1867a12d9a1868fdaca95e5a432a46e489cab90b (diff)
downloadaur-b757a430784c9829c5c12965857c7df4139eed87.tar.gz
upgpkg: kube-prompt-git
Add flags and other stuff
-rw-r--r--.SRCINFO2
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD37
3 files changed, 28 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index eb3ff4c5266a..72a54d4c2c8e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = kube-prompt-git
pkgdesc = An interactive kubernetes client featuring auto-complete using go-prompt.
- pkgver = 1.0.8.r0.geed9b10
+ pkgver = 1.0.10.r5.gc654ccb
pkgrel = 1
url = https://github.com/c-bata/kube-prompt
arch = x86_64
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..7ee9358cf2de
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/pkg/
+/src/
+/*.log
+/*.tar.gz
+/*.pkg.tar*
+/*-git/
diff --git a/PKGBUILD b/PKGBUILD
index 59d4c536c1ed..7694a4f3da2b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
-# Maintainer: Matthias Lisin <ml@visu.li>
+# Maintainer: ml <ml@visu.li>
pkgname=kube-prompt-git
pkgrel=1
-pkgver=1.0.8.r0.geed9b10
+pkgver=1.0.10.r5.gc654ccb
pkgdesc='An interactive kubernetes client featuring auto-complete using go-prompt.'
arch=('x86_64' 'i686' 'aarch64')
url='https://github.com/c-bata/kube-prompt'
@@ -10,28 +10,33 @@ depends=('kubectl')
makedepends=('git' 'go')
provides=('kube-prompt')
conflicts=('kube-prompt')
-source=("$pkgname::git+https://github.com/c-bata/kube-prompt.git")
+source=("${pkgname}::git+https://github.com/c-bata/kube-prompt.git")
sha512sums=('SKIP')
-
pkgver() {
- cd "$pkgname"
- git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./'
+ cd "$pkgname"
+ git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./'
+}
+
+prepare() {
+ cd "$pkgname"
+ go mod download
}
build() {
- cd "$pkgname"
- LDFLAGS+=" -X 'main.version=$(git describe --tags --abbrev=0)'"
- LDFLAGS+=" -X 'main.revision=$(git rev-parse --short HEAD)'"
- go build \
- -o kube-prompt \
- -trimpath \
- -ldflags "-extldflags ${LDFLAGS}"
+ cd "$pkgname"
+ 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 kube-prompt -ldflags "-X main.version=v${pkgver%%.r*} -X main.revision=${pkgver##*.g}"
}
package() {
- cd "$pkgname"
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- install -Dm755 kube-prompt "${pkgdir}/usr/bin/kube-prompt"
+ cd "$pkgname"
+ install -Dm755 kube-prompt -t "${pkgdir}/usr/bin"
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}