wok view asterisk/receipt @ rev 4931

add TAGS a* receipts
author Rohit Joshi <jozee@slitaz.org>
date Tue Feb 16 10:51:34 2010 +0000 (2010-02-16)
parents 92ec79fce82b
children 395ec8205cff
line source
1 # SliTaz package receipt.
3 PACKAGE="asterisk"
4 VERSION="1.6.1.6"
5 CATEGORY="misc"
6 SHORT_DESC="Open Source PBX and telephony toolkit."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.asterisk.org/"
10 WGET_URL="http://downloads.asterisk.org/pub/telephony/asterisk/$TARBALL"
11 DEPENDS="openssl ncurses zlib libogg libvorbis curl newt libusb alsa-lib \
12 speex iksemel spandsp tiff radiusclient-ng nbs freetds libpostgresqlclient \
13 libmysqlclient libunixODBC popt dahdi libpri lua"
14 BUILD_DEPENDS="libvorbis-dev curl-dev speex-dev alsa-lib-dev popt-dev \
15 libpri-dev spandsp-dev lua-dev dahdi-dev postgresql-dev net-snmp-dev \
16 libsdl-dev nbs-dev libogg-dev libogg speex spandsp iksemel iksemel-dev \
17 gmime gmime-dev openssl-dev openssl unixODBC-dev unixODBC \
18 openldap-dev openldap portaudio-dev portaudio"
19 CONFIG_FILES="/etc/asterisk"
20 TAGS="telephone toolkit"
22 # Rules to configure and make the package.
23 #
24 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig'
25 #
26 compile_rules()
27 {
28 cd $src
29 sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
30 sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' main/config.c
31 sed -i 's|lua5.1/||' pbx/pbx_lua.c
32 sed -i 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/' \
33 main/pbx.c
34 echo '' | contrib/scripts/get_ilbc_source.sh
35 sed -i '/codec_ilbc/{ns/no/yes/}' menuselect-tree
36 ./configure \
37 --prefix=/usr \
38 --sysconfdir=/etc \
39 --without-pwlib \
40 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
41 $CONFIGURE_ARGS &&
42 make &&
43 make DESTDIR=$PWD/_pkg install &&
44 make DESTDIR=$PWD/_pkg samples &&
45 cd contrib/utils &&
46 gcc rawplayer.c -o $src/_pkg/usr/bin/rawplayer
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 mkdir -p $fs/usr
53 cp -a $_pkg/etc $fs
54 cp -a $_pkg/var $fs
55 cp -a $_pkg/usr/bin $fs/usr
56 cp -a $_pkg/usr/lib $fs/usr
57 cp -a $_pkg/usr/sbin $fs/usr
58 cp -a stuff/* $fs
59 }
61 # Rules to configure package
62 setup_rules()
63 {
64 case "$2" in
65 mysql_host)
66 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
67 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
68 ;;
69 mysql_user)
70 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
71 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
72 ;;
73 mysql_password)
74 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
75 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
76 ;;
77 mysql_database)
78 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
79 $1/etc/asterisk/cdr_mysql.conf
80 ;;
81 pgsql_host)
82 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
83 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
84 ;;
85 pgsql_user)
86 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
87 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
88 ;;
89 pgsql_password)
90 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
91 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
92 ;;
93 pgsql_database)
94 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
95 $1/etc/asterisk/cdr_pgsql.conf
96 ;;
97 *) cat <<EOT
98 mysql_host hostname or ip of mysql server
99 mysql_user username to connect to mysql server
100 mysql_password password to connect to mysql server
101 mysql_database database used by asterisk
102 pgsql_host hostname or ip of postgresql server
103 pgsql_user username to connect to postgresql server
104 pgsql_password password to connect to postgresql server
105 pgsql_database database used by asterisk
106 EOT
107 ;;
108 esac
109 }