wok-next view asterisk/receipt @ rev 13543
slitaz-configs: add edit-dot-*
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Tue Oct 30 01:42:07 2012 +0000 (2012-10-30) |
parents | d71ba04aa9f5 |
children | ca0bcdf8ead0 |
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/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 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 cp $stuff/rfc3951.txt codecs/ilbc
39 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc &&
40 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null )
41 busybox sed -i '/codec_ilbc/{ns/no/yes/}' menuselect-tree
42 ./configure \
43 --prefix=/usr \
44 --sysconfdir=/etc \
45 --without-pwlib \
46 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
47 --with-tonezone \
48 $CONFIGURE_ARGS &&
49 make &&
50 make DESTDIR=$DESTDIR install &&
51 make DESTDIR=$DESTDIR samples &&
52 cd contrib/utils &&
53 gcc rawplayer.c -o $DESTDIR/usr/bin/rawplayer
54 }
56 # Rules to gen a SliTaz package suitable for Tazpkg.
57 genpkg_rules()
58 {
59 mkdir -p $fs/usr
60 cp -a $_pkg/etc $fs
61 cp -a $_pkg/var $fs
62 cp -a $_pkg/usr/bin $fs/usr
63 cp -a $_pkg/usr/lib $fs/usr
64 cp -a $_pkg/usr/sbin $fs/usr
65 cp -a $stuff/*/ $fs
66 }
68 # Rules to configure package
69 setup_rules()
70 {
71 case "$2" in
72 mysql_host)
73 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
74 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
75 ;;
76 mysql_user)
77 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
78 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
79 ;;
80 mysql_password)
81 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
82 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
83 ;;
84 mysql_database)
85 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
86 $1/etc/asterisk/cdr_mysql.conf
87 ;;
88 pgsql_host)
89 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
90 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
91 ;;
92 pgsql_user)
93 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
94 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
95 ;;
96 pgsql_password)
97 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
98 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
99 ;;
100 pgsql_database)
101 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
102 $1/etc/asterisk/cdr_pgsql.conf
103 ;;
104 *) cat <<EOT
105 mysql_host hostname or ip of mysql server
106 mysql_user username to connect to mysql server
107 mysql_password password to connect to mysql server
108 mysql_database database used by asterisk
109 pgsql_host hostname or ip of postgresql server
110 pgsql_user username to connect to postgresql server
111 pgsql_password password to connect to postgresql server
112 pgsql_database database used by asterisk
113 EOT
114 ;;
115 esac
116 }