wok view asterisk/receipt @ rev 19267
Compress manpages.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Jul 04 11:45:47 2016 +0300 (2016-07-04) |
parents | 9e01bc6321ea |
children | 11b5e93cb5f2 |
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-audio-connection-kit-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 cd $src
39 sed -i 's/>no</>yes</' addons/[acor]*.c
40 find * -name config.guess -o -name configure | xargs \
41 sed -i "s/(uname -m)/(echo $ARCH)/"
42 find * -name Makefile | xargs \
43 sed -i "s/(shell uname -m)/(shell echo $ARCH)/"
44 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile
45 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
46 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \
47 main/config.c
48 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c
49 grep -rsl '^#define AST_PBX_MAX_STACK' * | xargs busybox sed -i \
50 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/'
51 [ -s $SOURCES_REPOSITORY/rfc3951.txt ] ||
52 wget -P $SOURCES_REPOSITORY http://www.ietf.org/rfc/rfc3951.txt
53 cp $SOURCES_REPOSITORY/rfc3951.txt codecs/ilbc ||
54 cp $stuff/rfc3951.txt codecs/ilbc
55 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc &&
56 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null )
57 mkdir -p $DESTDIR/usr/bin
58 ./configure \
59 --prefix=/usr \
60 --sysconfdir=/etc \
61 --without-pwlib \
62 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
63 --with-tonezone \
64 $CONFIGURE_ARGS &&
65 make -j 1 2>&1 | grep -v pjproject &&
66 make -j 1 DESTDIR=$DESTDIR install &&
67 make -j 1 DESTDIR=$DESTDIR samples &&
68 cd contrib/utils &&
69 gcc rawplayer.c -o $DESTDIR/usr/bin/rawplayer
71 cook_compress_manpages
72 }
74 # Rules to gen a SliTaz package suitable for Tazpkg.
75 genpkg_rules()
76 {
77 mkdir -p $fs/usr
78 cp -a $install/etc $fs
79 cp -a $install/var $fs
80 cp -a $install/usr/lib $fs/usr
81 cp -a $install/usr/sbin $fs/usr
82 cp -a $stuff/*/ $fs
83 }
85 # Rules to configure package
86 setup_rules()
87 {
88 case "$2" in
89 mysql_host)
90 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_mysql.conf"
91 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_mysql.conf"
92 ;;
93 mysql_user)
94 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_mysql.conf"
95 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_mysql.conf"
96 ;;
97 mysql_password)
98 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_mysql.conf"
99 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_mysql.conf"
100 ;;
101 mysql_database)
102 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_mysql.conf" \
103 "$1/etc/asterisk/cdr_mysql.conf"
104 ;;
105 pgsql_host)
106 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
107 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_pgsql.conf"
108 ;;
109 pgsql_user)
110 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
111 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_pgsql.conf"
112 ;;
113 pgsql_password)
114 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_pgsql.conf"
115 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_pgsql.conf"
116 ;;
117 pgsql_database)
118 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_pgsql.conf" \
119 "$1/etc/asterisk/cdr_pgsql.conf"
120 ;;
121 *) cat <<EOT
122 mysql_host hostname or ip of mysql server
123 mysql_user username to connect to mysql server
124 mysql_password password to connect to mysql server
125 mysql_database database used by asterisk
126 pgsql_host hostname or ip of postgresql server
127 pgsql_user username to connect to postgresql server
128 pgsql_password password to connect to postgresql server
129 pgsql_database database used by asterisk
130 EOT
131 ;;
132 esac
133 }