PKGBUILDs/aur/asterisk/PKGBUILD

65 lines
2.8 KiB
Bash
Raw Normal View History

2011-03-30 00:44:18 +00:00
# Contributor: Alessio Biancalana <dottorblaster@gmail.com>
# ALARM: pepedog
2011-03-30 00:44:18 +00:00
# - added --build option to configure
# - added arm.patch
2011-03-30 00:44:18 +00:00
plugrel=1
2011-03-30 00:44:18 +00:00
pkgname=asterisk
pkgver=1.8.2.3
pkgrel=2
2011-03-30 00:44:18 +00:00
pkgdesc="A complete PBX solution"
arch=('i686' 'x86_64')
url="http://www.asterisk.org"
license=('GPL')
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')
2011-03-30 00:44:18 +00:00
makedepends=('postgresql' 'unixodbc' 'sqlite3')
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)
2011-03-30 00:44:18 +00:00
install=$pkgname.install
md5sums=('e394b63dd71c07497620dc12883e0b80'
'300efd73ec5e627889786deace5a2094'
'486e07a0a1405ea25ec5b1736034653e'
'28c31f22bd82e15c934e1a704e0d2066')
2011-03-30 00:44:18 +00:00
build() {
cd ${srcdir}/${pkgname}-${pkgver}
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
2011-03-30 00:44:18 +00:00
make || return 1
}
package(){
cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install || return 1
make DESTDIR=${pkgdir} samples || return 1
cd ${pkgdir}/etc/asterisk
2011-03-30 00:44:18 +00:00
# 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
}