wok view asterisk/receipt @ rev 14252

readline: update deps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 25 15:43:45 2013 +0100 (2013-03-25)
parents a4c663bcb06a
children b2a632fc9587
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 # according to https://issues.asterisk.org/jira/browse/ASTERISK-20576
31 # the message "Makefile:82: pjproject/build.mak: No such file or directory" is normal :-/
32 cd $src
33 find * -name config.guess -o -name configure | xargs \
34 sed -i "s/(uname -m)/(echo $ARCH)/"
35 find * -name Makefile | xargs \
36 sed -i "s/(shell uname -m)/(shell echo $ARCH)/"
37 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile
38 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
39 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \
40 main/config.c
41 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c
42 grep -rsl '^#define AST_PBX_MAX_STACK' * | xargs busybox sed -i \
43 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/'
44 [ -s $SOURCES_REPOSITORY/rfc3951.txt ] ||
45 wget -P $SOURCES_REPOSITORY http://www.ietf.org/rfc/rfc3951.txt
46 cp $SOURCES_REPOSITORY/rfc3951.txt codecs/ilbc ||
47 cp $stuff/rfc3951.txt codecs/ilbc
48 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc &&
49 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null )
50 mkdir -p $DESTDIR/usr/bin
51 ./configure \
52 --prefix=/usr \
53 --sysconfdir=/etc \
54 --without-pwlib \
55 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
56 --with-tonezone \
57 $CONFIGURE_ARGS &&
58 make -j 1 2>&1 | grep -v pjproject &&
59 make -j 1 DESTDIR=$DESTDIR install &&
60 make -j 1 DESTDIR=$DESTDIR samples &&
61 cd contrib/utils &&
62 gcc rawplayer.c -o $DESTDIR/usr/bin/rawplayer
63 }
65 # Rules to gen a SliTaz package suitable for Tazpkg.
66 genpkg_rules()
67 {
68 mkdir -p $fs/usr
69 cp -a $install/etc $fs
70 cp -a $install/var $fs
71 cp -a $install/usr/lib $fs/usr
72 cp -a $install/usr/sbin $fs/usr
73 cp -a $stuff/*/ $fs
74 }
76 # Rules to configure package
77 setup_rules()
78 {
79 case "$2" in
80 mysql_host)
81 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
82 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
83 ;;
84 mysql_user)
85 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
86 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
87 ;;
88 mysql_password)
89 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
90 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
91 ;;
92 mysql_database)
93 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
94 $1/etc/asterisk/cdr_mysql.conf
95 ;;
96 pgsql_host)
97 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
98 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
99 ;;
100 pgsql_user)
101 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
102 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
103 ;;
104 pgsql_password)
105 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
106 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
107 ;;
108 pgsql_database)
109 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
110 $1/etc/asterisk/cdr_pgsql.conf
111 ;;
112 *) cat <<EOT
113 mysql_host hostname or ip of mysql server
114 mysql_user username to connect to mysql server
115 mysql_password password to connect to mysql server
116 mysql_database database used by asterisk
117 pgsql_host hostname or ip of postgresql server
118 pgsql_user username to connect to postgresql server
119 pgsql_password password to connect to postgresql server
120 pgsql_database database used by asterisk
121 EOT
122 ;;
123 esac
124 }