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