diff options
author | ml | 2020-05-10 12:34:12 +0200 |
---|---|---|
committer | ml | 2020-05-10 12:34:12 +0200 |
commit | b757a430784c9829c5c12965857c7df4139eed87 (patch) | |
tree | 6405d82645faa6eaa8c407ecb7c503cd6d03c441 | |
parent | 1867a12d9a1868fdaca95e5a432a46e489cab90b (diff) | |
download | aur-b757a430784c9829c5c12965857c7df4139eed87.tar.gz |
upgpkg: kube-prompt-git
Add flags and other stuff
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 37 |
3 files changed, 28 insertions, 17 deletions
@@ -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/ @@ -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" } |