wok-6.x view asterisk/receipt @ rev 4595
asterisk: update build_depends (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Dec 12 00:50:59 2009 +0100 (2009-12-12) |
parents | 6f24a0a3f131 |
children | 24ce49497140 |
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"
17 CONFIG_FILES="/etc/asterisk"
19 # Rules to configure and make the package.
20 #
21 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig'
22 #
23 compile_rules()
24 {
25 cd $src
26 sed -i 's|lua5.1/||' pbx/pbx_lua.c
27 ./configure \
28 --prefix=/usr \
29 --sysconfdir=/etc \
30 --without-pwlib \
31 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
32 $CONFIGURE_ARGS &&
33 make &&
34 make DESTDIR=$PWD/_pkg install &&
35 make DESTDIR=$PWD/_pkg samples &&
36 cd contrib/utils &&
37 gcc rawplayer.c -o $src/_pkg/usr/bin/rawplayer
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 mkdir -p $fs/usr
44 cp -a $_pkg/etc $fs
45 cp -a $_pkg/var $fs
46 cp -a $_pkg/usr/bin $fs/usr
47 cp -a $_pkg/usr/lib $fs/usr
48 cp -a $_pkg/usr/sbin $fs/usr
49 cp -a stuff/* $fs
50 }
52 # Rules to configure package
53 setup_rules()
54 {
55 case "$2" in
56 mysql_host)
57 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
58 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
59 ;;
60 mysql_user)
61 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
62 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
63 ;;
64 mysql_password)
65 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
66 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
67 ;;
68 mysql_database)
69 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
70 $1/etc/asterisk/cdr_mysql.conf
71 ;;
72 pgsql_host)
73 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
74 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
75 ;;
76 pgsql_user)
77 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
78 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
79 ;;
80 pgsql_password)
81 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
82 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
83 ;;
84 pgsql_database)
85 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
86 $1/etc/asterisk/cdr_pgsql.conf
87 ;;
88 *) cat <<EOT
89 mysql_host hostname or ip of mysql server
90 mysql_user username to connect to mysql server
91 mysql_password password to connect to mysql server
92 mysql_database database used by asterisk
93 pgsql_host hostname or ip of postgresql server
94 pgsql_user username to connect to postgresql server
95 pgsql_password password to connect to postgresql server
96 pgsql_database database used by asterisk
97 EOT
98 ;;
99 esac
100 }