wok-6.x view asterisk/receipt @ rev 14907
lxinput: up 0.3.2; openbox: fix pipe menu display; slitaz-i18n: add missing core packages; tiny edits.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Aug 02 15:13:41 2013 +0300 (2013-08-02) |
parents | 38ac53297dd0 |
children | 7896f0694ef6 |
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 EXTRA_SOURCE_FILES="rfc3951.txt"
10 WEB_SITE="http://www.asterisk.org/"
11 WGET_URL="http://downloads.asterisk.org/pub/telephony/asterisk/releases/$TARBALL"
12 CONFIG_FILES="/etc/asterisk"
13 TAGS="telephony"
15 DEPENDS="openssl ncurses zlib libogg libvorbis curl newt libusb-compat alsa-lib \
16 speex iksemel spandsp tiff radiusclient-ng nbs freetds libpostgresqlclient \
17 libmysqlclient libunixODBC popt dahdi libpri lua libcap attr net-snmp \
18 portaudio sqlite libkrb5 libcomerr3 libsdl-image"
19 BUILD_DEPENDS="gtk+-dev libxml2-dev postgresql-dev libsdl-dev ncurses-dev \
20 gmime gmime-dev unixODBC-dev unixODBC openldap-dev openldap \
21 dahdi-linux dahdi-tools dahdi-dev \
22 newt-dev mysql-dev nbs-dev popt-dev neon postgresql sqlite-dev \
23 libvorbis-dev libvorbis speex"
25 # Rules to configure and make the package.
26 #
27 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig'
28 #
29 compile_rules()
30 {
31 # according to https://issues.asterisk.org/jira/browse/ASTERISK-20576
32 # the message "Makefile:82: pjproject/build.mak: No such file or directory" is normal :-/
33 cd $src
34 find * -name config.guess -o -name configure | xargs \
35 sed -i "s/(uname -m)/(echo $ARCH)/"
36 find * -name Makefile | xargs \
37 sed -i "s/(shell uname -m)/(shell echo $ARCH)/"
38 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile
39 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
40 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \
41 main/config.c
42 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c
43 grep -rsl '^#define AST_PBX_MAX_STACK' * | xargs busybox sed -i \
44 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/'
45 [ -s $SOURCES_REPOSITORY/rfc3951.txt ] ||
46 wget -P $SOURCES_REPOSITORY http://www.ietf.org/rfc/rfc3951.txt
47 cp $SOURCES_REPOSITORY/rfc3951.txt codecs/ilbc ||
48 cp $stuff/rfc3951.txt codecs/ilbc
49 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc &&
50 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null )
51 mkdir -p $DESTDIR/usr/bin
52 ./configure \
53 --prefix=/usr \
54 --sysconfdir=/etc \
55 --without-pwlib \
56 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
57 --with-tonezone \
58 $CONFIGURE_ARGS &&
59 make -j 1 2>&1 | grep -v pjproject &&
60 make -j 1 DESTDIR=$DESTDIR install &&
61 make -j 1 DESTDIR=$DESTDIR samples &&
62 cd contrib/utils &&
63 gcc rawplayer.c -o $DESTDIR/usr/bin/rawplayer
64 }
66 # Rules to gen a SliTaz package suitable for Tazpkg.
67 genpkg_rules()
68 {
69 mkdir -p $fs/usr
70 cp -a $install/etc $fs
71 cp -a $install/var $fs
72 cp -a $install/usr/lib $fs/usr
73 cp -a $install/usr/sbin $fs/usr
74 cp -a $stuff/*/ $fs
75 }
77 # Rules to configure package
78 setup_rules()
79 {
80 case "$2" in
81 mysql_host)
82 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
83 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
84 ;;
85 mysql_user)
86 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
87 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
88 ;;
89 mysql_password)
90 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
91 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
92 ;;
93 mysql_database)
94 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
95 $1/etc/asterisk/cdr_mysql.conf
96 ;;
97 pgsql_host)
98 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
99 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
100 ;;
101 pgsql_user)
102 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
103 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
104 ;;
105 pgsql_password)
106 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
107 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
108 ;;
109 pgsql_database)
110 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
111 $1/etc/asterisk/cdr_pgsql.conf
112 ;;
113 *) cat <<EOT
114 mysql_host hostname or ip of mysql server
115 mysql_user username to connect to mysql server
116 mysql_password password to connect to mysql server
117 mysql_database database used by asterisk
118 pgsql_host hostname or ip of postgresql server
119 pgsql_user username to connect to postgresql server
120 pgsql_password password to connect to postgresql server
121 pgsql_database database used by asterisk
122 EOT
123 ;;
124 esac
125 }