wok view asterisk/receipt @ rev 13875

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