wok view asterisk/receipt @ rev 20257

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