wok-next view asterisk/receipt @ rev 20859

Update ALSA stack (1.1.6)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Jun 27 13:35:43 2018 +0300 (2018-06-27)
parents 757d032c55c7
children f48456621a9d
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 $SRC/rfc3951.txt ] ||
46 wget -P $SRC http://www.ietf.org/rfc/rfc3951.txt
47 cp $SRC/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 --without-pwlib \
55 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
56 --with-tonezone \
57 $CONFIGURE_ARGS &&
58 make -j 1 2>&1 | grep -v pjproject &&
59 make -j 1 DESTDIR=$DESTDIR install &&
60 make -j 1 DESTDIR=$DESTDIR samples &&
61 cd contrib/utils &&
62 gcc rawplayer.c -o $DESTDIR/usr/bin/rawplayer
63 }
65 genpkg_rules() {
66 case $PACKAGE in
67 asterisk)
68 CONFIG_FILES="/etc/asterisk"
69 DEPENDS="openssl ncurses zlib libogg libvorbis curl newt \
70 libusb-compat alsa-lib speex iksemel spandsp tiff \
71 radiusclient-ng nbs freetds libpostgresqlclient \
72 libmysqlclient libunixODBC popt dahdi libpri lua \
73 libcap attr net-snmp portaudio sqlite3 libkrb5 \
74 libcomerr3 libsdl libsdl-image libxml2 bluez \
75 libldap libical neon util-linux-uuid"
76 mkdir -p $fs/usr
77 cp -a $install/etc $fs
78 cp -a $install/var $fs
79 cp -a $install/usr/lib $fs/usr
80 cp -a $install/usr/sbin $fs/usr
81 cp -a $stuff/*/ $fs
82 TAGS="telephony"
83 ;;
84 asterisk-dev)
85 copy @dev
86 ;;
87 esac
88 }
90 # Rules to configure package
91 setup_rules()
92 {
93 case "$2" in
94 mysql_host)
95 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_mysql.conf"
96 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_mysql.conf"
97 ;;
98 mysql_user)
99 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_mysql.conf"
100 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_mysql.conf"
101 ;;
102 mysql_password)
103 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_mysql.conf"
104 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_mysql.conf"
105 ;;
106 mysql_database)
107 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_mysql.conf" \
108 "$1/etc/asterisk/cdr_mysql.conf"
109 ;;
110 pgsql_host)
111 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
112 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_pgsql.conf"
113 ;;
114 pgsql_user)
115 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
116 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_pgsql.conf"
117 ;;
118 pgsql_password)
119 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
120 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_pgsql.conf"
121 ;;
122 pgsql_database)
123 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_pgsql.conf" \
124 "$1/etc/asterisk/cdr_pgsql.conf"
125 ;;
126 *) cat <<EOT
127 mysql_host hostname or ip of mysql server
128 mysql_user username to connect to mysql server
129 mysql_password password to connect to mysql server
130 mysql_database database used by asterisk
131 pgsql_host hostname or ip of postgresql server
132 pgsql_user username to connect to postgresql server
133 pgsql_password password to connect to postgresql server
134 pgsql_database database used by asterisk
135 EOT
136 ;;
137 esac
138 }