summaryrefslogtreecommitdiffstats
path: root/main/yajl
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-01-27 08:08:18 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-01-27 08:11:10 +0000
commit2261ae956d1f2daa81d19195357e6af80349daa1 (patch)
treef54ee7eaf2c97cc42332e8773ef8bd0104598358 /main/yajl
parentf31c97629f6dc51b55e486f08a35e70248110a20 (diff)
downloadaports-2261ae956d1f2daa81d19195357e6af80349daa1.tar.bz2
aports-2261ae956d1f2daa81d19195357e6af80349daa1.tar.xz
main/yajl: upgrade to 2.0.4
Diffstat (limited to 'main/yajl')
-rw-r--r--main/yajl/APKBUILD39
1 files changed, 29 insertions, 10 deletions
diff --git a/main/yajl/APKBUILD b/main/yajl/APKBUILD
index 7a0d6e8ac..c6e63aea5 100644
--- a/main/yajl/APKBUILD
+++ b/main/yajl/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=yajl
-pkgver=2.0.3
+pkgver=2.0.4
pkgrel=0
pkgdesc="Yet Another JSON Library (YAJL)"
url="http://lloyd.github.com/yajl/"
@@ -10,19 +10,38 @@ depends=""
makedepends="cmake"
install=""
subpackages="$pkgname-dev $pkgname-tools"
-
-# How to create archive from git. pkgver needs to be a git tag.
-#
-# git clone https://github.com/lloyd/yajl.git
-# cd yajl
-# git archive --format tar.gz --prefix yajl-$pkgver/ -o yajl-$pkgver.tar.gz $pkgver
-# scp yajl-$pkgver.tar.gz dev.alpinelinux.org:/archive/yajl/
-
source="http://dev.alpinelinux.org/archive/yajl/yajl-$pkgver.tar.gz
libm.patch"
_builddir="$srcdir"/yajl-$pkgver
+# How to create archive from git:
+#
+# abuild snapshot
+#
+
+_gitrepo=yajl.git
+_giturl="git://github.com/lloyd/$_gitrepo"
+_gittag=$pkgver
+
+snapshot() {
+ local _tarball=$pkgname-$pkgver.tar.gz
+ msg "Creating $_tarball.."
+ mkdir -p "$srcdir"
+ cd "${SRCDEST:-$srcdir}"
+ if ! [ -d "$_gitrepo" ]; then
+ git clone --bare $_giturl || return 1
+ else
+ git --git-dir=$_gitrepo fetch || return 1
+ fi
+
+ git --git-dir=$_gitrepo archive --prefix=$pkgname-$pkgver/ \
+ -o "$SRCDEST"/$_tarball $_gittag || return 1
+
+ msg "Uploading $_tarball"
+ scp "$SRCDEST"/$_tarball dev.alpinelinux.org:/archive/$pkgname/
+}
+
prepare() {
local i
cd "$_builddir"
@@ -52,5 +71,5 @@ tools() {
}
-md5sums="f5d31df70eb7cc522a5fa2fe06336022 yajl-2.0.3.tar.gz
+md5sums="2e66ad7d668423875aeeb4c1b206e385 yajl-2.0.4.tar.gz
64ae0008a567c3246ce805b6495d4c54 libm.patch"