wok annotate asterisk/receipt @ rev 19691
Up lz4 (1.7.5), lz5 (2.0)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 13 10:26:05 2017 +0100 (2017-02-13) |
parents | 04d824c95283 |
children | a0fe56fb9c41 |
rev | line source |
---|---|
pascal@1187 | 1 # SliTaz package receipt. |
pascal@1187 | 2 |
pascal@1187 | 3 PACKAGE="asterisk" |
pascal@13871 | 4 VERSION="11.1.1" |
pascal@1423 | 5 CATEGORY="misc" |
pascal@1187 | 6 SHORT_DESC="Open Source PBX and telephony toolkit." |
pascal@1187 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15002 | 8 LICENSE="GPL2" |
pascal@4111 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@14337 | 10 EXTRA_SOURCE_FILES="rfc3951.txt" |
pascal@4111 | 11 WEB_SITE="http://www.asterisk.org/" |
pascal@12756 | 12 WGET_URL="http://downloads.asterisk.org/pub/telephony/asterisk/releases/$TARBALL" |
pascal@13872 | 13 CONFIG_FILES="/etc/asterisk" |
pascal@13872 | 14 TAGS="telephony" |
pascal@13872 | 15 |
gokhlayeh@9395 | 16 DEPENDS="openssl ncurses zlib libogg libvorbis curl newt libusb-compat alsa-lib \ |
pascal@1187 | 17 speex iksemel spandsp tiff radiusclient-ng nbs freetds libpostgresqlclient \ |
pascal@4998 | 18 libmysqlclient libunixODBC popt dahdi libpri lua libcap attr net-snmp \ |
pascal@15467 | 19 portaudio sqlite libkrb5 libcomerr3 libsdl libsdl-image libssl libxml2 bluez \ |
pascal@15467 | 20 libldap libical neon util-linux-uuid" |
pascal@12756 | 21 BUILD_DEPENDS="gtk+-dev libxml2-dev postgresql-dev libsdl-dev ncurses-dev \ |
pascal@10447 | 22 gmime gmime-dev unixODBC-dev unixODBC openldap-dev openldap \ |
pascal@13872 | 23 dahdi-linux dahdi-tools dahdi-dev \ |
pascal@15466 | 24 newt-dev mysql-dev nbs-dev popt-dev neon-dev neon postgresql sqlite-dev \ |
pascal@15466 | 25 openssl-dev lua-dev lua libpri-dev bluez-dev bluez portaudio-dev alsa-lib-dev \ |
pascal@15466 | 26 libsdl-image-dev net-snmp iksemel libical-dev curl-dev libcap-dev iksemel-dev \ |
pascal@15466 | 27 jack-audio-connection-kit-dev radiusclient-ng-dev radiusclient-ng \ |
pascal@15466 | 28 libvorbis-dev speex-dev" |
pascal@1187 | 29 |
pascal@4111 | 30 # Rules to configure and make the package. |
pascal@4111 | 31 # |
pascal@4111 | 32 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig' |
pascal@4111 | 33 # |
pascal@4111 | 34 compile_rules() |
pascal@1187 | 35 { |
pascal@14185 | 36 # according to https://issues.asterisk.org/jira/browse/ASTERISK-20576 |
pascal@14185 | 37 # the message "Makefile:82: pjproject/build.mak: No such file or directory" is normal :-/ |
pascal@15466 | 38 sed -i 's/>no</>yes</' addons/[acor]*.c |
pascal@13871 | 39 find * -name config.guess -o -name configure | xargs \ |
pascal@13877 | 40 sed -i "s/(uname -m)/(echo $ARCH)/" |
pascal@13871 | 41 find * -name Makefile | xargs \ |
pascal@13877 | 42 sed -i "s/(shell uname -m)/(shell echo $ARCH)/" |
pascal@5442 | 43 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile |
pascal@5442 | 44 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c |
pascal@5442 | 45 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \ |
pascal@5442 | 46 main/config.c |
pascal@5442 | 47 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c |
pascal@10941 | 48 grep -rsl '^#define AST_PBX_MAX_STACK' * | xargs busybox sed -i \ |
pascal@10941 | 49 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/' |
pascal@10942 | 50 [ -s $SOURCES_REPOSITORY/rfc3951.txt ] || |
pascal@10942 | 51 wget -P $SOURCES_REPOSITORY http://www.ietf.org/rfc/rfc3951.txt |
pascal@12756 | 52 cp $SOURCES_REPOSITORY/rfc3951.txt codecs/ilbc || |
pascal@12858 | 53 cp $stuff/rfc3951.txt codecs/ilbc |
pascal@10943 | 54 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc && |
pascal@10943 | 55 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null ) |
pascal@14044 | 56 mkdir -p $DESTDIR/usr/bin |
pascal@4111 | 57 ./configure \ |
pascal@4111 | 58 --prefix=/usr \ |
pascal@4111 | 59 --sysconfdir=/etc \ |
pascal@4111 | 60 --without-pwlib \ |
pascal@4593 | 61 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \ |
pascal@12949 | 62 --with-tonezone \ |
pascal@4111 | 63 $CONFIGURE_ARGS && |
pascal@14186 | 64 make -j 1 2>&1 | grep -v pjproject && |
pascal@13876 | 65 make -j 1 DESTDIR=$DESTDIR install && |
pascal@13876 | 66 make -j 1 DESTDIR=$DESTDIR samples && |
pascal@4111 | 67 cd contrib/utils && |
pascal@13028 | 68 gcc rawplayer.c -o $DESTDIR/usr/bin/rawplayer |
pascal@1187 | 69 } |
pascal@1187 | 70 |
pascal@1187 | 71 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1187 | 72 genpkg_rules() |
pascal@1187 | 73 { |
pascal@4111 | 74 mkdir -p $fs/usr |
pascal@13871 | 75 cp -a $install/etc $fs |
pascal@13871 | 76 cp -a $install/var $fs |
pascal@13871 | 77 cp -a $install/usr/lib $fs/usr |
pascal@13871 | 78 cp -a $install/usr/sbin $fs/usr |
pascal@10942 | 79 cp -a $stuff/*/ $fs |
pascal@1806 | 80 } |
pascal@1806 | 81 |
pascal@1806 | 82 # Rules to configure package |
pascal@1806 | 83 setup_rules() |
pascal@1806 | 84 { |
pascal@1806 | 85 case "$2" in |
pascal@1806 | 86 mysql_host) |
pascal@18730 | 87 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_mysql.conf" |
pascal@18730 | 88 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_mysql.conf" |
pascal@1806 | 89 ;; |
pascal@1806 | 90 mysql_user) |
pascal@18730 | 91 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_mysql.conf" |
pascal@18730 | 92 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_mysql.conf" |
pascal@1806 | 93 ;; |
pascal@1806 | 94 mysql_password) |
pascal@18730 | 95 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_mysql.conf" |
pascal@18730 | 96 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_mysql.conf" |
pascal@1806 | 97 ;; |
pascal@1806 | 98 mysql_database) |
pascal@18730 | 99 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_mysql.conf" \ |
pascal@18730 | 100 "$1/etc/asterisk/cdr_mysql.conf" |
pascal@1806 | 101 ;; |
pascal@1920 | 102 pgsql_host) |
pascal@18730 | 103 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_pgsql.conf" |
pascal@18730 | 104 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_pgsql.conf" |
pascal@1920 | 105 ;; |
pascal@1920 | 106 pgsql_user) |
pascal@18730 | 107 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_pgsql.conf" |
pascal@18730 | 108 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_pgsql.conf" |
pascal@1920 | 109 ;; |
pascal@1920 | 110 pgsql_password) |
pascal@18730 | 111 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_pgsql.conf" |
pascal@18730 | 112 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_pgsql.conf" |
pascal@1920 | 113 ;; |
pascal@1920 | 114 pgsql_database) |
pascal@18730 | 115 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_pgsql.conf" \ |
pascal@18730 | 116 "$1/etc/asterisk/cdr_pgsql.conf" |
pascal@1920 | 117 ;; |
pascal@1806 | 118 *) cat <<EOT |
pascal@1806 | 119 mysql_host hostname or ip of mysql server |
pascal@1806 | 120 mysql_user username to connect to mysql server |
pascal@1806 | 121 mysql_password password to connect to mysql server |
pascal@1806 | 122 mysql_database database used by asterisk |
pascal@1920 | 123 pgsql_host hostname or ip of postgresql server |
pascal@1920 | 124 pgsql_user username to connect to postgresql server |
pascal@1920 | 125 pgsql_password password to connect to postgresql server |
pascal@1920 | 126 pgsql_database database used by asterisk |
pascal@1806 | 127 EOT |
pascal@1806 | 128 ;; |
pascal@1806 | 129 esac |
pascal@1187 | 130 } |