diff options
author | Chris Snell | 2019-01-10 10:03:15 -0600 |
---|---|---|
committer | Chris Snell | 2019-01-10 10:03:15 -0600 |
commit | 657209f4d4431b7230b08189442832fa7f6b2ced (patch) | |
tree | 2260a78bda65428f0cd9316f40d06f921c68f753 | |
download | aur-657209f4d4431b7230b08189442832fa7f6b2ced.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 43 |
2 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..778a034ddb48 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = aws-iam-authenticator-git + pkgdesc = A tool to use AWS IAM credentials to authenticate to a Kubernetes cluster + pkgver = 0.4.0.alpha.1.r6.g0eef0a45 + pkgrel = 1 + url = https://github.com/kubernetes-sigs/aws-iam-authenticator + arch = x86_64 + arch = i686 + arch = arm + license = Apache + makedepends = go + makedepends = git + makedepends = dep + options = !strip + source = git+https://github.com/kubernetes-sigs/aws-iam-authenticator.git + sha512sums = SKIP + +pkgname = aws-iam-authenticator-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1eb12c368a94 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Chris Snell <chris.snell@gmail.com> + +pkgname=aws-iam-authenticator-git +_pkgname=aws-iam-authenticator +_githubpath=github.com/kubernetes-sigs/aws-iam-authenticator +pkgver=0.4.0.alpha.1.r6.g0eef0a45 +pkgrel=1 +pkgdesc="A tool to use AWS IAM credentials to authenticate to a Kubernetes cluster" +arch=('x86_64' 'i686' 'arm') +url="https://github.com/kubernetes-sigs/aws-iam-authenticator" +options=('!strip') +license=('Apache') +makedepends=('go' 'git' 'dep') +source=('git+https://github.com/kubernetes-sigs/aws-iam-authenticator.git') +sha512sums=('SKIP') + +pkgver() { + cd "$srcdir/$_pkgname" + ( set -o pipefail + git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +build() { + mkdir -p ${srcdir}/src/$_githubpath + cd "$srcdir/$_pkgname" + git --work-tree=${srcdir}/src/$_githubpath checkout -f master + cd "$srcdir/src/$_githubpath" + export GOPATH=${srcdir} + echo "Fetching dependencies with dep... (this will take a while)" + dep ensure + cd cmd/aws-iam-authenticator + go build +} + +package() { + cd "$srcdir/src/$_githubpath" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE" + cd "cmd/$_pkgname" + install -Dm755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname" +} + |