wok-next view asterisk/receipt @ rev 20519

Synchronize wok-hg with wok. Some yesterday's patches are lost :(
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Mar 23 10:45:35 2018 +0200 (2018-03-23)
parents d43bf7aae921
children 757d032c55c7
line source
1 # SliTaz package receipt v2.
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 WEB_SITE="http://www.asterisk.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="http://downloads.asterisk.org/pub/telephony/asterisk/releases/$TARBALL"
14 EXTRA_SOURCE_FILES="rfc3951.txt"
16 BUILD_DEPENDS="gtk+-dev libxml2-dev postgresql-dev libsdl-dev ncurses-dev \
17 gmime gmime-dev unixODBC-dev unixODBC openldap-dev openldap \
18 dahdi-linux dahdi-tools dahdi-dev \
19 newt-dev mysql-dev nbs-dev popt-dev neon-dev neon postgresql sqlite3-dev \
20 openssl-dev lua-dev lua libpri-dev bluez-dev bluez portaudio-dev alsa-lib-dev \
21 libsdl-image-dev net-snmp iksemel libical-dev curl-dev libcap-dev iksemel-dev \
22 jack-dev radiusclient-ng-dev radiusclient-ng \
23 libvorbis-dev speex-dev"
24 SPLIT="asterisk-dev"
26 # Rules to configure and make the package.
27 #
28 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig'
29 #
30 compile_rules() {
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 sed -i 's/>no</>yes</' addons/[acor]*.c
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 # export CXXFLAGS="$CXXFLAGS -fPIC"
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 genpkg_rules() {
68 case $PACKAGE in
69 asterisk)
70 CONFIG_FILES="/etc/asterisk"
71 DEPENDS="openssl ncurses zlib libogg libvorbis curl newt \
72 libusb-compat alsa-lib speex iksemel spandsp tiff \
73 radiusclient-ng nbs freetds libpostgresqlclient \
74 libmysqlclient libunixODBC popt dahdi libpri lua \
75 libcap attr net-snmp portaudio sqlite3 libkrb5 \
76 libcomerr3 libsdl libsdl-image libxml2 bluez \
77 libldap libical neon util-linux-uuid"
78 mkdir -p $fs/usr
79 cp -a $install/etc $fs
80 cp -a $install/var $fs
81 cp -a $install/usr/lib $fs/usr
82 cp -a $install/usr/sbin $fs/usr
83 cp -a $stuff/*/ $fs
84 TAGS="telephony"
85 ;;
86 asterisk-dev)
87 copy @dev
88 ;;
89 esac
90 }
92 # Rules to configure package
93 setup_rules()
94 {
95 case "$2" in
96 mysql_host)
97 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_mysql.conf"
98 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_mysql.conf"
99 ;;
100 mysql_user)
101 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_mysql.conf"
102 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_mysql.conf"
103 ;;
104 mysql_password)
105 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_mysql.conf"
106 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_mysql.conf"
107 ;;
108 mysql_database)
109 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_mysql.conf" \
110 "$1/etc/asterisk/cdr_mysql.conf"
111 ;;
112 pgsql_host)
113 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
114 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_pgsql.conf"
115 ;;
116 pgsql_user)
117 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
118 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_pgsql.conf"
119 ;;
120 pgsql_password)
121 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
122 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_pgsql.conf"
123 ;;
124 pgsql_database)
125 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_pgsql.conf" \
126 "$1/etc/asterisk/cdr_pgsql.conf"
127 ;;
128 *) cat <<EOT
129 mysql_host hostname or ip of mysql server
130 mysql_user username to connect to mysql server
131 mysql_password password to connect to mysql server
132 mysql_database database used by asterisk
133 pgsql_host hostname or ip of postgresql server
134 pgsql_user username to connect to postgresql server
135 pgsql_password password to connect to postgresql server
136 pgsql_database database used by asterisk
137 EOT
138 ;;
139 esac
140 }