mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
66 lines
2.3 KiB
Bash
66 lines
2.3 KiB
Bash
# Maintainer: Xavier Devlamynck <magicrhesus@ouranos.be>
|
|
|
|
#ALARM: moonman
|
|
# -based on asterisk-ltr in aur
|
|
# -added makeflags =-j1, otherwise it fails
|
|
# -added asterisk.service for systemd
|
|
# -removed dahdi, libpri from deps
|
|
# -changed default pid file location to
|
|
# /var/run/asterisk (as in asterisk (non ltr) in aur)
|
|
# -asterisk.logrotated was forgotten to be included in package - fixed
|
|
|
|
pkgname=asterisk
|
|
pkgver=11.2.1
|
|
pkgrel=1
|
|
pkgdesc="A complete PBX solution (Long Term Support)"
|
|
arch=('arm')
|
|
groups=()
|
|
url="http://www.asterisk.org"
|
|
license=('GPL2')
|
|
depends=('libusb' 'libxml2' 'openssl' 'curl' 'gmime' 'iksemel' 'libldap' 'net-snmp' 'postgresql-libs' 'speex' 'sqlite' 'libcap' 'libvorbis' 'unixodbc' 'libnewt' 'libresample' 'alsa-lib' 'popt' 'lua' 'neon' 'jack' 'sdl' 'gsm')
|
|
optdepends=('radiusclient-ng' 'libpri' 'dahdi' 'dahdi-tools')
|
|
makedepends=('linux-headers')
|
|
conflicts=('asterisk' 'asterisk16' 'asterisk18' 'asterisk10' 'asterisk-svn')
|
|
provides=('asterisk')
|
|
options=(makeflags)
|
|
MAKEFLAGS="-j1"
|
|
install=${pkgname}.install
|
|
source=(http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-${pkgver}.tar.gz
|
|
asterisk
|
|
asterisk.logrotated
|
|
asterisk.service)
|
|
sha1sums=('54959f247d7c881507eb08a0d16ffd0f86eef536'
|
|
'19ca30d5dde7ba90e56c21abfe4fb9fcf2529e98'
|
|
'38a772e20c9a1987faf433ca38c8536012fbada0'
|
|
'550f6cf4bb125d9e55f5e78b6af07ca2d15a1092')
|
|
build() {
|
|
cd $srcdir/asterisk-${pkgver}
|
|
|
|
msg "Configuring..."
|
|
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
|
|
|
|
msg "Building..."
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd ${srcdir}/asterisk-${pkgver}
|
|
make DESTDIR=${pkgdir} install
|
|
make DESTDIR=${pkgdir} samples
|
|
|
|
(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')
|
|
# cp ${srcdir}/modules.conf modules.conf
|
|
sed -i -e "s/\/var\/run/\/var\/run\/asterisk/" $startdir/pkg/etc/asterisk/asterisk.conf
|
|
|
|
mkdir -p "$pkgdir/etc/tmpdiles.d"
|
|
echo "d /run/asterisk 0775 root asterisk" > $pkgdir/etc/tmpdiles.d/asterisk.conf
|
|
|
|
install -D "$srcdir/asterisk" "$pkgdir/etc/rc.d/asterisk"
|
|
install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
|
install -Dm644 "$srcdir/asterisk.logrotated" "$pkgdir/etc/logrotate.d/asterisk"
|
|
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|