wok-current view asterisk/receipt @ rev 19142

Down ffmpeg (2.8.7)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu May 19 12:09:28 2016 +0200 (2016-05-19)
parents 9c3c32f897b5
children 04d824c95283
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 libsdl-image libssl libxml2 bluez \
20 libldap libical neon util-linux-uuid"
21 BUILD_DEPENDS="gtk+-dev libxml2-dev postgresql-dev libsdl-dev ncurses-dev \
22 gmime gmime-dev unixODBC-dev unixODBC openldap-dev openldap \
23 dahdi-linux dahdi-tools dahdi-dev \
24 newt-dev mysql-dev nbs-dev popt-dev neon-dev neon postgresql sqlite-dev \
25 openssl-dev lua-dev lua libpri-dev bluez-dev bluez portaudio-dev alsa-lib-dev \
26 libsdl-image-dev net-snmp iksemel libical-dev curl-dev libcap-dev iksemel-dev \
27 jack-audio-connection-kit-dev radiusclient-ng-dev radiusclient-ng \
28 libvorbis-dev speex-dev"
30 # Rules to configure and make the package.
31 #
32 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig'
33 #
34 compile_rules()
35 {
36 # according to https://issues.asterisk.org/jira/browse/ASTERISK-20576
37 # the message "Makefile:82: pjproject/build.mak: No such file or directory" is normal :-/
38 cd $src
39 sed -i 's/>no</>yes</' addons/[acor]*.c
40 find * -name config.guess -o -name configure | xargs \
41 sed -i "s/(uname -m)/(echo $ARCH)/"
42 find * -name Makefile | xargs \
43 sed -i "s/(shell uname -m)/(shell echo $ARCH)/"
44 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile
45 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
46 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \
47 main/config.c
48 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c
49 grep -rsl '^#define AST_PBX_MAX_STACK' * | xargs busybox sed -i \
50 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/'
51 [ -s $SOURCES_REPOSITORY/rfc3951.txt ] ||
52 wget -P $SOURCES_REPOSITORY http://www.ietf.org/rfc/rfc3951.txt
53 cp $SOURCES_REPOSITORY/rfc3951.txt codecs/ilbc ||
54 cp $stuff/rfc3951.txt codecs/ilbc
55 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc &&
56 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null )
57 mkdir -p $DESTDIR/usr/bin
58 ./configure \
59 --prefix=/usr \
60 --sysconfdir=/etc \
61 --without-pwlib \
62 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
63 --with-tonezone \
64 $CONFIGURE_ARGS &&
65 make -j 1 2>&1 | grep -v pjproject &&
66 make -j 1 DESTDIR=$DESTDIR install &&
67 make -j 1 DESTDIR=$DESTDIR samples &&
68 cd contrib/utils &&
69 gcc rawplayer.c -o $DESTDIR/usr/bin/rawplayer
70 }
72 # Rules to gen a SliTaz package suitable for Tazpkg.
73 genpkg_rules()
74 {
75 mkdir -p $fs/usr
76 cp -a $install/etc $fs
77 cp -a $install/var $fs
78 cp -a $install/usr/lib $fs/usr
79 cp -a $install/usr/sbin $fs/usr
80 cp -a $stuff/*/ $fs
81 }
83 # Rules to configure package
84 setup_rules()
85 {
86 case "$2" in
87 mysql_host)
88 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_mysql.conf"
89 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_mysql.conf"
90 ;;
91 mysql_user)
92 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_mysql.conf"
93 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_mysql.conf"
94 ;;
95 mysql_password)
96 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_mysql.conf"
97 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_mysql.conf"
98 ;;
99 mysql_database)
100 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_mysql.conf" \
101 "$1/etc/asterisk/cdr_mysql.conf"
102 ;;
103 pgsql_host)
104 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
105 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_pgsql.conf"
106 ;;
107 pgsql_user)
108 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
109 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_pgsql.conf"
110 ;;
111 pgsql_password)
112 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
113 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_pgsql.conf"
114 ;;
115 pgsql_database)
116 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_pgsql.conf" \
117 "$1/etc/asterisk/cdr_pgsql.conf"
118 ;;
119 *) cat <<EOT
120 mysql_host hostname or ip of mysql server
121 mysql_user username to connect to mysql server
122 mysql_password password to connect to mysql server
123 mysql_database database used by asterisk
124 pgsql_host hostname or ip of postgresql server
125 pgsql_user username to connect to postgresql server
126 pgsql_password password to connect to postgresql server
127 pgsql_database database used by asterisk
128 EOT
129 ;;
130 esac
131 }