Mail archive
alpine-aports

[alpine-aports] [PATCH 2/2] testing/dockerize: new aport

From: Christian Kampka <christian_at_kampka.net>
Date: Sun, 18 Oct 2015 16:05:15 +0200

https://github.com/jwilder/dockerize
Utility to simplify running applications in docker containers.
---
 testing/dockerize/APKBUILD | 67 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 testing/dockerize/APKBUILD
diff --git a/testing/dockerize/APKBUILD b/testing/dockerize/APKBUILD
new file mode 100644
index 0000000..41792b8
--- /dev/null
+++ b/testing/dockerize/APKBUILD
_at_@ -0,0 +1,67 @@
+# Maintainer: Christian Kampka <christian_at_kampka.net>
+pkgname=dockerize
+pkgver=0.0.3
+pkgrel=0
+pkgdesc="Utility to simplify running applications in docker containers."
+url="https://github.com/jwilder/dockerize"
+arch="x86_64"
+license="MIT"
+makedepends="git go glock"
+options="!strip"
+source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz"
+
+_giturl="git://github.com/jwilder/${pkgname}.git"
+_disturl="dev.alpinelinux.org:/archive/$pkgname/"
+
+
+snapshot() {
+	abuild clean
+	abuild deps
+	abuild fetch
+
+	mkdir -p "$srcdir"
+	cd "$srcdir"
+	msg "Creating snapshot: $_pkg"
+	export GOPATH="${srcdir}/$pkgname"
+	git clone -q ${_giturl} ${pkgname}|| return 1
+	cd $pkgname
+	git checkout v${pkgver} || return 1
+	glock sync ../ || return 1
+	cd $srcdir
+	tar zcf $pkgname-$pkgver.tar.gz $pkgname || return 1
+	rsync --progress -La $pkgname-${pkgver}.tar.gz \
+		$_disturl || return 1
+	cd $startdir
+	abuild checksum
+	abuild undeps
+}
+
+_builddir="${srcdir}/${pkgname}"
+
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	GOARCH=$(go env | grep GOARCH | cut -d'=' -f 2 | xargs echo -n)
+	export GOPATH="$_builddir"
+	mkdir -p ${_builddir}/dist/linux/$GOARCH
+	GOOS=linux go build -ldflags "-X main.buildVersion ${pkgver}" -o ${_builddir}/dist/linux/$GOARCH/dockerize
+}
+
+package() {
+	cd "$_builddir"
+	GOARCH=$(go env | grep GOARCH | cut -d'=' -f 2 | xargs echo -n)
+	install -Dm755 ${_builddir}/dist/linux/$GOARCH/dockerize \
+	"$pkgdir"/usr/bin/dockerize
+}
+md5sums="3595ecca929976eb70baa1f615a45d08  dockerize-0.0.3.tar.gz"
+sha256sums="7727465e77701f41c615b1eeea8689797f1ae8ace78aeef432fb755d3a2065b1  dockerize-0.0.3.tar.gz"
+sha512sums="34ebd510c8e41341f48a2d1c48cf8ee03a35c0bac8ad7f7a1dc7190384848d3735dc21b93b1aa832bd729d2ccf06f47924beaadfe03e0faee9179479bf3c6546  dockerize-0.0.3.tar.gz"
-- 
2.6.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Oct 18 2015 - 16:05:15 GMT