wok-next view asterisk/receipt @ rev 19936
mate-common: automake-1.15 support, mate-desktop, mate-icon-theme, mate-system-monitor: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Oct 15 17:04:15 2017 +0200 (2017-10-15) |
parents | 11b5e93cb5f2 |
children | 2809ecb8c754 |
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-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 }
82 # Rules to configure package
83 setup_rules()
84 {
85 case "$2" in
86 mysql_host)
87 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_mysql.conf"
88 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_mysql.conf"
89 ;;
90 mysql_user)
91 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_mysql.conf"
92 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_mysql.conf"
93 ;;
94 mysql_password)
95 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_mysql.conf"
96 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_mysql.conf"
97 ;;
98 mysql_database)
99 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_mysql.conf" \
100 "$1/etc/asterisk/cdr_mysql.conf"
101 ;;
102 pgsql_host)
103 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
104 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_pgsql.conf"
105 ;;
106 pgsql_user)
107 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
108 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_pgsql.conf"
109 ;;
110 pgsql_password)
111 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
112 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_pgsql.conf"
113 ;;
114 pgsql_database)
115 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_pgsql.conf" \
116 "$1/etc/asterisk/cdr_pgsql.conf"
117 ;;
118 *) cat <<EOT
119 mysql_host hostname or ip of mysql server
120 mysql_user username to connect to mysql server
121 mysql_password password to connect to mysql server
122 mysql_database database used by asterisk
123 pgsql_host hostname or ip of postgresql server
124 pgsql_user username to connect to postgresql server
125 pgsql_password password to connect to postgresql server
126 pgsql_database database used by asterisk
127 EOT
128 ;;
129 esac
130 }