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

Up: slitaz-configs-base (5.13)
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Thu Jan 17 19:36:23 2013 +0100 (2013-01-17)
parents 8e274ecbc77a
children ba7a5b27465c
line source
1 # SliTaz package receipt.
3 PACKAGE="asterisk"
4 VERSION="11.1.1"
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/releases/$TARBALL"
11 CONFIG_FILES="/etc/asterisk"
12 TAGS="telephony"
14 DEPENDS="openssl ncurses zlib libogg libvorbis curl newt libusb-compat alsa-lib \
15 speex iksemel spandsp tiff radiusclient-ng nbs freetds libpostgresqlclient \
16 libmysqlclient libunixODBC popt dahdi libpri lua libcap attr net-snmp \
17 portaudio sqlite libkrb5 libcomerr3 libsdl-image"
18 BUILD_DEPENDS="gtk+-dev libxml2-dev postgresql-dev libsdl-dev ncurses-dev \
19 gmime gmime-dev unixODBC-dev unixODBC openldap-dev openldap \
20 dahdi-linux dahdi-tools dahdi-dev \
21 newt-dev mysql-dev nbs-dev popt-dev neon postgresql sqlite-dev \
22 libvorbis-dev libvorbis speex"
24 # Rules to configure and make the package.
25 #
26 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig'
27 #
28 compile_rules()
29 {
30 cd $src
31 find * -name config.guess -o -name configure | xargs \
32 sed -i "s/(uname -m)/(echo $ARCH)/"
33 find * -name Makefile | xargs \
34 sed -i "s/(shell uname -m)/(shell echo $ARCH)/"
35 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile
36 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
37 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \
38 main/config.c
39 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c
40 grep -rsl '^#define AST_PBX_MAX_STACK' * | xargs busybox sed -i \
41 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/'
42 [ -s $SOURCES_REPOSITORY/rfc3951.txt ] ||
43 wget -P $SOURCES_REPOSITORY http://www.ietf.org/rfc/rfc3951.txt
44 cp $SOURCES_REPOSITORY/rfc3951.txt codecs/ilbc ||
45 cp $stuff/rfc3951.txt codecs/ilbc
46 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc &&
47 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null )
48 ./configure \
49 --prefix=/usr \
50 --sysconfdir=/etc \
51 --without-pwlib \
52 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
53 --with-tonezone \
54 $CONFIGURE_ARGS &&
55 make -j 1 &&
56 make -j 1 DESTDIR=$DESTDIR install &&
57 make -j 1 DESTDIR=$DESTDIR samples &&
58 cd contrib/utils &&
59 gcc rawplayer.c -o $DESTDIR/usr/bin/rawplayer
60 }
62 # Rules to gen a SliTaz package suitable for Tazpkg.
63 genpkg_rules()
64 {
65 mkdir -p $fs/usr
66 cp -a $install/etc $fs
67 cp -a $install/var $fs
68 cp -a $install/usr/lib $fs/usr
69 cp -a $install/usr/sbin $fs/usr
70 cp -a $stuff/*/ $fs
71 }
73 # Rules to configure package
74 setup_rules()
75 {
76 case "$2" in
77 mysql_host)
78 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
79 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
80 ;;
81 mysql_user)
82 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
83 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
84 ;;
85 mysql_password)
86 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
87 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
88 ;;
89 mysql_database)
90 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
91 $1/etc/asterisk/cdr_mysql.conf
92 ;;
93 pgsql_host)
94 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
95 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
96 ;;
97 pgsql_user)
98 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
99 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
100 ;;
101 pgsql_password)
102 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
103 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
104 ;;
105 pgsql_database)
106 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
107 $1/etc/asterisk/cdr_pgsql.conf
108 ;;
109 *) cat <<EOT
110 mysql_host hostname or ip of mysql server
111 mysql_user username to connect to mysql server
112 mysql_password password to connect to mysql server
113 mysql_database database used by asterisk
114 pgsql_host hostname or ip of postgresql server
115 pgsql_user username to connect to postgresql server
116 pgsql_password password to connect to postgresql server
117 pgsql_database database used by asterisk
118 EOT
119 ;;
120 esac
121 }