wok-current annotate asterisk/receipt @ rev 25663

Reenable rounded-corners, graphical perf issue report by Ceel
author Stanislas Leduc <shann@slitaz.org>
date Fri Feb 23 19:03:06 2024 +0000 (8 months ago)
parents 67d9840ef3ac
children
rev   line source
pascal@1187 1 # SliTaz package receipt.
pascal@1187 2
pascal@1187 3 PACKAGE="asterisk"
Hans-G?nter@25573 4 VERSION="20.2.1"
pascal@1423 5 CATEGORY="misc"
Hans-G?nter@25573 6 TAGS="telephony"
pascal@1187 7 SHORT_DESC="Open Source PBX and telephony toolkit."
pascal@1187 8 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15002 9 LICENSE="GPL2"
Hans-G?nter@25573 10 WEB_SITE="https://www.asterisk.org/"
Hans-G?nter@25573 11
pascal@4111 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@14337 13 EXTRA_SOURCE_FILES="rfc3951.txt"
pascal@12756 14 WGET_URL="http://downloads.asterisk.org/pub/telephony/asterisk/releases/$TARBALL"
Hans-G?nter@25573 15
Hans-G?nter@25573 16 DEPENDS="alsa-lib attr bluez codec2 curl dahdi freetds iksemel jansson
Hans-G?nter@25573 17 libcap libcomerr3 libedit libical libkrb5 libldap libmysqlclient
Hans-G?nter@25573 18 libogg libpostgresqlclient libpri libsdl libsdl-image libssl
Hans-G?nter@25573 19 libunixODBC libusb-compat libvorbis libxml2 lua nbs ncurses neon
Hans-G?nter@25573 20 net-snmp newt openssl opus popt portaudio radiusclient-ng spandsp
Hans-G?nter@25573 21 speex sqlite tiff util-linux-uuid zlib"
Hans-G?nter@25573 22 BUILD_DEPENDS="alsa-lib-dev autoconf automake bluez bluez-dev codec2-dev
Hans-G?nter@25573 23 curl-dev dahdi-dev dahdi-linux dahdi-tools gmime gmime-dev
Hans-G?nter@25573 24 gtk+-dev iksemel iksemel-dev jack-audio-connection-kit-dev
Hans-G?nter@25573 25 jansson-dev libcap-dev libedit-dev libical-dev libpri-dev
Hans-G?nter@25573 26 libsdl-dev libsdl-image-dev libtool libvorbis-dev libxml2-dev
Hans-G?nter@25573 27 lua lua-dev mysql-dev nbs-dev ncurses-dev neon neon-dev net-snmp-dev
Hans-G?nter@25573 28 newt-dev openldap openldap-dev openssl-dev opus-dev popt-dev
Hans-G?nter@25573 29 portaudio-dev postgresql postgresql-dev radiusclient-ng
Hans-G?nter@25573 30 radiusclient-ng-dev speex-dev sqlite-dev unixODBC unixODBC-dev"
Hans-G?nter@25573 31
pascal@13872 32 CONFIG_FILES="/etc/asterisk"
pascal@1187 33
pascal@24319 34 # What is the latest version available today?
pascal@24319 35 current_version()
pascal@24319 36 {
pascal@24319 37 wget -O - $WEB_SITE 2>/dev/null | \
pascal@24626 38 sed '/Available/!d;s|.*Asterisk ||;s|,* .*||;q'
pascal@24319 39 }
pascal@24319 40
pascal@4111 41 # Rules to configure and make the package.
pascal@4111 42 #
pascal@4111 43 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig'
pascal@4111 44 #
pascal@4111 45 compile_rules()
pascal@1187 46 {
pascal@14185 47 # according to https://issues.asterisk.org/jira/browse/ASTERISK-20576
pascal@14185 48 # the message "Makefile:82: pjproject/build.mak: No such file or directory" is normal :-/
pascal@15466 49 sed -i 's/>no</>yes</' addons/[acor]*.c
pascal@13871 50 find * -name config.guess -o -name configure | xargs \
pascal@13877 51 sed -i "s/(uname -m)/(echo $ARCH)/"
pascal@13871 52 find * -name Makefile | xargs \
pascal@13877 53 sed -i "s/(shell uname -m)/(shell echo $ARCH)/"
pascal@5442 54 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile
pascal@5442 55 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
pascal@5442 56 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \
pascal@5442 57 main/config.c
pascal@5442 58 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c
pascal@10941 59 grep -rsl '^#define AST_PBX_MAX_STACK' * | xargs busybox sed -i \
pascal@10941 60 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/'
Hans-G?nter@25573 61 while read url
Hans-G?nter@25573 62 do
pascal@20406 63 [ -s $SOURCES_REPOSITORY/$(basename "$url") ] ||
pascal@20406 64 wget --no-check-certificate -P $SOURCES_REPOSITORY "$url"
Hans-G?nter@25573 65 done <<EOT
pascal@20406 66 http://www.ietf.org/rfc/rfc3951.txt
pascal@20406 67 EOT
Hans-G?nter@25573 68 # suitable for 11.1.2
Hans-G?nter@25573 69 #https://github.com/meetecho/asterisk-opus/raw/master/asterisk_opus+vp8.diff
Hans-G?nter@25573 70 # suitable for 11.8.1
Hans-G?nter@25573 71 #http://svn.code.sf.net/p/freetel/code/codec2/branches/0.5/asterisk-11/asterisk-11.8.1-codec2.patch
Hans-G?nter@25573 72 #http://svn.code.sf.net/p/freetel/code/codec2/branches/0.5/asterisk-11/asterisk-11.8.1-opus-codec2.patch
Hans-G?nter@25573 73
pascal@12756 74 cp $SOURCES_REPOSITORY/rfc3951.txt codecs/ilbc ||
pascal@12858 75 cp $stuff/rfc3951.txt codecs/ilbc
Hans-G?nter@25573 76 [ -f codecs/ilbc/iLBC_define.h ] ||
Hans-G?nter@25573 77 ( cd codecs/ilbc && awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null )
Hans-G?nter@25573 78 # suitable for 11.1.2
Hans-G?nter@25573 79 # patch -p1 < $SOURCES_REPOSITORY/asterisk_opus+vp8.diff
Hans-G?nter@25573 80 # suitable for 11.8.1
Hans-G?nter@25573 81 # patch -p1 < $SOURCES_REPOSITORY/asterisk-11.8.1-opus-codec2.patch
Hans-G?nter@25573 82
Hans-G?nter@25573 83 mkdir -p $DESTDIR/usr/bin
Hans-G?nter@25573 84
pascal@20406 85 ./bootstrap.sh
Hans-G?nter@25573 86 # 20.2.1 unrecognised:
Hans-G?nter@25573 87 # --without-pwlib
Hans-G?nter@25573 88 ./configure \
Hans-G?nter@25573 89 --prefix=/usr \
Hans-G?nter@25574 90 --includedir=/usr/include \
Hans-G?nter@25573 91 --sysconfdir=/etc \
Hans-G?nter@25573 92 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
Hans-G?nter@25573 93 --with-tonezone \
pascal@4111 94 $CONFIGURE_ARGS &&
Hans-G?nter@25574 95 make -j 1 2>&1 | grep -v pjproject &&
Hans-G?nter@25574 96 make install DESTDIR=$DESTDIR &&
Hans-G?nter@25574 97 make install-headers DESTDIR=$DESTDIR &&
Hans-G?nter@25574 98 make samples DESTDIR=$DESTDIR &&
pascal@4111 99 cd contrib/utils &&
pascal@13028 100 gcc rawplayer.c -o $DESTDIR/usr/bin/rawplayer
pascal@1187 101 }
pascal@1187 102
pascal@1187 103 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1187 104 genpkg_rules()
pascal@1187 105 {
pascal@4111 106 mkdir -p $fs/usr
Hans-G?nter@25573 107
Hans-G?nter@25573 108 cp -a $install/etc $fs
Hans-G?nter@25573 109 cp -a $install/var $fs
Hans-G?nter@25573 110 cp -a $install/usr/lib $fs/usr
Hans-G?nter@25573 111 cp -a $install/usr/sbin $fs/usr
Hans-G?nter@25573 112 cp -a $stuff/*/ $fs
Hans-G?nter@25573 113 rm -f $fs/usr/lib/libasteriskssl.so
Hans-G?nter@25573 114 ln -s libasteriskssl.so.1 $fs/usr/lib/libasteriskssl.so
pascal@1806 115 }
pascal@1806 116
pascal@1806 117 # Rules to configure package
pascal@1806 118 setup_rules()
pascal@1806 119 {
pascal@1806 120 case "$2" in
Hans-G?nter@25573 121 (mysql_host)
Hans-G?nter@25573 122 sed -i "s|^hostname=.*|hostname=$3|" \
Hans-G?nter@25573 123 "$1/etc/asterisk/cdr_mysql.conf"
Hans-G?nter@25573 124 sed -i "s|^dbhost=.*|dbhost=$3|" \
Hans-G?nter@25573 125 "$1/etc/asterisk/res_mysql.conf"
pascal@1806 126 ;;
Hans-G?nter@25573 127 (mysql_user)
Hans-G?nter@25573 128 sed -i "s|^user=.*|user=$3|" \
Hans-G?nter@25573 129 "$1/etc/asterisk/cdr_mysql.conf"
Hans-G?nter@25573 130 sed -i "s|^dbuser=.*|dbuser=$3|" \
Hans-G?nter@25573 131 "$1/etc/asterisk/res_mysql.conf"
pascal@1806 132 ;;
Hans-G?nter@25573 133 (mysql_password)
Hans-G?nter@25573 134 sed -i "s|^password=.*|password=$3|" \
Hans-G?nter@25573 135 "$1/etc/asterisk/cdr_mysql.conf"
Hans-G?nter@25573 136 sed -i "s|^dbpass=.*|dbpass=$3|" \
Hans-G?nter@25573 137 "$1/etc/asterisk/res_mysql.conf"
pascal@1806 138 ;;
Hans-G?nter@25573 139 (mysql_database)
Hans-G?nter@25573 140 sed -i "s|^dbname=.*|dbname=$3|" \
Hans-G?nter@25573 141 "$1/etc/asterisk/res_mysql.conf" \
Hans-G?nter@25573 142 "$1/etc/asterisk/cdr_mysql.conf"
pascal@1806 143 ;;
Hans-G?nter@25573 144 (pgsql_host)
Hans-G?nter@25573 145 sed -i "s|^hostname=.*|hostname=$3|" \
Hans-G?nter@25573 146 "$1/etc/asterisk/cdr_pgsql.conf"
Hans-G?nter@25573 147 sed -i "s|^dbhost=.*|dbhost=$3|" \
Hans-G?nter@25573 148 "$1/etc/asterisk/res_pgsql.conf"
pascal@1920 149 ;;
Hans-G?nter@25573 150 (pgsql_user)
Hans-G?nter@25573 151 sed -i "s|^user=.*|user=$3|" \
Hans-G?nter@25573 152 "$1/etc/asterisk/cdr_pgsql.conf"
Hans-G?nter@25573 153 sed -i "s|^dbuser=.*|dbuser=$3|" \
Hans-G?nter@25573 154 "$1/etc/asterisk/res_pgsql.conf"
pascal@1920 155 ;;
Hans-G?nter@25573 156 (pgsql_password)
Hans-G?nter@25573 157 sed -i "s|^password=.*|password=$3|" \
Hans-G?nter@25573 158 "$1/etc/asterisk/cdr_pgsql.conf"
Hans-G?nter@25573 159 sed -i "s|^dbpass=.*|dbpass=$3|" \
Hans-G?nter@25573 160 "$1/etc/asterisk/res_pgsql.conf"
pascal@1920 161 ;;
Hans-G?nter@25573 162 (pgsql_database)
Hans-G?nter@25573 163 sed -i "s|^dbname=.*|dbname=$3|" \
Hans-G?nter@25573 164 "$1/etc/asterisk/res_pgsql.conf" \
Hans-G?nter@25573 165 "$1/etc/asterisk/cdr_pgsql.conf"
pascal@1920 166 ;;
Hans-G?nter@25573 167 (*) cat <<EOT
pascal@1806 168 mysql_host hostname or ip of mysql server
pascal@1806 169 mysql_user username to connect to mysql server
pascal@1806 170 mysql_password password to connect to mysql server
pascal@1806 171 mysql_database database used by asterisk
pascal@1920 172 pgsql_host hostname or ip of postgresql server
pascal@1920 173 pgsql_user username to connect to postgresql server
pascal@1920 174 pgsql_password password to connect to postgresql server
pascal@1920 175 pgsql_database database used by asterisk
pascal@1806 176 EOT
pascal@1806 177 ;;
pascal@1806 178 esac
pascal@1187 179 }