aboutsummaryrefslogtreecommitdiffstats
path: root/testing/asterisk
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-03-12 18:01:50 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-03-12 18:01:50 +0000
commitc50ec9a00037262f561e677d6dfc9733e5e174a9 (patch)
treee112e71f1fbd3374581630de4982bbaa2f272c5f /testing/asterisk
parentc4a61b70d3194fe0cf90e5945bb83842fec96c28 (diff)
downloadaports-c50ec9a00037262f561e677d6dfc9733e5e174a9.tar.bz2
aports-c50ec9a00037262f561e677d6dfc9733e5e174a9.tar.xz
testing/asterisk: split pgsql and odbc modules to subpackages
Diffstat (limited to 'testing/asterisk')
-rw-r--r--testing/asterisk/APKBUILD31
1 files changed, 28 insertions, 3 deletions
diff --git a/testing/asterisk/APKBUILD b/testing/asterisk/APKBUILD
index 736004ab9a..3d6bbac6aa 100644
--- a/testing/asterisk/APKBUILD
+++ b/testing/asterisk/APKBUILD
@@ -7,9 +7,10 @@ pkgdesc="Asterisk: A Module Open Source PBX System"
url="http://www.asterisk.org/"
license="GPL"
depends="ncurses popt zlib newt dahdi-linux dahdi-tools libltdl"
-makedepends="autoconf automake libtool ncurses-dev popt-dev newt-dev zlib-dev postgresql-dev unixodbc-dev dahdi-tools-dev libpri-dev"
+makedepends="autoconf automake libtool ncurses-dev popt-dev newt-dev zlib-dev
+ postgresql-dev unixodbc-dev dahdi-tools-dev libpri-dev g++"
install="$pkgname.pre-install $pkgname.post-install"
-subpackages="$pkgname-doc"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-pgsql $pkgname-odbc"
source="http://downloads.digium.com/pub/asterisk/releases/$pkgname-$pkgver.tar.gz
asterisk-01-1.6.0-gsm-pic.patch
asterisk-02-1.6.0-uclibc.patch
@@ -41,7 +42,8 @@ build() {
--disable-xmldoc --with-gsm=internal \
--without-iconv --with-popt --with-z --with-newt \
--with-odbc --with-postgres \
- --with-dahdi --with-pri --with-tonezone
+ --with-dahdi --with-pri --with-tonezone \
+ || return 1
# and figure out which modules to build
rm menuselect.makeopts
@@ -53,6 +55,29 @@ build() {
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="uclibc asterisk libpq zlib"
+ install=
+ _find_and_move '*_pgsql*'
+}
+
+odbc() {
+ depends="uclibc asterisk unixodbc"
+ install=
+ _find_and_move '*odbc*'
+}
+
+
md5sums="29f7285b673d52b49d91c8e797acbbb0 asterisk-1.6.1-rc1.tar.gz
97b39fd9777a2521d4f9f095482b7ac2 asterisk-01-1.6.0-gsm-pic.patch
53b0b2a1527972722a50c8c5b560e63e asterisk-02-1.6.0-uclibc.patch