wok view asterisk/receipt @ rev 8995

asterisk: update BUILD_DEPENDS
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Mar 03 13:09:50 2011 +0100 (2011-03-03)
parents 22f34f1a2cd8
children ec55e22d6775
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 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="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 echo '' | contrib/scripts/get_ilbc_source.sh
35 busybox 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 -j 4 &&
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 }