wok-next annotate asterisk/receipt @ rev 15325
Up tcpdump (4.4.0)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Sep 27 21:59:48 2013 +0000 (2013-09-27) |
parents | b2a632fc9587 |
children | c29f0140d4ef |
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@4998 | 19 portaudio sqlite libkrb5 libcomerr3 libsdl-image" |
pascal@12756 | 20 BUILD_DEPENDS="gtk+-dev libxml2-dev postgresql-dev libsdl-dev ncurses-dev \ |
pascal@10447 | 21 gmime gmime-dev unixODBC-dev unixODBC openldap-dev openldap \ |
pascal@13872 | 22 dahdi-linux dahdi-tools dahdi-dev \ |
pascal@13872 | 23 newt-dev mysql-dev nbs-dev popt-dev neon postgresql sqlite-dev \ |
pascal@13872 | 24 libvorbis-dev libvorbis speex" |
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 # |
pascal@4111 | 30 compile_rules() |
pascal@1187 | 31 { |
pascal@14185 | 32 # according to https://issues.asterisk.org/jira/browse/ASTERISK-20576 |
pascal@14185 | 33 # the message "Makefile:82: pjproject/build.mak: No such file or directory" is normal :-/ |
pascal@4111 | 34 cd $src |
pascal@13871 | 35 find * -name config.guess -o -name configure | xargs \ |
pascal@13877 | 36 sed -i "s/(uname -m)/(echo $ARCH)/" |
pascal@13871 | 37 find * -name Makefile | xargs \ |
pascal@13877 | 38 sed -i "s/(shell uname -m)/(shell echo $ARCH)/" |
pascal@5442 | 39 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile |
pascal@5442 | 40 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c |
pascal@5442 | 41 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \ |
pascal@5442 | 42 main/config.c |
pascal@5442 | 43 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c |
pascal@10941 | 44 grep -rsl '^#define AST_PBX_MAX_STACK' * | xargs busybox sed -i \ |
pascal@10941 | 45 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/' |
pascal@10942 | 46 [ -s $SOURCES_REPOSITORY/rfc3951.txt ] || |
pascal@10942 | 47 wget -P $SOURCES_REPOSITORY http://www.ietf.org/rfc/rfc3951.txt |
pascal@12756 | 48 cp $SOURCES_REPOSITORY/rfc3951.txt codecs/ilbc || |
pascal@12858 | 49 cp $stuff/rfc3951.txt codecs/ilbc |
pascal@10943 | 50 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc && |
pascal@10943 | 51 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null ) |
pascal@14044 | 52 mkdir -p $DESTDIR/usr/bin |
pascal@4111 | 53 ./configure \ |
pascal@4111 | 54 --prefix=/usr \ |
pascal@4111 | 55 --sysconfdir=/etc \ |
pascal@4111 | 56 --without-pwlib \ |
pascal@4593 | 57 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \ |
pascal@12949 | 58 --with-tonezone \ |
pascal@4111 | 59 $CONFIGURE_ARGS && |
pascal@14186 | 60 make -j 1 2>&1 | grep -v pjproject && |
pascal@13876 | 61 make -j 1 DESTDIR=$DESTDIR install && |
pascal@13876 | 62 make -j 1 DESTDIR=$DESTDIR samples && |
pascal@4111 | 63 cd contrib/utils && |
pascal@13028 | 64 gcc rawplayer.c -o $DESTDIR/usr/bin/rawplayer |
pascal@1187 | 65 } |
pascal@1187 | 66 |
pascal@1187 | 67 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1187 | 68 genpkg_rules() |
pascal@1187 | 69 { |
pascal@4111 | 70 mkdir -p $fs/usr |
pascal@13871 | 71 cp -a $install/etc $fs |
pascal@13871 | 72 cp -a $install/var $fs |
pascal@13871 | 73 cp -a $install/usr/lib $fs/usr |
pascal@13871 | 74 cp -a $install/usr/sbin $fs/usr |
pascal@10942 | 75 cp -a $stuff/*/ $fs |
pascal@1806 | 76 } |
pascal@1806 | 77 |
pascal@1806 | 78 # Rules to configure package |
pascal@1806 | 79 setup_rules() |
pascal@1806 | 80 { |
pascal@1806 | 81 case "$2" in |
pascal@1806 | 82 mysql_host) |
pascal@1806 | 83 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf |
pascal@1920 | 84 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf |
pascal@1806 | 85 ;; |
pascal@1806 | 86 mysql_user) |
pascal@1806 | 87 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf |
pascal@1920 | 88 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf |
pascal@1806 | 89 ;; |
pascal@1806 | 90 mysql_password) |
pascal@1806 | 91 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf |
pascal@1920 | 92 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf |
pascal@1806 | 93 ;; |
pascal@1806 | 94 mysql_database) |
pascal@1920 | 95 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \ |
pascal@1806 | 96 $1/etc/asterisk/cdr_mysql.conf |
pascal@1806 | 97 ;; |
pascal@1920 | 98 pgsql_host) |
pascal@1920 | 99 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 100 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf |
pascal@1920 | 101 ;; |
pascal@1920 | 102 pgsql_user) |
pascal@1920 | 103 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 104 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf |
pascal@1920 | 105 ;; |
pascal@1920 | 106 pgsql_password) |
pascal@1920 | 107 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 108 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf |
pascal@1920 | 109 ;; |
pascal@1920 | 110 pgsql_database) |
pascal@1920 | 111 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \ |
pascal@1920 | 112 $1/etc/asterisk/cdr_pgsql.conf |
pascal@1920 | 113 ;; |
pascal@1806 | 114 *) cat <<EOT |
pascal@1806 | 115 mysql_host hostname or ip of mysql server |
pascal@1806 | 116 mysql_user username to connect to mysql server |
pascal@1806 | 117 mysql_password password to connect to mysql server |
pascal@1806 | 118 mysql_database database used by asterisk |
pascal@1920 | 119 pgsql_host hostname or ip of postgresql server |
pascal@1920 | 120 pgsql_user username to connect to postgresql server |
pascal@1920 | 121 pgsql_password password to connect to postgresql server |
pascal@1920 | 122 pgsql_database database used by asterisk |
pascal@1806 | 123 EOT |
pascal@1806 | 124 ;; |
pascal@1806 | 125 esac |
pascal@1187 | 126 } |