wok view asterisk/receipt @ rev 21763
busybox: enable CONFIG_FDISK_SUPPORT_LARGE_DISKS
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jun 27 14:19:03 2019 +0200 (2019-06-27) |
parents | a0fe56fb9c41 |
children | c2bd5d258aac |
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 opus code2"
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 opus-dev code2-dev autoconf automake libtool"
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 while read url ; do
51 [ -s $SOURCES_REPOSITORY/$(basename "$url") ] ||
52 wget --no-check-certificate -P $SOURCES_REPOSITORY "$url"
53 done <<EOT
54 http://www.ietf.org/rfc/rfc3951.txt
55 https://github.com/meetecho/asterisk-opus/raw/master/asterisk_opus%2Bvp8.diff
56 http://svn.code.sf.net/p/freetel/code/codec2/branches/0.5/asterisk-11/asterisk-11.8.1-codec2.patch
57 http://svn.code.sf.net/p/freetel/code/codec2/branches/0.5/asterisk-11/asterisk-11.8.1-opus-codec2.patch
58 EOT
59 cp $SOURCES_REPOSITORY/rfc3951.txt codecs/ilbc ||
60 cp $stuff/rfc3951.txt codecs/ilbc
61 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc &&
62 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null )
63 patch -p1 < $SOURCES_REPOSITORY/asterisk_opus%2Bvp8.diff
64 patch -p1 < $SOURCES_REPOSITORY/asterisk-11.8.1-opus-codec2.patch
65 mkdir -p $DESTDIR/usr/bin
66 ./bootstrap.sh
67 ./configure \
68 --prefix=/usr \
69 --sysconfdir=/etc \
70 --without-pwlib \
71 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
72 --with-tonezone \
73 $CONFIGURE_ARGS &&
74 make -j 1 2>&1 | grep -v pjproject &&
75 make -j 1 DESTDIR=$DESTDIR install &&
76 make -j 1 DESTDIR=$DESTDIR samples &&
77 cd contrib/utils &&
78 gcc rawplayer.c -o $DESTDIR/usr/bin/rawplayer
79 }
81 # Rules to gen a SliTaz package suitable for Tazpkg.
82 genpkg_rules()
83 {
84 mkdir -p $fs/usr
85 cp -a $install/etc $fs
86 cp -a $install/var $fs
87 cp -a $install/usr/lib $fs/usr
88 cp -a $install/usr/sbin $fs/usr
89 cp -a $stuff/*/ $fs
90 rm -f $fs/usr/lib/libasteriskssl.so
91 ln -s libasteriskssl.so.1 $fs/usr/lib/libasteriskssl.so
92 }
94 # Rules to configure package
95 setup_rules()
96 {
97 case "$2" in
98 mysql_host)
99 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_mysql.conf"
100 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_mysql.conf"
101 ;;
102 mysql_user)
103 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_mysql.conf"
104 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_mysql.conf"
105 ;;
106 mysql_password)
107 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_mysql.conf"
108 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_mysql.conf"
109 ;;
110 mysql_database)
111 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_mysql.conf" \
112 "$1/etc/asterisk/cdr_mysql.conf"
113 ;;
114 pgsql_host)
115 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
116 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_pgsql.conf"
117 ;;
118 pgsql_user)
119 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
120 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_pgsql.conf"
121 ;;
122 pgsql_password)
123 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
124 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_pgsql.conf"
125 ;;
126 pgsql_database)
127 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_pgsql.conf" \
128 "$1/etc/asterisk/cdr_pgsql.conf"
129 ;;
130 *) cat <<EOT
131 mysql_host hostname or ip of mysql server
132 mysql_user username to connect to mysql server
133 mysql_password password to connect to mysql server
134 mysql_database database used by asterisk
135 pgsql_host hostname or ip of postgresql server
136 pgsql_user username to connect to postgresql server
137 pgsql_password password to connect to postgresql server
138 pgsql_database database used by asterisk
139 EOT
140 ;;
141 esac
142 }