wok-current annotate asterisk/receipt @ rev 4672
Up: python-django (1.1.1)
author | Claudinei Pereira <claudinei@slitaz.org> |
---|---|
date | Tue Dec 29 18:25:53 2009 +0000 (2009-12-29) |
parents | b1acb4dc9a0a |
children | 92ec79fce82b |
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@4595 | 15 libpri-dev spandsp-dev lua-dev dahdi-dev postgresql-dev net-snmp-dev \ |
pascal@4615 | 16 libsdl-dev nbs-dev libogg-dev libogg speex spandsp iksemel iksemel-dev \ |
pascal@4615 | 17 gmime gmime-dev openssl-dev openssl unixODBC-dev unixODBC \ |
pascal@4615 | 18 openldap-dev openldap portaudio-dev portaudio" |
pascal@1187 | 19 CONFIG_FILES="/etc/asterisk" |
pascal@1187 | 20 |
pascal@4111 | 21 # Rules to configure and make the package. |
pascal@4111 | 22 # |
pascal@4111 | 23 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig' |
pascal@4111 | 24 # |
pascal@4111 | 25 compile_rules() |
pascal@1187 | 26 { |
pascal@4111 | 27 cd $src |
pascal@4615 | 28 sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c |
pascal@4615 | 29 sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' main/config.c |
pascal@4195 | 30 sed -i 's|lua5.1/||' pbx/pbx_lua.c |
pascal@4615 | 31 echo '' | contrib/scripts/get_ilbc_source.sh |
pascal@4615 | 32 sed -i '/codec_ilbc/{ns/no/yes/}' menuselect-tree |
pascal@4111 | 33 ./configure \ |
pascal@4111 | 34 --prefix=/usr \ |
pascal@4111 | 35 --sysconfdir=/etc \ |
pascal@4111 | 36 --without-pwlib \ |
pascal@4593 | 37 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \ |
pascal@4111 | 38 $CONFIGURE_ARGS && |
pascal@4111 | 39 make && |
pascal@4111 | 40 make DESTDIR=$PWD/_pkg install && |
pascal@4111 | 41 make DESTDIR=$PWD/_pkg samples && |
pascal@4111 | 42 cd contrib/utils && |
pascal@4111 | 43 gcc rawplayer.c -o $src/_pkg/usr/bin/rawplayer |
pascal@1187 | 44 } |
pascal@1187 | 45 |
pascal@1187 | 46 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1187 | 47 genpkg_rules() |
pascal@1187 | 48 { |
pascal@4111 | 49 mkdir -p $fs/usr |
pascal@4111 | 50 cp -a $_pkg/etc $fs |
pascal@4111 | 51 cp -a $_pkg/var $fs |
pascal@4111 | 52 cp -a $_pkg/usr/bin $fs/usr |
pascal@4111 | 53 cp -a $_pkg/usr/lib $fs/usr |
pascal@4111 | 54 cp -a $_pkg/usr/sbin $fs/usr |
pascal@1806 | 55 cp -a stuff/* $fs |
pascal@1806 | 56 } |
pascal@1806 | 57 |
pascal@1806 | 58 # Rules to configure package |
pascal@1806 | 59 setup_rules() |
pascal@1806 | 60 { |
pascal@1806 | 61 case "$2" in |
pascal@1806 | 62 mysql_host) |
pascal@1806 | 63 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf |
pascal@1920 | 64 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf |
pascal@1806 | 65 ;; |
pascal@1806 | 66 mysql_user) |
pascal@1806 | 67 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf |
pascal@1920 | 68 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf |
pascal@1806 | 69 ;; |
pascal@1806 | 70 mysql_password) |
pascal@1806 | 71 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf |
pascal@1920 | 72 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf |
pascal@1806 | 73 ;; |
pascal@1806 | 74 mysql_database) |
pascal@1920 | 75 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \ |
pascal@1806 | 76 $1/etc/asterisk/cdr_mysql.conf |
pascal@1806 | 77 ;; |
pascal@1920 | 78 pgsql_host) |
pascal@1920 | 79 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 80 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf |
pascal@1920 | 81 ;; |
pascal@1920 | 82 pgsql_user) |
pascal@1920 | 83 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 84 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf |
pascal@1920 | 85 ;; |
pascal@1920 | 86 pgsql_password) |
pascal@1920 | 87 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 88 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf |
pascal@1920 | 89 ;; |
pascal@1920 | 90 pgsql_database) |
pascal@1920 | 91 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \ |
pascal@1920 | 92 $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 93 ;; |
pascal@1806 | 94 *) cat <<EOT |
pascal@1806 | 95 mysql_host hostname or ip of mysql server |
pascal@1806 | 96 mysql_user username to connect to mysql server |
pascal@1806 | 97 mysql_password password to connect to mysql server |
pascal@1806 | 98 mysql_database database used by asterisk |
pascal@1920 | 99 pgsql_host hostname or ip of postgresql server |
pascal@1920 | 100 pgsql_user username to connect to postgresql server |
pascal@1920 | 101 pgsql_password password to connect to postgresql server |
pascal@1920 | 102 pgsql_database database used by asterisk |
pascal@1806 | 103 EOT |
pascal@1806 | 104 ;; |
pascal@1806 | 105 esac |
pascal@1187 | 106 } |