aur/asterisk to 1.8.2.3-2 (pepedog patch)

This commit is contained in:
Kevin Mihelich 2011-05-17 17:27:59 -04:00
parent fb2a7dc0c8
commit 337006a392
2 changed files with 64 additions and 15 deletions

View file

@ -1,31 +1,52 @@
# Contributor: Alessio Biancalana <dottorblaster@gmail.com>
# PlugApps: pepe le dog
# ALARM: pepedog
# - added --build option to configure
# - added arm.patch
plugrel=2
plugrel=1
pkgname=asterisk
pkgver=1.8.2.3
pkgrel=1.${plugrel}
pkgrel=2
pkgdesc="A complete PBX solution"
arch=('i686' 'x86_64')
url="http://www.asterisk.org"
license=('GPL')
depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl')
depends=('alsa-lib' 'curl' 'gmime' 'iksemel' 'libcap' 'libldap' 'libnewt' 'libusb' \
'libvorbis' 'libxml2' 'net-snmp' 'openssl' 'popt' 'postgresql-libs' 'speex' 'sqlite3' \
'unixodbc' 'python-pip' 'apache' 'php-pear')
makedepends=('postgresql' 'unixodbc' 'sqlite3')
backup=(etc/asterisk/asterisk.conf)
source=(http://downloads.digium.com/pub/asterisk/releases/asterisk-$pkgver.tar.gz \
asterisk \
asterisk.logrotated)
backup=(etc/asterisk/{adsi,agents,ais,alarmreceiver,alsa,amd,app_mysql,asterisk,calendar}.conf
etc/asterisk/{ccss,cdr_adaptive_odbc,cdr,cdr_custom,cdr_manager,cdr_mysql,cdr_odbc,cdr_pgsql,cdr_sqlite3_custom,cdr_syslog}.conf
etc/asterisk/{cdr_tds,cel,cel_custom,cel_odbc,cel_pgsql,cel_sqlite3_custom,cel_tds,chan_dahdi,chan_mobile,chan_ooh323}.conf
etc/asterisk/{cli_aliases,cli,cli_permissions,codecs,console,dbsep,dnsmgr,dsp,dundi,enum}.conf
etc/asterisk/{extconfig,extensions,extensions_minivm,features,followme,func_odbc,gtalk,h323,http,iax,iaxprov}.conf
etc/asterisk/{indications,jabber,jingle,logger,manager,meetme,mgcp,minivm,misdn,modules}.conf
etc/asterisk/{musiconhold,muted,osp,oss,phone,phoneprov,queuerules,queues,res_config_mysql,res_config_sqlite,res_curl}.conf
etc/asterisk/{res_fax,res_ldap,res_odbc,res_pgsql,res_pktccops,res_snmp,res_stun_monitor,rpt,rtp,say,sip,sip_notify}.conf
etc/asterisk/{skinny,sla,smdi,udptl,unistim,usbradio,users,voicemail,vpb}.conf
etc/asterisk/extensions.lua
etc/asterisk/extensions.ael
etc/asterisk/telcordia-1.adsi)
source=(http://downloads.digium.com/pub/asterisk/releases/asterisk-$pkgver.tar.gz
asterisk
asterisk.logrotated
arm.patch)
install=$pkgname.install
md5sums=('e394b63dd71c07497620dc12883e0b80'
'59146273738605f1e011d8e7bed3561a'
'486e07a0a1405ea25ec5b1736034653e')
'300efd73ec5e627889786deace5a2094'
'486e07a0a1405ea25ec5b1736034653e'
'28c31f22bd82e15c934e1a704e0d2066')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=arm-unknown-linux-gnueabi
patch -Np1 -i ../arm.patch || return 1
[[ $CARCH == "arm" ]] && CONFIGFLAG="--build=arm-unknown-linux-gnueabi"
[[ $CARCH == "armv7" ]] && CONFIGFLAG="--build=armv7l-unknown-linux-gnueabi"
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var $CONFIGFLAG
make || return 1
}
@ -34,12 +55,10 @@ package(){
make DESTDIR=${pkgdir} install || return 1
make DESTDIR=${pkgdir} samples || return 1
(cd ${pkgdir}/etc/asterisk
# for i in `ls`; do [ $i = "asterisk.conf" ] || mv $i $i.default; done
ls -I asterisk.conf | xargs -I '{}' mv '{}' '{}.default')
cd ${pkgdir}/etc/asterisk
# cp ${srcdir}/modules.conf modules.conf
sed -i -e "s/\/var\/run/\/var\/run\/asterisk/" $startdir/pkg/etc/asterisk/asterisk.conf
install -D -m 755 ${srcdir}/asterisk ${pkgdir}/etc/rc.d/asterisk
install -D -m 644 ${srcdir}/asterisk.logrotated ${pkgdir}/etc/logrotate.d/asterisk
}
}

30
aur/asterisk/arm.patch Normal file
View file

@ -0,0 +1,30 @@
diff -urN asterisk-1.8.2.3/main/utils.c asterisk-1.8.2.3-2/main/utils.c
--- asterisk-1.8.2.3/main/utils.c 2011-01-20 19:47:11.000000000 +0000
+++ asterisk-1.8.2.3-2/main/utils.c 2011-04-24 20:34:55.000000000 +0100
@@ -24,6 +24,8 @@
*/
#include "asterisk.h"
+/* Temporary declaration for ARM cpus ONLY (this belongs in the make environment) */
+#define __arm__ 1
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 303104 $")
@@ -1632,7 +1634,7 @@
}
result = (*pool_head)->base + (*pool_head)->used;
-#ifdef __sparc__
+#if defined(__sparc__) || defined(__arm__)
/* SPARC requires that the allocation field be aligned. */
if ((long) result % sizeof(ast_string_field_allocation)) {
result++;
@@ -1713,7 +1715,7 @@
}
} else {
target = (*pool_head)->base + (*pool_head)->used + sizeof(ast_string_field_allocation);
-#ifdef __sparc__
+#if defined(__sparc__) || defined(__arm__)
if ((long) target % sizeof(ast_string_field_allocation)) {
target++;
space--;