diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2014-08-25 12:12:35 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2014-08-25 12:13:29 +0200 |
commit | e794f0ffd98383718cfeae36bbee7d473846890b (patch) | |
tree | 2cbc6e0e610c456e1d8d69212f1e704b2774f20a /main/godep | |
parent | 57ea395d2c5d1404554167818121d7e564f1293e (diff) | |
download | aports-e794f0ffd98383718cfeae36bbee7d473846890b.tar.bz2 aports-e794f0ffd98383718cfeae36bbee7d473846890b.tar.xz |
main/godep: move to main
added a custom snapshot function to have non changing source
Diffstat (limited to 'main/godep')
-rw-r--r-- | main/godep/APKBUILD | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/main/godep/APKBUILD b/main/godep/APKBUILD new file mode 100644 index 0000000000..358bf1c9b0 --- /dev/null +++ b/main/godep/APKBUILD @@ -0,0 +1,63 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: +pkgname=godep +pkgver=0_git20140825 +pkgrel=0 +pkgdesc="Dependency tool for go" +url="http://github.com/tools/godep" +arch="all" +license="BSD" +depends="" +depends_dev="" +makedepends="$depends_dev go mercurial" +install="" +subpackages="" +source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.bz2" +disturl="dev.alpinelinux.org:/archive/$pkgname/" + + +_builddir="$srcdir"/src/github.com/tools/$pkgname.git + +snapshot() { + local _date=$(date +%Y%m%d) + local _version=${verbase:-0}_git${_date} + abuild clean + mkdir -p "$srcdir" && cd "$srcdir" + hg clone http://code.google.com/p/go.tools \ + "$srcdir"/src/code.google.com/p/go.tools || return 1 + git clone git://github.com/tools/$pkgname.git \ + "$srcdir"/src/github.com/tools/$pkgname.git || return 1 + git clone git://github.com/kr/fs.git \ + "$srcdir"/src/github.com/kr/fs || return 1 + tar jcf $pkgname-$_version.tar.bz2 src || return 1 + rsync --progress -La $pkgname-$_version.tar.bz2 $disturl || return 1 + cd "$startdir" + sed -i -e "s/^pkgver=.*/pkgver=${_version}/" \ + APKBUILD || return 1 + abuild checksum +} + +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" + GOPATH="${srcdir}" go build +} + +package() { + cd "$_builddir" + install -Dm755 godep.git \ + "${pkgdir}/usr/bin/godep" || return 1 +} + +md5sums="9c26b522c2b9fbfe49afbf24b37cb943 godep-0_git20140825.tar.bz2" +sha256sums="0d5428715550af96fef003262bb010e8ed86721b6740a88fa3e566b3e66e74f5 godep-0_git20140825.tar.bz2" +sha512sums="842250d4359dcf812f58accb68305740d5a776b3f4f083420638ca12d7d5ee27c9f6b0eb252a46f8794c06926f6d739a5dd41a631499d42885af83ba190e79b9 godep-0_git20140825.tar.bz2" |