wok annotate asterisk/receipt @ rev 2779
Add Fox Toolkit
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Apr 27 21:09:54 2009 +0200 (2009-04-27) |
parents | bd6010223726 |
children | 191da58082eb |
rev | line source |
---|---|
pascal@1187 | 1 # SliTaz package receipt. |
pascal@1187 | 2 |
pascal@1187 | 3 PACKAGE="asterisk" |
pascal@1327 | 4 VERSION="bristuff" |
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@1187 | 8 WEB_SITE="http://www.digium.com/" |
pascal@1187 | 9 WANTED="bristuff" |
pascal@1187 | 10 DEPENDS="openssl ncurses zlib libogg libvorbis curl newt libusb alsa-lib \ |
pascal@1187 | 11 speex iksemel spandsp tiff radiusclient-ng nbs freetds libpostgresqlclient \ |
pascal@2491 | 12 libmysqlclient libunixODBC mISDNuser popt zaptel" |
pascal@1187 | 13 CONFIG_FILES="/etc/asterisk" |
pascal@1187 | 14 |
pascal@1187 | 15 # Extract VERSION from WANTED package source |
pascal@1187 | 16 get_version() |
pascal@1187 | 17 { |
pascal@1187 | 18 eval $(grep ^AST_VER= $WOK/$WANTED/$WANTED-*/download.sh) |
pascal@1327 | 19 VERSION=$WANTED-$AST_VER |
pascal@1187 | 20 } |
pascal@1187 | 21 |
pascal@1187 | 22 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1187 | 23 genpkg_rules() |
pascal@1187 | 24 { |
pascal@1327 | 25 get_version |
pascal@1327 | 26 [ -d taz/$PACKAGE-$WANTED/fs ] && \ |
pascal@1327 | 27 mv taz/$PACKAGE-$WANTED taz/$PACKAGE-$VERSION |
pascal@1187 | 28 _pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd) |
pascal@1187 | 29 while read file; do |
pascal@1187 | 30 dir=$(dirname $file) |
pascal@1187 | 31 [ -d $fs$dir ] || mkdir -p $fs$dir |
pascal@1187 | 32 eval cp -a "$_pkg$file" $fs$dir |
pascal@1187 | 33 done < $_pkg/../$PACKAGE.files-list |
pascal@1187 | 34 for i in $fs/etc/asterisk/*.sample; do |
pascal@1187 | 35 mv $i ${i%.sample} |
pascal@1187 | 36 done |
pascal@1806 | 37 cp -a stuff/* $fs |
pascal@1806 | 38 } |
pascal@1806 | 39 |
pascal@1806 | 40 # Rules to configure package |
pascal@1806 | 41 setup_rules() |
pascal@1806 | 42 { |
pascal@1806 | 43 case "$2" in |
pascal@1806 | 44 mysql_host) |
pascal@1806 | 45 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf |
pascal@1920 | 46 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf |
pascal@1806 | 47 ;; |
pascal@1806 | 48 mysql_user) |
pascal@1806 | 49 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf |
pascal@1920 | 50 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf |
pascal@1806 | 51 ;; |
pascal@1806 | 52 mysql_password) |
pascal@1806 | 53 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf |
pascal@1920 | 54 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf |
pascal@1806 | 55 ;; |
pascal@1806 | 56 mysql_database) |
pascal@1920 | 57 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \ |
pascal@1806 | 58 $1/etc/asterisk/cdr_mysql.conf |
pascal@1806 | 59 ;; |
pascal@1920 | 60 pgsql_host) |
pascal@1920 | 61 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 62 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf |
pascal@1920 | 63 ;; |
pascal@1920 | 64 pgsql_user) |
pascal@1920 | 65 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 66 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf |
pascal@1920 | 67 ;; |
pascal@1920 | 68 pgsql_password) |
pascal@1920 | 69 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 70 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf |
pascal@1920 | 71 ;; |
pascal@1920 | 72 pgsql_database) |
pascal@1920 | 73 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \ |
pascal@1920 | 74 $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 75 ;; |
pascal@1806 | 76 *) cat <<EOT |
pascal@1806 | 77 mysql_host hostname or ip of mysql server |
pascal@1806 | 78 mysql_user username to connect to mysql server |
pascal@1806 | 79 mysql_password password to connect to mysql server |
pascal@1806 | 80 mysql_database database used by asterisk |
pascal@1920 | 81 pgsql_host hostname or ip of postgresql server |
pascal@1920 | 82 pgsql_user username to connect to postgresql server |
pascal@1920 | 83 pgsql_password password to connect to postgresql server |
pascal@1920 | 84 pgsql_database database used by asterisk |
pascal@1806 | 85 EOT |
pascal@1806 | 86 ;; |
pascal@1806 | 87 esac |
pascal@1187 | 88 } |