wok-6.x annotate asterisk/receipt @ rev 20426
linld: fix xmm_driver
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 13 00:46:30 2018 +0200 (2018-08-13) |
parents | a0fe56fb9c41 |
children | c2bd5d258aac |
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@20406 | 20 libldap libical neon util-linux-uuid opus code2" |
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@20406 | 28 libvorbis-dev speex-dev opus-dev code2-dev autoconf automake libtool" |
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@20406 | 50 while read url ; do |
pascal@20406 | 51 [ -s $SOURCES_REPOSITORY/$(basename "$url") ] || |
pascal@20406 | 52 wget --no-check-certificate -P $SOURCES_REPOSITORY "$url" |
pascal@20406 | 53 done <<EOT |
pascal@20406 | 54 http://www.ietf.org/rfc/rfc3951.txt |
pascal@20406 | 55 https://github.com/meetecho/asterisk-opus/raw/master/asterisk_opus%2Bvp8.diff |
pascal@20406 | 56 http://svn.code.sf.net/p/freetel/code/codec2/branches/0.5/asterisk-11/asterisk-11.8.1-codec2.patch |
pascal@20406 | 57 http://svn.code.sf.net/p/freetel/code/codec2/branches/0.5/asterisk-11/asterisk-11.8.1-opus-codec2.patch |
pascal@20406 | 58 EOT |
pascal@12756 | 59 cp $SOURCES_REPOSITORY/rfc3951.txt codecs/ilbc || |
pascal@12858 | 60 cp $stuff/rfc3951.txt codecs/ilbc |
pascal@10943 | 61 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc && |
pascal@10943 | 62 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null ) |
pascal@20406 | 63 patch -p1 < $SOURCES_REPOSITORY/asterisk_opus%2Bvp8.diff |
pascal@20406 | 64 patch -p1 < $SOURCES_REPOSITORY/asterisk-11.8.1-opus-codec2.patch |
pascal@20406 | 65 mkdir -p $DESTDIR/usr/bin |
pascal@20406 | 66 ./bootstrap.sh |
pascal@4111 | 67 ./configure \ |
pascal@4111 | 68 --prefix=/usr \ |
pascal@4111 | 69 --sysconfdir=/etc \ |
pascal@4111 | 70 --without-pwlib \ |
pascal@4593 | 71 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \ |
pascal@12949 | 72 --with-tonezone \ |
pascal@4111 | 73 $CONFIGURE_ARGS && |
pascal@14186 | 74 make -j 1 2>&1 | grep -v pjproject && |
pascal@13876 | 75 make -j 1 DESTDIR=$DESTDIR install && |
pascal@13876 | 76 make -j 1 DESTDIR=$DESTDIR samples && |
pascal@4111 | 77 cd contrib/utils && |
pascal@13028 | 78 gcc rawplayer.c -o $DESTDIR/usr/bin/rawplayer |
pascal@1187 | 79 } |
pascal@1187 | 80 |
pascal@1187 | 81 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1187 | 82 genpkg_rules() |
pascal@1187 | 83 { |
pascal@4111 | 84 mkdir -p $fs/usr |
pascal@13871 | 85 cp -a $install/etc $fs |
pascal@13871 | 86 cp -a $install/var $fs |
pascal@13871 | 87 cp -a $install/usr/lib $fs/usr |
pascal@13871 | 88 cp -a $install/usr/sbin $fs/usr |
pascal@10942 | 89 cp -a $stuff/*/ $fs |
pascal@19933 | 90 rm -f $fs/usr/lib/libasteriskssl.so |
pascal@19933 | 91 ln -s libasteriskssl.so.1 $fs/usr/lib/libasteriskssl.so |
pascal@1806 | 92 } |
pascal@1806 | 93 |
pascal@1806 | 94 # Rules to configure package |
pascal@1806 | 95 setup_rules() |
pascal@1806 | 96 { |
pascal@1806 | 97 case "$2" in |
pascal@1806 | 98 mysql_host) |
pascal@18730 | 99 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_mysql.conf" |
pascal@18730 | 100 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_mysql.conf" |
pascal@1806 | 101 ;; |
pascal@1806 | 102 mysql_user) |
pascal@18730 | 103 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_mysql.conf" |
pascal@18730 | 104 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_mysql.conf" |
pascal@1806 | 105 ;; |
pascal@1806 | 106 mysql_password) |
pascal@18730 | 107 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_mysql.conf" |
pascal@18730 | 108 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_mysql.conf" |
pascal@1806 | 109 ;; |
pascal@1806 | 110 mysql_database) |
pascal@18730 | 111 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_mysql.conf" \ |
pascal@18730 | 112 "$1/etc/asterisk/cdr_mysql.conf" |
pascal@1806 | 113 ;; |
pascal@1920 | 114 pgsql_host) |
pascal@18730 | 115 sed -i "s|^hostname=.*|hostname=$3|" "$1/etc/asterisk/cdr_pgsql.conf" |
pascal@18730 | 116 sed -i "s|^dbhost=.*|dbhost=$3|" "$1/etc/asterisk/res_pgsql.conf" |
pascal@1920 | 117 ;; |
pascal@1920 | 118 pgsql_user) |
pascal@18730 | 119 sed -i "s|^user=.*|user=$3|" "$1/etc/asterisk/cdr_pgsql.conf" |
pascal@18730 | 120 sed -i "s|^dbuser=.*|dbuser=$3|" "$1/etc/asterisk/res_pgsql.conf" |
pascal@1920 | 121 ;; |
pascal@1920 | 122 pgsql_password) |
pascal@18730 | 123 sed -i "s|^password=.*|password=$3|" "$1/etc/asterisk/cdr_pgsql.conf" |
pascal@18730 | 124 sed -i "s|^dbpass=.*|dbpass=$3|" "$1/etc/asterisk/res_pgsql.conf" |
pascal@1920 | 125 ;; |
pascal@1920 | 126 pgsql_database) |
pascal@18730 | 127 sed -i "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_pgsql.conf" \ |
pascal@18730 | 128 "$1/etc/asterisk/cdr_pgsql.conf" |
pascal@1920 | 129 ;; |
pascal@1806 | 130 *) cat <<EOT |
pascal@1806 | 131 mysql_host hostname or ip of mysql server |
pascal@1806 | 132 mysql_user username to connect to mysql server |
pascal@1806 | 133 mysql_password password to connect to mysql server |
pascal@1806 | 134 mysql_database database used by asterisk |
pascal@1920 | 135 pgsql_host hostname or ip of postgresql server |
pascal@1920 | 136 pgsql_user username to connect to postgresql server |
pascal@1920 | 137 pgsql_password password to connect to postgresql server |
pascal@1920 | 138 pgsql_database database used by asterisk |
pascal@1806 | 139 EOT |
pascal@1806 | 140 ;; |
pascal@1806 | 141 esac |
pascal@1187 | 142 } |