wok-current view asterisk/receipt @ rev 10695
merge
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri May 27 22:53:32 2011 +0200 (2011-05-27) |
parents | a1644dbcf632 |
children | 9d1bc27242eb |
line source
1 # SliTaz package receipt.
3 PACKAGE="asterisk"
4 VERSION="1.6.2.7"
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-compat alsa-lib \
12 speex iksemel spandsp tiff radiusclient-ng nbs freetds libpostgresqlclient \
13 libmysqlclient libunixODBC popt dahdi libpri lua libcap attr net-snmp \
14 portaudio sqlite libkrb5 libcomerr3 libsdl-image"
15 BUILD_DEPENDS="gtk+-dev libxml2-dev postgresql-dev libsdl-dev \
16 gmime gmime-dev unixODBC-dev unixODBC openldap-dev openldap \
17 dahdi-linux dahdi-tools"
18 CONFIG_FILES="/etc/asterisk"
19 TAGS="telephone toolkit"
21 # Rules to configure and make the package.
22 #
23 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig'
24 #
25 compile_rules()
26 {
27 cd $src
28 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile
29 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
30 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \
31 main/config.c
32 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c
33 busybox sed -i 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/' \
34 main/pbx.c
35 sed -i 's/| sed .*>/>/' contrib/scripts/get_ilbc_source.sh
36 echo '' | contrib/scripts/get_ilbc_source.sh
37 busybox sed -i '/codec_ilbc/{ns/no/yes/}' menuselect-tree
38 ./configure \
39 --prefix=/usr \
40 --sysconfdir=/etc \
41 --without-pwlib \
42 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
43 $CONFIGURE_ARGS &&
44 make -j 4 &&
45 make DESTDIR=$PWD/_pkg install &&
46 make DESTDIR=$PWD/_pkg samples &&
47 cd contrib/utils &&
48 gcc rawplayer.c -o $src/_pkg/usr/bin/rawplayer
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 mkdir -p $fs/usr
55 cp -a $_pkg/etc $fs
56 cp -a $_pkg/var $fs
57 cp -a $_pkg/usr/bin $fs/usr
58 cp -a $_pkg/usr/lib $fs/usr
59 cp -a $_pkg/usr/sbin $fs/usr
60 cp -a $stuff/* $fs
61 }
63 # Rules to configure package
64 setup_rules()
65 {
66 case "$2" in
67 mysql_host)
68 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
69 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
70 ;;
71 mysql_user)
72 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
73 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
74 ;;
75 mysql_password)
76 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
77 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
78 ;;
79 mysql_database)
80 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
81 $1/etc/asterisk/cdr_mysql.conf
82 ;;
83 pgsql_host)
84 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
85 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
86 ;;
87 pgsql_user)
88 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
89 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
90 ;;
91 pgsql_password)
92 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
93 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
94 ;;
95 pgsql_database)
96 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
97 $1/etc/asterisk/cdr_pgsql.conf
98 ;;
99 *) cat <<EOT
100 mysql_host hostname or ip of mysql server
101 mysql_user username to connect to mysql server
102 mysql_password password to connect to mysql server
103 mysql_database database used by asterisk
104 pgsql_host hostname or ip of postgresql server
105 pgsql_user username to connect to postgresql server
106 pgsql_password password to connect to postgresql server
107 pgsql_database database used by asterisk
108 EOT
109 ;;
110 esac
111 }