From dfb8a3618ae18157666d1c7e5ba194e3b30a670c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Wed, 23 Jan 2013 13:37:10 +0200 Subject: main/asterisk: upgrade to 11.2.1 Regression fixes from upstream. Rebase uclibc daemon patch, and modify APKBUILD to use patches for the minor releases. --- main/asterisk/100-uclibc-daemon.patch | 10 ++++++---- main/asterisk/APKBUILD | 22 +++++++++++++++++++--- 2 files changed, 25 insertions(+), 7 deletions(-) (limited to 'main/asterisk') diff --git a/main/asterisk/100-uclibc-daemon.patch b/main/asterisk/100-uclibc-daemon.patch index a1e2b0b20e..f3c6053501 100644 --- a/main/asterisk/100-uclibc-daemon.patch +++ b/main/asterisk/100-uclibc-daemon.patch @@ -1,13 +1,14 @@ -diff -Nru asterisk-1.6.1-beta4.org/main/asterisk.c asterisk-1.6.1-beta4/main/asterisk.c ---- asterisk-1.6.1-beta4.org/main/asterisk.c 2008-12-12 23:05:58.000000000 +0100 -+++ asterisk-1.6.1-beta4/main/asterisk.c 2008-12-23 15:28:21.000000000 +0100 -@@ -3295,9 +3295,40 @@ +--- asterisk-11.2.1-orig/main/asterisk.c ++++ asterisk-11.2.1/main/asterisk.c +@@ -3891,11 +3891,41 @@ #if HAVE_WORKING_FORK if (ast_opt_always_fork || !ast_opt_no_fork) { #ifndef HAVE_SBIN_LAUNCHD +#ifndef __UCLIBC__ if (daemon(1, 0) < 0) { fprintf(stderr, "daemon() failed: %s\n", strerror(errno)); +- } else { +- ast_mainpid = getpid(); } +#else + /* @@ -39,6 +40,7 @@ diff -Nru asterisk-1.6.1-beta4.org/main/asterisk.c asterisk-1.6.1-beta4/main/ast + close(fd); + } +#endif ++ ast_mainpid = getpid(); #else fprintf(stderr, "Mac OS X detected. Use 'launchctl load /Library/LaunchDaemon/org.asterisk.asterisk.plist'.\n"); #endif diff --git a/main/asterisk/APKBUILD b/main/asterisk/APKBUILD index 3243d0fa75..799a54e7b7 100644 --- a/main/asterisk/APKBUILD +++ b/main/asterisk/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Timo Teras # Maintainer: Timo Teras pkgname=asterisk -pkgver=11.2.0 +pkgver=11.2.1 pkgrel=0 pkgdesc="Asterisk: A Module Open Source PBX System" pkgusers="asterisk" @@ -19,7 +19,18 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-pgsql $pkgname-odbc $pkgname-tds $pkgname-fax $pkgname-sample-config:sample $pkgname-sounds-moh:sound_moh $pkgname-sounds-en:sound_en $pkgname-mobile" -source="http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${pkgver/_/-}.tar.gz + +_download="http://downloads.asterisk.org/pub/telephony/asterisk/releases" +_z=${pkgver##*.} +_xy=${pkgver%.$_z} +_patches="" +while [ $_z -gt 0 ]; do + _patches="$_download/asterisk-$_xy.$_z-patch.gz $_patches" + _z=$((_z-1)) +done + +source="$_download/asterisk-$_xy.0.tar.gz + $_patches 100-uclibc-daemon.patch 101-caps-uclibc.patch ASTERISK-18995.patch @@ -33,10 +44,14 @@ source="http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$ _builddir="$srcdir/$pkgname-${pkgver/_/-}" prepare() { + cd "$srcdir" + mv "$pkgname-$_xy.0" "$pkgname-${pkgver/_/-}" + cd "$_builddir" for i in $source; do case $i in *.patch) msg "$i"; patch -p1 -i "$srcdir"/$i || return 1;; + *-patch.gz) msg "${i##*/}"; gunzip < "$srcdir"/${i##*/} | patch -p0 || return 1;; esac done @@ -183,7 +198,8 @@ sound_en() { } md5sums="3d3da6016e3b238cd7ea3bf0df51403d asterisk-11.2.0.tar.gz -38c46521ad8a1c06dd79e481cc50c82c 100-uclibc-daemon.patch +ba86725f31af9e518ddafbb659a3a647 asterisk-11.2.1-patch.gz +837fc3bc835699462a8d2a7a16b9b6a3 100-uclibc-daemon.patch 6e1129e30c4fd2c25c86c81685a485a9 101-caps-uclibc.patch bc6713f5434e07b79d3afdd155461d72 ASTERISK-18995.patch 146befabe95798a67c58d8ac00d397a6 ASTERISK-19109.patch -- cgit v1.2.3