wok-4.x view asterisk/receipt @ rev 10172

Add perl-bit-vector.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri May 20 21:59:25 2011 +0000 (2011-05-20)
parents 7ba9895e1216
children 8f7d934ebcca
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 CONFIG_FILES="/etc/asterisk"
18 TAGS="telephone toolkit"
20 # Rules to configure and make the package.
21 #
22 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig'
23 #
24 compile_rules()
25 {
26 cd $src
27 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile
28 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
29 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \
30 main/config.c
31 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c
32 busybox sed -i 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/' \
33 main/pbx.c
34 sed -i 's/| sed .*>/>/' contrib/scripts/get_ilbc_source.sh
35 echo '' | contrib/scripts/get_ilbc_source.sh
36 busybox sed -i '/codec_ilbc/{ns/no/yes/}' menuselect-tree
37 ./configure \
38 --prefix=/usr \
39 --sysconfdir=/etc \
40 --without-pwlib \
41 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
42 $CONFIGURE_ARGS &&
43 make -j 4 &&
44 make DESTDIR=$PWD/_pkg install &&
45 make DESTDIR=$PWD/_pkg samples &&
46 cd contrib/utils &&
47 gcc rawplayer.c -o $src/_pkg/usr/bin/rawplayer
48 }
50 # Rules to gen a SliTaz package suitable for Tazpkg.
51 genpkg_rules()
52 {
53 mkdir -p $fs/usr
54 cp -a $_pkg/etc $fs
55 cp -a $_pkg/var $fs
56 cp -a $_pkg/usr/bin $fs/usr
57 cp -a $_pkg/usr/lib $fs/usr
58 cp -a $_pkg/usr/sbin $fs/usr
59 cp -a $stuff/* $fs
60 }
62 # Rules to configure package
63 setup_rules()
64 {
65 case "$2" in
66 mysql_host)
67 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
68 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
69 ;;
70 mysql_user)
71 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
72 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
73 ;;
74 mysql_password)
75 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
76 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
77 ;;
78 mysql_database)
79 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
80 $1/etc/asterisk/cdr_mysql.conf
81 ;;
82 pgsql_host)
83 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
84 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
85 ;;
86 pgsql_user)
87 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
88 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
89 ;;
90 pgsql_password)
91 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
92 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
93 ;;
94 pgsql_database)
95 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
96 $1/etc/asterisk/cdr_pgsql.conf
97 ;;
98 *) cat <<EOT
99 mysql_host hostname or ip of mysql server
100 mysql_user username to connect to mysql server
101 mysql_password password to connect to mysql server
102 mysql_database database used by asterisk
103 pgsql_host hostname or ip of postgresql server
104 pgsql_user username to connect to postgresql server
105 pgsql_password password to connect to postgresql server
106 pgsql_database database used by asterisk
107 EOT
108 ;;
109 esac
110 }