wok view asterisk/receipt @ rev 13871

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