Subject: [alpine-aports] [PATCH v2] testing/entrykit: new aport

From: Randall Leeds <[email-masked]>
Date: Fri, 29 Apr 2016 16:31:26 -0700

https://github.com/progrium/entrykit
Entrypoint tools for elegant, programmable containers
---
Changes v1 -> v2:
 - fix checksums
 - set arch=all
 - set rel=0

 testing/entrykit/APKBUILD                | 35 ++++++++++++++++++++++++++++++++
 testing/entrykit/entrykit.post-deinstall |  8 ++++++++
 testing/entrykit/entrykit.post-install   |  2 ++
 3 files changed, 45 insertions(+)
 create mode 100644 testing/entrykit/APKBUILD
 create mode 100644 testing/entrykit/entrykit.post-deinstall
 create mode 100644 testing/entrykit/entrykit.post-install

diff --git a/testing/entrykit/APKBUILD b/testing/entrykit/APKBUILD
new file mode 100644
index 0000000..0575aa1
--- /dev/null
+++ b/testing/entrykit/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Matt Aitchison <[email-masked]>
+# Maintainer: Randall Leeds <[email-masked]>
+pkgname=entrykit
+pkgver=0.4.0
+pkgrel=0
+pkgdesc="Entrypoint tools for elegant, programmable containers"
+url="https://github.com/progrium/entrykit"
+arch="all"
+license="MIT"
+depends=""
+depends_dev=""
+makedepends="go"
+install="$pkgname.post-install $pkgname.post-deinstall"
+subpackages=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/progrium/$pkgname/archive/v$pkgver.tar.gz"
+
+
+_builddir="$srcdir/go/src/github.com/progrium/$pkgname"
+build() {
+	export GOPATH="$srcdir/go"
+	mkdir -p $_builddir
+	ln -sf $srcdir/$pkgname-$pkgver/* "$_builddir"
+
+	cd "$_builddir"
+	go get -d -v ./cmd || return 1
+	go build -a -ldflags "-X main.Version=$pkgver" -o bin/$pkgname ./cmd || return 1
+}
+
+package() {
+	install -Dm755 "$_builddir/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
+}
+
+md5sums="10d9189782ca67a2a7de963ef05dd861  entrykit-0.4.0.tar.gz"
+sha256sums="89a35754ff0a9beba3a6d2eb34bc6048476409536586908cf3e2c6afdb503463  entrykit-0.4.0.tar.gz"
+sha512sums="79097b090af7bcaed31587d7ea81776698ac1bfa75defb4269e02da3f282d109fa1b68b3e8aca4351a3eb1fe1c0128c26853174f398b8d015b16a51a131ca6ca  entrykit-0.4.0.tar.gz"
diff --git a/testing/entrykit/entrykit.post-deinstall b/testing/entrykit/entrykit.post-deinstall
new file mode 100644
index 0000000..24c8946
--- /dev/null
+++ b/testing/entrykit/entrykit.post-deinstall
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+for link in /usr/bin/*; do
+	if [ -L "$link" ] && [ "$(readlink $link)" = "/usr/bin/entrykit" ]; then
+		echo "removing $link"
+		rm "$link"
+	fi
+done
diff --git a/testing/entrykit/entrykit.post-install b/testing/entrykit/entrykit.post-install
new file mode 100644
index 0000000..d581bdc
--- /dev/null
+++ b/testing/entrykit/entrykit.post-install
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/entrykit --symlink
-- 
2.7.4

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---