summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Swenson2017-06-21 16:04:49 -0700
committerBram Swenson2017-06-21 16:04:49 -0700
commit52e542b2eef5a84696cb55ac7946d8c14cd9128b (patch)
tree870efabeecfa5779ceaa77cc636a331c6eef00d1
downloadaur-52e542b2eef5a84696cb55ac7946d8c14cd9128b.tar.gz
amazon-ecr-credential-helper d33bfc4
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD32
-rwxr-xr-xbuild19
4 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b3aee4d9bc1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = amazon-ecr-credential-helper
+ pkgdesc = A credential helper for the Docker daemon that makes it easier to use Amazon EC2 Container Registry.
+ pkgver = d33bfc419b3300614961ab30abe01548fd325258
+ pkgrel = 1
+ url = https://github.com/awslabs/amazon-ecr-credential-helper
+ arch = i686
+ arch = x86_64
+ license = MPL
+ makedepends = go
+ makedepends = godep
+ makedepends = git
+ source = amazon-ecr-credential-helper-d33bfc419b3300614961ab30abe01548fd325258.tar.gz::https://github.com/awslabs/amazon-ecr-credential-helper/archive/d33bfc419b3300614961ab30abe01548fd325258.tar.gz
+ sha512sums = 0e9baf4f631112c232d723faa83cdef1e7ca6f6a1ebd0335e353a0a68cfde9c798edcf566dd213d369cc141390283188b8c3b540c82fbbc7be61d5ab73a8e7a6
+
+pkgname = amazon-ecr-credential-helper
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..ea7aab482d6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/pkg/
+/src/
+/*.tar.gz
+/*.xz
+/fly_linux_amd64
+/*.swp
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e7ac58d3847
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Bram Swenson <bram+aur@craniumisajar.com>
+
+pkgname=amazon-ecr-credential-helper
+pkgver=d33bfc419b3300614961ab30abe01548fd325258
+pkgrel=1
+pkgdesc="A credential helper for the Docker daemon that makes it easier to use Amazon EC2 Container Registry."
+url='https://github.com/awslabs/amazon-ecr-credential-helper'
+arch=('i686' 'x86_64')
+license=('MPL')
+makedepends=('go' 'godep' 'git')
+_gourl=github.com/awslabs
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/awslabs/amazon-ecr-credential-helper/archive/${pkgver}.tar.gz")
+sha512sums=('0e9baf4f631112c232d723faa83cdef1e7ca6f6a1ebd0335e353a0a68cfde9c798edcf566dd213d369cc141390283188b8c3b540c82fbbc7be61d5ab73a8e7a6')
+
+prepare() {
+ mkdir -p "${srcdir}/src/${_gourl}"
+ rm -rf "${srcdir}/src/${_gourl}/${pkgname}"
+ tar -zxvf "${pkgname}-${pkgver}.tar.gz" &> /dev/null
+ mv -f "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/src/${_gourl}/${pkgname}"
+}
+
+build() {
+ msg2 "Build program"
+ cd "${srcdir}/src/${_gourl}/${pkgname}"
+ GOPATH="${srcdir}" PATH="${srcdir}/bin:${PATH}" make
+}
+
+package() {
+ cd "${srcdir}/src/${_gourl}/${pkgname}/bin/local"
+ install -Dm755 docker-credential-ecr-login \
+ "${pkgdir}/usr/bin/docker-credential-ecr-login"
+}
diff --git a/build b/build
new file mode 100755
index 00000000000..273b12b3889
--- /dev/null
+++ b/build
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+make_srcinfo () {
+ makepkg --printsrcinfo > .SRCINFO
+}
+
+build () {
+ makepkg -s "${@}"
+}
+
+clean () {
+ rm -rf *.pkg.tar.xz *.tar.gz ; rm -rf ./pkg ./src ; true
+}
+
+main () {
+ clean && build "${@}" && make_srcinfo
+}
+
+main "$@"