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

Up: libtorrent to 0.12.9.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Nov 02 06:37:35 2011 +0000 (2011-11-02)
parents bae11341973a
children 8e4c74abdf74
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 dahdi-linux dahdi-tools"
18 CONFIG_FILES="/etc/asterisk"
19 TAGS="telephone toolkit"
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 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile
29 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
30 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \
31 main/config.c
32 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c
33 grep -rsl '^#define AST_PBX_MAX_STACK' * | xargs busybox sed -i \
34 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/'
35 [ -s $SOURCES_REPOSITORY/rfc3951.txt ] ||
36 wget -P $SOURCES_REPOSITORY http://www.ietf.org/rfc/rfc3951.txt
37 cp $SOURCES_REPOSITORY/rfc3951.txt codecs/ilbc
38 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc &&
39 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null )
40 busybox sed -i '/codec_ilbc/{ns/no/yes/}' menuselect-tree
41 ./configure \
42 --prefix=/usr \
43 --sysconfdir=/etc \
44 --without-pwlib \
45 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
46 $CONFIGURE_ARGS &&
47 make -j 4 &&
48 make DESTDIR=$PWD/_pkg install &&
49 make DESTDIR=$PWD/_pkg samples &&
50 cd contrib/utils &&
51 gcc rawplayer.c -o $src/_pkg/usr/bin/rawplayer
52 }
54 # Rules to gen a SliTaz package suitable for Tazpkg.
55 genpkg_rules()
56 {
57 mkdir -p $fs/usr
58 cp -a $_pkg/etc $fs
59 cp -a $_pkg/var $fs
60 cp -a $_pkg/usr/bin $fs/usr
61 cp -a $_pkg/usr/lib $fs/usr
62 cp -a $_pkg/usr/sbin $fs/usr
63 cp -a $stuff/*/ $fs
64 }
66 # Rules to configure package
67 setup_rules()
68 {
69 case "$2" in
70 mysql_host)
71 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
72 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
73 ;;
74 mysql_user)
75 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
76 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
77 ;;
78 mysql_password)
79 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
80 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
81 ;;
82 mysql_database)
83 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
84 $1/etc/asterisk/cdr_mysql.conf
85 ;;
86 pgsql_host)
87 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
88 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
89 ;;
90 pgsql_user)
91 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
92 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
93 ;;
94 pgsql_password)
95 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
96 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
97 ;;
98 pgsql_database)
99 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
100 $1/etc/asterisk/cdr_pgsql.conf
101 ;;
102 *) cat <<EOT
103 mysql_host hostname or ip of mysql server
104 mysql_user username to connect to mysql server
105 mysql_password password to connect to mysql server
106 mysql_database database used by asterisk
107 pgsql_host hostname or ip of postgresql server
108 pgsql_user username to connect to postgresql server
109 pgsql_password password to connect to postgresql server
110 pgsql_database database used by asterisk
111 EOT
112 ;;
113 esac
114 }