summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChristophe Robin2017-04-28 19:21:44 +0900
committerChristophe Robin2017-04-28 19:42:35 +0900
commit36dd55e1f8be0688f3ea40e3af24c744c62abdc7 (patch)
treebf72479b82272fc5832b95f5ee06bfd95eb5d371 /PKGBUILD
downloadaur-36dd55e1f8be0688f3ea40e3af24c744c62abdc7.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..abaa4d9e7ed9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Christophe Robin <crobin@nekoo.com>
+
+pkgname=infrakit-git
+pkgver=v0.4.1.r77.gce06e23
+pkgrel=1
+pkgdesc="A toolkit for creating and managing declarative, self-healing infrastructure."
+arch=('x86_64')
+url="https://github.com/docker/infrakit"
+license=('Apache')
+depends=('libvirt')
+makedepends=('go' 'make' 'git' 'libvirt')
+source=("${pkgname}::git+ssh://git@github.com/docker/infrakit.git" "discovery.patch")
+md5sums=('SKIP'
+ '243888bff971a8bd63e389a415abede5')
+
+pkgver() {
+ cd "${pkgname}"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ mkdir "${srcdir}/go" || true
+ export GOPATH="${srcdir}/go"
+ export PATH="${GOPATH}/bin:${PATH}"
+ mkdir -p "${GOPATH}/src/github.com/docker" || true
+ cd "${GOPATH}/src/github.com/docker"
+ ln -sfT "${srcdir}/${pkgname}" infrakit
+ cd infrakit
+
+ patch -p1 < "${srcdir}/discovery.patch"
+
+ make get-tools
+}
+
+build() {
+ export GOPATH="${srcdir}/go"
+ export PATH="${GOPATH}/bin:${PATH}"
+ cd "${GOPATH}/src/github.com/docker/infrakit"
+ make binaries
+}
+
+package() {
+ install -d "${pkgdir}/usr/bin"
+
+ for artifact in "${GOPATH}/src/github.com/docker/infrakit/build/"*; do
+ install -D -m755 "$artifact" "${pkgdir}/usr/bin/$( basename "$artifact" )"
+ done
+}