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