1 # Contributor: Alessio Biancalana <dottorblaster@gmail.com>
6 pkgdesc="A complete PBX solution"
8 url="http://www.asterisk.org"
10 depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl')
11 makedepends=('postgresql' 'unixodbc' 'sqlite3')
12 optdepends=('libpri' 'libss7' 'openr2' 'iksemel')
13 backup=(etc/asterisk/asterisk.conf)
14 source=(http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$pkgver.tar.gz \
17 install=$pkgname.install
18 md5sums=('6b52336b9dc01eeecb9de2eb2818e127'
19 '59146273738605f1e011d8e7bed3561a'
20 '486e07a0a1405ea25ec5b1736034653e')
23 cd ${srcdir}/${pkgname}-${pkgver}
24 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
29 cd ${srcdir}/${pkgname}-${pkgver}
30 make DESTDIR=${pkgdir} install || return 1
31 make DESTDIR=${pkgdir} samples || return 1
33 (cd ${pkgdir}/etc/asterisk
34 # for i in `ls`; do [ $i = "asterisk.conf" ] || mv $i $i.default; done
35 ls -I asterisk.conf | xargs -I '{}' mv '{}' '{}.default')
36 # cp ${srcdir}/modules.conf modules.conf
37 sed -i -e "s/\/var\/run/\/var\/run\/asterisk/" $startdir/pkg/etc/asterisk/asterisk.conf
39 install -D -m 755 ${srcdir}/asterisk ${pkgdir}/etc/rc.d/asterisk
40 install -D -m 644 ${srcdir}/asterisk.logrotated ${pkgdir}/etc/logrotate.d/asterisk