2007-10-02 17:30:31 -04:00
|
|
|
# Description: PBX Software implementation
|
|
|
|
# URL: http://www.asterisk.org
|
|
|
|
# Maintainer: Alan Mizrahi, alan at mizrahi dot com dot ve
|
2010-11-24 01:58:50 +09:00
|
|
|
# Depends on: openssl, ncurses, ilbc
|
2007-10-02 17:30:31 -04:00
|
|
|
|
2011-07-25 18:22:45 +09:00
|
|
|
name=asterisk14
|
2010-12-18 05:37:45 +09:00
|
|
|
version=1.4.38
|
2010-09-13 18:05:43 +09:00
|
|
|
release=1
|
|
|
|
source=(
|
|
|
|
http://downloads.digium.com/pub/$name/releases/$name-$version.tar.gz
|
|
|
|
asterisk.rc
|
|
|
|
asterisk-config.patch
|
2010-11-24 01:58:50 +09:00
|
|
|
asterisk-ilbc.patch
|
2010-09-13 18:05:43 +09:00
|
|
|
)
|
2007-10-02 17:30:31 -04:00
|
|
|
|
|
|
|
build () {
|
|
|
|
cd $name-$version
|
2008-07-26 12:02:12 -04:30
|
|
|
|
2010-05-21 10:58:25 +09:00
|
|
|
# Menuselect configuration patch to remove default sounds and moh
|
|
|
|
patch -p1 -i $SRC/asterisk-config.patch
|
|
|
|
|
2010-11-24 01:58:50 +09:00
|
|
|
# Add ilbc codec
|
|
|
|
patch -p1 -i $SRC/asterisk-ilbc.patch
|
|
|
|
|
2007-10-02 17:30:31 -04:00
|
|
|
./configure --prefix=/usr --with-ncurses --with-ssl
|
|
|
|
make
|
|
|
|
make DESTDIR=$PKG install
|
|
|
|
make DESTDIR=$PKG samples
|
2010-05-20 15:15:54 +09:00
|
|
|
|
2007-10-02 17:30:31 -04:00
|
|
|
mv $PKG/usr/share/man $PKG/usr
|
|
|
|
install -m 755 -D $SRC/asterisk.rc $PKG/etc/rc.d/asterisk
|
|
|
|
rmdir $PKG/usr/{share,bin}
|
2008-07-26 12:02:12 -04:30
|
|
|
rm -rf $PKG/var/spool/asterisk/voicemail/default/1234
|
|
|
|
|
2010-05-21 10:58:25 +09:00
|
|
|
# Remove empty directory holders
|
|
|
|
rmdir $PKG/var/lib/asterisk/sounds/*
|
2008-07-26 12:02:12 -04:30
|
|
|
|
2010-05-21 10:58:25 +09:00
|
|
|
# change runtime dir
|
|
|
|
sed -i -e 's|^astrundir => .*|astrundir => /var/run/asterisk|' $PKG/etc/asterisk/asterisk.conf
|
2007-10-02 17:30:31 -04:00
|
|
|
mkdir -p $PKG/var/run/asterisk
|
2010-05-21 10:58:25 +09:00
|
|
|
|
|
|
|
# create empty astdb database
|
|
|
|
touch $PKG/var/lib/asterisk/astdb
|
|
|
|
|
|
|
|
# fix permissions
|
2007-10-02 17:30:31 -04:00
|
|
|
chown -R root:root $PKG
|
2007-10-08 23:43:27 -04:00
|
|
|
chown -R asterisk:asterisk $PKG/var/{lib,log,run,spool}/asterisk
|
2007-10-02 17:30:31 -04:00
|
|
|
}
|