wok-next view asterisk/receipt @ rev 21379
updated mspdebug (0.17 -> 0.25)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Apr 16 16:31:49 2020 +0100 (2020-04-16) |
parents | 82d538613d03 |
children |
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="autoconf automake alsa-lib-dev bluez bluez-dev codec2-dev curl-dev
17 dahdi-dev dahdi-linux dahdi-tools gmime gmime-dev gtk2-dev iksemel iksemel-dev
18 jack-dev libcap-dev libical-dev libpri-dev libvorbis-dev libxml2-dev lua
19 lua-dev mysql-dev nbs-dev ncurses-dev neon neon-dev net-snmp newt-dev
20 openldap openldap-dev openssl-dev popt-dev portaudio-dev postgresql
21 postgresql-dev radiusclient-ng radiusclient-ng-dev sdl-dev sdl-image-dev
22 speex-dev sqlite3-dev unixODBC unixODBC-dev"
23 SPLIT="$PACKAGE-dev"
25 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig'
26 #
27 compile_rules()
28 {
29 # according to https://issues.asterisk.org/jira/browse/ASTERISK-20576
30 # the message "Makefile:82: pjproject/build.mak: No such file or directory" is normal :-/
31 sed -i 's/>no</>yes</' addons/[acor]*.c
32 find * -name config.guess -o -name configure | xargs \
33 sed -i "s/(uname -m)/(echo $ARCH)/"
34 find * -name Makefile | xargs \
35 sed -i "s/(shell uname -m)/(shell echo $ARCH)/"
36 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile
37 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
38 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \
39 main/config.c
40 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c
41 grep -rsl '^#define AST_PBX_MAX_STACK' * | xargs busybox sed -i \
42 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/'
43 [ -s $SRC/rfc3951.txt ] ||
44 wget -P $SRC http://www.ietf.org/rfc/rfc3951.txt
45 cp $SRC/rfc3951.txt codecs/ilbc ||
46 cp $stuff/rfc3951.txt codecs/ilbc
47 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc &&
48 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null )
49 mkdir -p $install/usr/bin
50 # export CXXFLAGS="$CXXFLAGS -fPIC"
52 ./bootstrap.sh &&
53 ./configure \
54 --without-pwlib \
55 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
56 --with-tonezone \
57 $CONFIGURE_ARGS &&
58 make -j1 2>&1 | grep -v pjproject &&
59 make -j1 DESTDIR=$install install &&
60 make -j1 DESTDIR=$install samples &&
61 cd contrib/utils &&
62 gcc rawplayer.c -o $install/usr/bin/rawplayer
63 }
65 genpkg_rules()
66 {
67 case $PACKAGE in
68 asterisk)
69 CONFIG_FILES="/etc/asterisk"
70 DEPENDS="alsa-lib attr bluez curl dahdi freetds iksemel libcap
71 libcomerr3 libical libkrb5 libldap libmysqlclient libogg
72 libpostgresqlclient libpri libtiff libusb-compat libunixODBC
73 libvorbis libxml2 lua nbs ncurses neon net-snmp newt openssl
74 popt portaudio radiusclient-ng sdl sdl-image spandsp speex
75 sqlite3 util-linux-uuid zlib"
77 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 setup_rules()
93 {
94 case "$2" in
95 mysql_host)
96 sed "s|^hostname=.*|hostname=$3|" -i "$1/etc/asterisk/cdr_mysql.conf"
97 sed "s|^dbhost=.*|dbhost=$3|" -i "$1/etc/asterisk/res_mysql.conf"
98 ;;
99 mysql_user)
100 sed "s|^user=.*|user=$3|" -i "$1/etc/asterisk/cdr_mysql.conf"
101 sed "s|^dbuser=.*|dbuser=$3|" -i "$1/etc/asterisk/res_mysql.conf"
102 ;;
103 mysql_password)
104 sed "s|^password=.*|password=$3|" -i "$1/etc/asterisk/cdr_mysql.conf"
105 sed "s|^dbpass=.*|dbpass=$3|" -i "$1/etc/asterisk/res_mysql.conf"
106 ;;
107 mysql_database)
108 sed "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_mysql.conf" \
109 -i "$1/etc/asterisk/cdr_mysql.conf"
110 ;;
111 pgsql_host)
112 sed "s|^hostname=.*|hostname=$3|" -i "$1/etc/asterisk/cdr_pgsql.conf"
113 sed "s|^dbhost=.*|dbhost=$3|" -i "$1/etc/asterisk/res_pgsql.conf"
114 ;;
115 pgsql_user)
116 sed "s|^user=.*|user=$3|" -i "$1/etc/asterisk/cdr_pgsql.conf"
117 sed "s|^dbuser=.*|dbuser=$3|" -i "$1/etc/asterisk/res_pgsql.conf"
118 ;;
119 pgsql_password)
120 sed "s|^password=.*|password=$3|" -i "$1/etc/asterisk/cdr_pgsql.conf"
121 sed "s|^dbpass=.*|dbpass=$3|" -i "$1/etc/asterisk/res_pgsql.conf"
122 ;;
123 pgsql_database)
124 sed "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_pgsql.conf" \
125 -i "$1/etc/asterisk/cdr_pgsql.conf"
126 ;;
127 *) cat <<EOT
128 mysql_host hostname or ip of mysql server
129 mysql_user username to connect to mysql server
130 mysql_password password to connect to mysql server
131 mysql_database database used by asterisk
132 pgsql_host hostname or ip of postgresql server
133 pgsql_user username to connect to postgresql server
134 pgsql_password password to connect to postgresql server
135 pgsql_database database used by asterisk
136 EOT
137 ;;
138 esac
139 }