Mail archive
alpine-aports

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

From: Christian Kampka <christian_at_kampka.net>
Date: Fri, 7 Aug 2015 00:03:56 +0200

https://github.com/jwilder/dockerize
Utility to simplify running applications in docker containers.
---
 testing/dockerize/APKBUILD | 64 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 testing/dockerize/APKBUILD
diff --git a/testing/dockerize/APKBUILD b/testing/dockerize/APKBUILD
new file mode 100644
index 0000000..20b5d50
--- /dev/null
+++ b/testing/dockerize/APKBUILD
_at_@ -0,0 +1,64 @@
+# Maintainer: Chritsian Kampka <christian at kampka dot net>
+pkgname=dockerize
+pkgver=0.0.2
+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"
+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"
+	export GOPATH="$_builddir"
+	make dist
+}
+
+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="8935e6c06d6f0d6051dcf1db384a523f  dockerize-0.0.2.tar.gz"
+sha256sums="fee5a1fa8562769f016cf27a4eed04211d00721b289b5d2ce062fcb2e6c51d8a  dockerize-0.0.2.tar.gz"
+sha512sums="ca513817c904024202c2ca384da27a2458bce60d7c3223fd1f5800ddd5062dba24115dadd9f133c7ebb3caa3033ff80c87229002aec6a570618db83b8070f13d  dockerize-0.0.2.tar.gz"
-- 
2.5.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Aug 07 2015 - 00:03:56 GMT