X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id B33B5DC19A5 for ; Mon, 12 Mar 2012 15:50:20 +0000 (UTC) Received: by eaaf13 with SMTP id f13so1275337eaa.13 for ; Mon, 12 Mar 2012 08:50:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=TV8f6xNi7UE8qyjJGCNBfuQmKG06qw2SIDVCv5qeVxw=; b=oaWYFZDZDf7f32cj/fJAaAjDtKn9RyrBUo0e3tCLgjfQelfhxoE6tFlsYsgZU770vH fPi0FpSJ5b3m5QtU/lO+FR2kKX9/2VuhKx+4TA/GZLf0LgoifDFgISoNKnxT8UMr3mhw V2RZhFxAaxSVZCCBSyNhQ+DQA2iBUHIY0q5gnP9lgugbOiYoRozVHFWQj6ORRnUBHWKQ kqbPcQzDbsFXJLcgyQdP9DvC2JEHEyvWw8lErAzttKTHFT1LCJ/BOt7KYIh9PGDpUNuS 2LITgCLbba1SOIX8yxDbiBPJPrflqVHNK4jrIDrpI3eBI+YwHhtEMR3+ylJFJOYCBlT0 TNSg== Received: by 10.50.170.104 with SMTP id al8mr857754igc.9.1331567418267; Mon, 12 Mar 2012 08:50:18 -0700 (PDT) Received: from brooklyn64.my.domain (c-24-13-255-202.hsd1.il.comcast.net. [24.13.255.202]) by mx.google.com with ESMTPS id vr4sm21930400igb.1.2012.03.12.08.50.16 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Mar 2012 08:50:17 -0700 (PDT) From: Cameron Banta To: alpine-devel@lists.alpinelinux.org Cc: Cameron Banta Subject: [alpine-devel] [PATCH] main/freeswitch: add snapshot to APKBUILD Date: Mon, 12 Mar 2012 15:50:12 +0000 Message-Id: <1331567412-29743-1-git-send-email-cbanta@gmail.com> X-Mailer: git-send-email 1.7.9.3 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- main/freeswitch/APKBUILD | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/main/freeswitch/APKBUILD b/main/freeswitch/APKBUILD index bf39232..2d426c7 100644 --- a/main/freeswitch/APKBUILD +++ b/main/freeswitch/APKBUILD @@ -1,11 +1,10 @@ # Contributor: Michael Mason # Maintainer: Natanael Copa 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 -- 1.7.9.3 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---