wok-6.x view asterisk/receipt @ rev 5581

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