wok-6.x annotate asterisk/receipt @ rev 4593
asterisk: build chan_dahdi.so
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Dec 11 23:53:05 2009 +0100 (2009-12-11) |
parents | cf4c2aefe16c |
children | 6f24a0a3f131 |
rev | line source |
---|---|
pascal@1187 | 1 # SliTaz package receipt. |
pascal@1187 | 2 |
pascal@1187 | 3 PACKAGE="asterisk" |
pascal@4111 | 4 VERSION="1.6.1.6" |
pascal@1423 | 5 CATEGORY="misc" |
pascal@1187 | 6 SHORT_DESC="Open Source PBX and telephony toolkit." |
pascal@1187 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@4111 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@4111 | 9 WEB_SITE="http://www.asterisk.org/" |
pascal@4111 | 10 WGET_URL="http://downloads.asterisk.org/pub/telephony/asterisk/$TARBALL" |
pascal@1187 | 11 DEPENDS="openssl ncurses zlib libogg libvorbis curl newt libusb alsa-lib \ |
pascal@1187 | 12 speex iksemel spandsp tiff radiusclient-ng nbs freetds libpostgresqlclient \ |
pankso@4158 | 13 libmysqlclient libunixODBC popt dahdi libpri lua" |
pascal@4111 | 14 BUILD_DEPENDS="libvorbis-dev curl-dev speex-dev alsa-lib-dev popt-dev \ |
pascal@4593 | 15 libpri-dev spandsp-dev lua-dev dahdi-dev" |
pascal@1187 | 16 CONFIG_FILES="/etc/asterisk" |
pascal@1187 | 17 |
pascal@4111 | 18 # Rules to configure and make the package. |
pascal@4111 | 19 # |
pascal@4111 | 20 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig' |
pascal@4111 | 21 # |
pascal@4111 | 22 compile_rules() |
pascal@1187 | 23 { |
pascal@4111 | 24 cd $src |
pascal@4195 | 25 sed -i 's|lua5.1/||' pbx/pbx_lua.c |
pascal@4111 | 26 ./configure \ |
pascal@4111 | 27 --prefix=/usr \ |
pascal@4111 | 28 --sysconfdir=/etc \ |
pascal@4111 | 29 --without-pwlib \ |
pascal@4593 | 30 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \ |
pascal@4111 | 31 $CONFIGURE_ARGS && |
pascal@4111 | 32 make && |
pascal@4111 | 33 make DESTDIR=$PWD/_pkg install && |
pascal@4111 | 34 make DESTDIR=$PWD/_pkg samples && |
pascal@4111 | 35 cd contrib/utils && |
pascal@4111 | 36 gcc rawplayer.c -o $src/_pkg/usr/bin/rawplayer |
pascal@1187 | 37 } |
pascal@1187 | 38 |
pascal@1187 | 39 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1187 | 40 genpkg_rules() |
pascal@1187 | 41 { |
pascal@4111 | 42 mkdir -p $fs/usr |
pascal@4111 | 43 cp -a $_pkg/etc $fs |
pascal@4111 | 44 cp -a $_pkg/var $fs |
pascal@4111 | 45 cp -a $_pkg/usr/bin $fs/usr |
pascal@4111 | 46 cp -a $_pkg/usr/lib $fs/usr |
pascal@4111 | 47 cp -a $_pkg/usr/sbin $fs/usr |
pascal@1806 | 48 cp -a stuff/* $fs |
pascal@1806 | 49 } |
pascal@1806 | 50 |
pascal@1806 | 51 # Rules to configure package |
pascal@1806 | 52 setup_rules() |
pascal@1806 | 53 { |
pascal@1806 | 54 case "$2" in |
pascal@1806 | 55 mysql_host) |
pascal@1806 | 56 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf |
pascal@1920 | 57 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf |
pascal@1806 | 58 ;; |
pascal@1806 | 59 mysql_user) |
pascal@1806 | 60 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf |
pascal@1920 | 61 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf |
pascal@1806 | 62 ;; |
pascal@1806 | 63 mysql_password) |
pascal@1806 | 64 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf |
pascal@1920 | 65 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf |
pascal@1806 | 66 ;; |
pascal@1806 | 67 mysql_database) |
pascal@1920 | 68 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \ |
pascal@1806 | 69 $1/etc/asterisk/cdr_mysql.conf |
pascal@1806 | 70 ;; |
pascal@1920 | 71 pgsql_host) |
pascal@1920 | 72 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 73 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf |
pascal@1920 | 74 ;; |
pascal@1920 | 75 pgsql_user) |
pascal@1920 | 76 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 77 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf |
pascal@1920 | 78 ;; |
pascal@1920 | 79 pgsql_password) |
pascal@1920 | 80 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 81 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf |
pascal@1920 | 82 ;; |
pascal@1920 | 83 pgsql_database) |
pascal@1920 | 84 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \ |
pascal@1920 | 85 $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 86 ;; |
pascal@1806 | 87 *) cat <<EOT |
pascal@1806 | 88 mysql_host hostname or ip of mysql server |
pascal@1806 | 89 mysql_user username to connect to mysql server |
pascal@1806 | 90 mysql_password password to connect to mysql server |
pascal@1806 | 91 mysql_database database used by asterisk |
pascal@1920 | 92 pgsql_host hostname or ip of postgresql server |
pascal@1920 | 93 pgsql_user username to connect to postgresql server |
pascal@1920 | 94 pgsql_password password to connect to postgresql server |
pascal@1920 | 95 pgsql_database database used by asterisk |
pascal@1806 | 96 EOT |
pascal@1806 | 97 ;; |
pascal@1806 | 98 esac |
pascal@1187 | 99 } |