summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorArturo Penen2020-06-30 11:50:34 +0200
committerArturo Penen2020-06-30 11:50:34 +0200
commitc8787e82594d3e328ccf6d00e31c9658a641c5d3 (patch)
tree00d0b3b53e68596a9c3ae1fa0f6cff1734c9537f
parent3da5782d01400753e1428447f3571e72c50caba4 (diff)
downloadaur-c8787e82594d3e328ccf6d00e31c9658a641c5d3.tar.gz
Added new pkgbuild
Signed-off-by: Arturo Penen <arturo.penen@diagroup.com>
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD34
2 files changed, 27 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b8ee34bf894c..92e3e97f721c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,11 @@
pkgbase = kops
- pkgdesc = Kubernetes Operations (kops) - Production Grade K8s Installation, Upgrades, and Management
- pkgver = 1.16.0
- pkgrel = 2
+ pkgdesc = Command line tool for working with kops, build from source
+ pkgver = 1.17.0
+ pkgrel = 1
url = https://github.com/kubernetes/kops
arch = x86_64
license = Apache
- source = kops-linux-amd64-1.16.0::https://github.com/kubernetes/kops/releases/download/v1.16.0/kops-linux-amd64
- sha1sums = 95295b67781a57d9c1a578e1dd1a67c5052a6f03
+ makedepends = go
pkgname = kops
diff --git a/PKGBUILD b/PKGBUILD
index 0bdb52edb00e..7b3297449226 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,31 @@
-# Maintainer: David Rodriguez <dissonant.tech@gmail.com>
-# Contributor: Zachary Elliott <contact@zell.io>
-# https://github.com/zellio/pkgbuild
+# Maintainer: Arturo Penen <apenen@gmail.com>
pkgname=kops
-pkgver=1.16.0
-pkgrel=2
-pkgdesc="Kubernetes Operations (kops) - Production Grade K8s Installation, Upgrades, and Management"
+pkgver=1.17.0
+pkgrel=1
+pkgdesc='Command line tool for working with kops, build from source'
arch=('x86_64')
-url="https://github.com/kubernetes/kops"
+url='https://github.com/kubernetes/kops'
license=('Apache')
-makedepends=()
+makedepends=('go')
-source=("kops-linux-amd64-$pkgver::https://github.com/kubernetes/kops/releases/download/v${pkgver}/kops-linux-amd64")
-sha1sums=('95295b67781a57d9c1a578e1dd1a67c5052a6f03')
+build() {
+ mkdir -p $pkgname-$pkgver
+ cd $pkgname-$pkgver
+ export GOPATH=`pwd`
+ go get -d k8s.io/kops
+ cd ${GOPATH}/src/k8s.io/kops/
+ git checkout tags/v$pkgver
+ export VERSION=$pkgver
+ make
+}
package() {
- install -D -g root -m 0755 -o root "$srcdir/kops-linux-amd64-$pkgver" "$pkgdir/usr/bin/kops"
+ install -Dm 755 "${srcdir}/$pkgname-$pkgver/bin/kops" "${pkgdir}/usr/bin/kops"
+
+ # Populate bash and zsh completions
+ install -dm 755 "${pkgdir}/usr/share/bash-completion/completions"
+ install -dm 755 "${pkgdir}/usr/share/zsh/site-functions"
+ "${pkgdir}/usr/bin/kops" completion bash > "${pkgdir}/usr/share/bash-completion/completions/kops"
+ "${pkgdir}/usr/bin/kops" completion zsh > "${pkgdir}/usr/share/zsh/site-functions/_kops"
}