aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorCameron Banta <cbanta@gmail.com>2012-03-12 15:50:12 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-03-12 16:05:01 +0000
commit364fe89f0abfa7a82850c0365ab678203f6d36b9 (patch)
tree5b35ef7282359b441dd7bdd5557665999f481452 /main
parent23d8dd2d13e5d92b606af30f639064db7ae5c0f6 (diff)
downloadaports-364fe89f0abfa7a82850c0365ab678203f6d36b9.tar.bz2
aports-364fe89f0abfa7a82850c0365ab678203f6d36b9.tar.xz
main/freeswitch: add snapshot to APKBUILD
Diffstat (limited to 'main')
-rw-r--r--main/freeswitch/APKBUILD28
1 files changed, 22 insertions, 6 deletions
diff --git a/main/freeswitch/APKBUILD b/main/freeswitch/APKBUILD
index bf39232c75..2d426c7fe6 100644
--- a/main/freeswitch/APKBUILD
+++ b/main/freeswitch/APKBUILD
@@ -1,11 +1,10 @@
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=freeswitch
-pkgver=1.0.7_p20120309
-_ver=${pkgver%_p*}
-_snapshot=${pkgver#*_p}
-_commit=ca60afaa1900abdeeb3a105de6cd53f098a3dd01
-pkgrel=1
+_snapshot=20120312
+pkgver=1.0.7_p${_snapshot}
+_commit=5e4a514531de2a1d8040c3d306a9e8de426de566
+pkgrel=0
pkgdesc="A communications platform written in C from the ground up"
url="http://www.freeswitch.org"
arch="all"
@@ -27,6 +26,23 @@ source="http://git.freeswitch.org/git/freeswitch/snapshot/$pkgname-$_commit.tar.
freeswitch.initd
"
+snapshot() {
+ current_head=$(curl http://git.freeswitch.org/git/freeswitch/patch/ | head -n1 | cut -d" " -f2)
+ current_snapshot=$(grep -e "^_snapshot=.*$" APKBUILD | cut -d"=" -f2)
+ new_snapshot=$(date +"%Y%m%d")
+ if [ "$current_snapshot" = "$new_snapshot" ]; then
+ old_pkgrel=$(grep -e "^pkgrel=.*$" APKBUILD | cut -d"=" -f2)
+ new_pkgrel=$(expr $old_pkgrel + 1 )
+ else
+ new_pkgrel=0
+ fi
+ sed -i "s/^_commit=.*$/_commit=$current_head/" APKBUILD
+ sed -i "s/^pkgrel=.*$/pkgrel=$new_pkgrel/" APKBUILD
+ sed -i "s/^_snapshot=.*$/_snapshot=$new_snapshot/" APKBUILD
+ abuild fetch
+ abuild checksum
+}
+
_builddir="$srcdir/$pkgname-$_commit"
prepare() {
@@ -153,7 +169,7 @@ conf() {
mkdir -p "$pkgdir"/etc/freeswitch/scripts
}
-md5sums="9d539a3cbbc56cef870946506839603c freeswitch-ca60afaa1900abdeeb3a105de6cd53f098a3dd01.tar.bz2
+md5sums="8c0609c00039513a1a81eda685845b37 freeswitch-5e4a514531de2a1d8040c3d306a9e8de426de566.tar.bz2
11883affe0839a8e15fe680aeb11b86e freeswitch-mod_shout-textrels.patch
769eaa127d4dbae687dc4aa961a8cc70 0002-mod_lua-alpine-module-search-path.patch
94516a9473e2283ab201f38cb2756741 modules.conf