aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2014-08-25 12:12:35 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2014-08-25 12:13:29 +0200
commite794f0ffd98383718cfeae36bbee7d473846890b (patch)
tree2cbc6e0e610c456e1d8d69212f1e704b2774f20a
parent57ea395d2c5d1404554167818121d7e564f1293e (diff)
downloadaports-e794f0ffd98383718cfeae36bbee7d473846890b.tar.bz2
aports-e794f0ffd98383718cfeae36bbee7d473846890b.tar.xz
main/godep: move to main
added a custom snapshot function to have non changing source
-rw-r--r--main/godep/APKBUILD63
-rw-r--r--testing/godep/APKBUILD47
2 files changed, 63 insertions, 47 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"
diff --git a/testing/godep/APKBUILD b/testing/godep/APKBUILD
deleted file mode 100644
index eea5965fcd..0000000000
--- a/testing/godep/APKBUILD
+++ /dev/null
@@ -1,47 +0,0 @@
-# Contributor: Carlo Landmeter <clandmeter@gmail.com>
-# Maintainer:
-pkgname=godep
-pkgver=0_git20140821
-pkgrel=0
-pkgdesc="Dependency tool for go"
-url="http://github.com/tools/godep"
-arch="all"
-license="BSD"
-depends=""
-depends_dev=""
-makedepends="$depends_dev git go mercurial"
-install=""
-subpackages=""
-source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz"
-giturl="git://github.com/tools/$pkgname.git"
-disturl="dev.alpinelinux.org:/archive/$pkgname/"
-
-
-_builddir=$srcdir/$pkgname-$pkgver
-
-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
- export GOPATH="${srcdir}"
- go get code.google.com/p/go.tools/go/vcs || return 1
- go get github.com/kr/fs || return 1
-}
-
-build() {
- cd "$_builddir"
- GOPATH="${srcdir}" go build
-}
-
-package() {
- cd "$_builddir"
- install -Dm755 "${pkgname}-${pkgver}" "${pkgdir}/usr/bin/godep"
-}
-
-md5sums="f9a077ebb970a66164827c55ea8164c1 godep-0_git20140821.tar.gz"
-sha256sums="737ce9a8b79bf139633f191fa16cc641c8116dab37e339c2d01045e6eb787e81 godep-0_git20140821.tar.gz"
-sha512sums="4dbd2e70211f45051621fceb96cf45d07d285f5d5394c8f3ecc53acb82d35f87610bec5ae7d212f3e82550a924b64fa4408fba0afa41eb4fb8f1f7232e8346a1 godep-0_git20140821.tar.gz"