diff options
Diffstat (limited to 'main/asterisk/APKBUILD')
-rw-r--r-- | main/asterisk/APKBUILD | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/main/asterisk/APKBUILD b/main/asterisk/APKBUILD new file mode 100644 index 0000000000..7e8bb1d182 --- /dev/null +++ b/main/asterisk/APKBUILD @@ -0,0 +1,96 @@ +# Contributor: Timo Teras <timo.teras@iki.fi> +# Maintainer: Timo Teras <timo.teras@iki.fi> +pkgname=asterisk +pkgver=1.6.0.10 +pkgrel=1 +pkgdesc="Asterisk: A Module Open Source PBX System" +url="http://www.asterisk.org/" +license="GPL" +depends= +makedepends="autoconf automake libtool ncurses-dev popt-dev newt-dev zlib-dev + postgresql-dev unixodbc-dev dahdi-tools-dev libpri-dev tar + freetds-dev openssl-dev" +install="$pkgname.pre-install $pkgname.post-install" +subpackages="$pkgname-dev $pkgname-doc $pkgname-pgsql $pkgname-odbc + $pkgname-tds" +source="http://downloads.digium.com/pub/asterisk/releases/$pkgname-$pkgver.tar.gz + 100-uclibc-daemon.patch + 101-caps-uclibc.patch + 102-gsm-pic.patch + 103-rundir.patch + asterisk.pre-install + asterisk.post-install + asterisk.initd + asterisk.confd" + +build() { + cd "$srcdir/$pkgname-$pkgver" + for i in ../[1-9]*.patch; do + msg "Apply $i" + patch -p1 < $i || return 1 + done + + sed -i -e 's/PBX_ICONV=1/PBX_ICONV=0/g' configure.ac + + ./bootstrap.sh + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --localstatedir=/var \ + --disable-xmldoc --with-gsm=internal \ + --without-iconv --with-popt --with-z --with-newt \ + --with-odbc --with-postgres --with-tds \ + --with-dahdi --with-pri --with-tonezone \ + --without-x11 \ + || return 1 + + # and figure out which modules to build + rm menuselect.makeopts + make menuselect.makeopts + make -j1 || return 1 + make -j1 DESTDIR="$pkgdir" install + + install -d "$pkgdir"/var/run/asterisk + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname +} + +_find_and_move() { + local pattern="$1" + cd "$pkgdir" || return 1 + find -name "$pattern" -type f | while read f; do + local dest="$subpkgdir/${f%/*}" + mkdir -p "$dest" + mv "$f" "$dest" + done +} + +pgsql() { + depends= + install= + _find_and_move '*_pgsql*' +} + +odbc() { + depends= + install= + _find_and_move '*odbc*' +} + +tds() { + depends= + install= + _find_and_move '*_tds*' +} + +md5sums="c5e3ceaea876e602b1057d751278b497 asterisk-1.6.0.10.tar.gz +b00c9d98ce2ad445501248a197c6e436 100-uclibc-daemon.patch +929f740db7043b4553544ebcc7315c91 101-caps-uclibc.patch +97b39fd9777a2521d4f9f095482b7ac2 102-gsm-pic.patch +5008f51c737ec91f5047519bc9f25b85 103-rundir.patch +b4a97cb1ec3cc3f71a10ce8c067ab430 asterisk.pre-install +62ecffc90b6714b85f377d1fac73c58b asterisk.post-install +c618b7fdf4a9edf4cde6d8ccd1e32ee6 asterisk.initd +ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd" |