Mail archive
alpine-aports

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

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

https://github.com/robfig/glock

Glock is a command-line tool to lock dependencies to specific revisions,
using a version control hook to keep those revisions in sync across a team.
---
 testing/glock/APKBUILD | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 testing/glock/APKBUILD
diff --git a/testing/glock/APKBUILD b/testing/glock/APKBUILD
new file mode 100644
index 0000000..a7c2c18
--- /dev/null
+++ b/testing/glock/APKBUILD
_at_@ -0,0 +1,67 @@
+# Maintainer: Christian Kampka <christian_at_kampka.net>
+pkgname=glock
+pkgver=0.0.20151018
+pkgrel=0
+pkgdesc="A command-line tool to lock dependencies to specific revisions"
+url="https://github.com/robfig/glock/"
+arch="x86_64"
+license="MIT"
+makedepends="git go"
+options="!strip"
+source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz"
+
+_giturl="git://github.com/robfig/${pkgname}.git"
+_disturl="dev.alpinelinux.org:/archive/$pkgname/"
+_commit="cb3c3ec56de988289cab7bbd284eddc04dfee6c9"
+
+snapshot() {
+	local _pkg=$pkgname-$pkgver.tar.gz
+
+	abuild clean
+	abuild deps
+
+	mkdir -p "$srcdir"
+	cd "$srcdir"
+	msg "Creating snapshot: $_pkg"
+	export GOPATH="${srcdir}/$pkgname"
+	git clone -q ${_giturl} || return 1
+	cd $pkgname
+	git checkout ${_commit} || return 1
+	go get -v -d || 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
+	sed -i -e "s/^pkgver=.*/pkgver=$_ver/" APKBUILD || return 1
+	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"
+	go build
+}
+
+package() {
+	cd "$_builddir"
+	install -Dm755 ${_builddir}/glock \
+	"$pkgdir"/usr/bin/glock
+}
+md5sums="0abc8aba70acac6685db825eb07076ea  glock-0.0.20151018.tar.gz"
+sha256sums="b3a1bb29e77807381364451cdd6e5a36a78342125acaf29c440de1cdb5be68a2  glock-0.0.20151018.tar.gz"
+sha512sums="6cc9cd1242c64eaaea68f2063ab5508a1751019d02fd4e9ca4c2e99a4fb28a8becbfa4c64a42f10a0587bdad4d28161e5b26e16dff1ba304d4175355d8811849  glock-0.0.20151018.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:14 GMT