wok-current view asterisk/receipt @ rev 4615
asterisk: add ilbc, do not stop on missing includes
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Dec 17 14:55:58 2009 +0100 (2009-12-17) |
parents | b1acb4dc9a0a |
children | 92ec79fce82b |
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"
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 sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
29 sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' main/config.c
30 sed -i 's|lua5.1/||' pbx/pbx_lua.c
31 echo '' | contrib/scripts/get_ilbc_source.sh
32 sed -i '/codec_ilbc/{ns/no/yes/}' menuselect-tree
33 ./configure \
34 --prefix=/usr \
35 --sysconfdir=/etc \
36 --without-pwlib \
37 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
38 $CONFIGURE_ARGS &&
39 make &&
40 make DESTDIR=$PWD/_pkg install &&
41 make DESTDIR=$PWD/_pkg samples &&
42 cd contrib/utils &&
43 gcc rawplayer.c -o $src/_pkg/usr/bin/rawplayer
44 }
46 # Rules to gen a SliTaz package suitable for Tazpkg.
47 genpkg_rules()
48 {
49 mkdir -p $fs/usr
50 cp -a $_pkg/etc $fs
51 cp -a $_pkg/var $fs
52 cp -a $_pkg/usr/bin $fs/usr
53 cp -a $_pkg/usr/lib $fs/usr
54 cp -a $_pkg/usr/sbin $fs/usr
55 cp -a stuff/* $fs
56 }
58 # Rules to configure package
59 setup_rules()
60 {
61 case "$2" in
62 mysql_host)
63 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
64 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
65 ;;
66 mysql_user)
67 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
68 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
69 ;;
70 mysql_password)
71 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
72 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
73 ;;
74 mysql_database)
75 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
76 $1/etc/asterisk/cdr_mysql.conf
77 ;;
78 pgsql_host)
79 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
80 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
81 ;;
82 pgsql_user)
83 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
84 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
85 ;;
86 pgsql_password)
87 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
88 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
89 ;;
90 pgsql_database)
91 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
92 $1/etc/asterisk/cdr_pgsql.conf
93 ;;
94 *) cat <<EOT
95 mysql_host hostname or ip of mysql server
96 mysql_user username to connect to mysql server
97 mysql_password password to connect to mysql server
98 mysql_database database used by asterisk
99 pgsql_host hostname or ip of postgresql server
100 pgsql_user username to connect to postgresql server
101 pgsql_password password to connect to postgresql server
102 pgsql_database database used by asterisk
103 EOT
104 ;;
105 esac
106 }