wok-next annotate asterisk/receipt @ rev 21207
try to build asterisk again
author | Hans-G?nter Theisgen |
---|---|
date | Mon Dec 02 09:52:22 2019 +0100 (2019-12-02) |
parents | 0f2575775b2d |
children | 82d538613d03 |
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 |
Hans-G?nter@21207 | 16 BUILD_DEPENDS="alsa-lib-dev bluez bluez-dev curl-dev dahdi-dev dahdi-linux |
Hans-G?nter@21207 | 17 dahdi-tools gmime gmime-dev gtk2-dev iksemel iksemel-dev jack-dev |
Hans-G?nter@21207 | 18 libcap-dev libical-dev libpri-dev libvorbis-dev libxml2-dev lua lua-dev |
Hans-G?nter@21207 | 19 mysql-dev nbs-dev ncurses-dev neon neon-dev net-snmp newt-dev openldap |
Hans-G?nter@21207 | 20 openldap-dev openssl-dev popt-dev portaudio-dev postgresql postgresql-dev |
Hans-G?nter@21207 | 21 radiusclient-ng radiusclient-ng-dev sdl-dev sdl-image-dev speex-dev |
Hans-G?nter@21207 | 22 sqlite3-dev unixODBC unixODBC-dev" |
al@21020 | 23 SPLIT="$PACKAGE-dev" |
pascal@1187 | 24 |
pascal@4111 | 25 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig' |
pascal@4111 | 26 # |
Hans-G?nter@21207 | 27 compile_rules() |
Hans-G?nter@21207 | 28 { |
pascal@14185 | 29 # according to https://issues.asterisk.org/jira/browse/ASTERISK-20576 |
pascal@14185 | 30 # the message "Makefile:82: pjproject/build.mak: No such file or directory" is normal :-/ |
pascal@15466 | 31 sed -i 's/>no</>yes</' addons/[acor]*.c |
pascal@13871 | 32 find * -name config.guess -o -name configure | xargs \ |
pascal@13877 | 33 sed -i "s/(uname -m)/(echo $ARCH)/" |
pascal@13871 | 34 find * -name Makefile | xargs \ |
pascal@13877 | 35 sed -i "s/(shell uname -m)/(shell echo $ARCH)/" |
pascal@5442 | 36 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile |
pascal@5442 | 37 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c |
pascal@5442 | 38 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \ |
pascal@5442 | 39 main/config.c |
pascal@5442 | 40 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c |
pascal@10941 | 41 grep -rsl '^#define AST_PBX_MAX_STACK' * | xargs busybox sed -i \ |
pascal@10941 | 42 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/' |
al@20729 | 43 [ -s $SRC/rfc3951.txt ] || |
al@20729 | 44 wget -P $SRC http://www.ietf.org/rfc/rfc3951.txt |
al@20729 | 45 cp $SRC/rfc3951.txt codecs/ilbc || |
pascal@12858 | 46 cp $stuff/rfc3951.txt codecs/ilbc |
pascal@10943 | 47 [ -f codecs/ilbc/iLBC_define.h ] || ( cd codecs/ilbc && |
pascal@10943 | 48 awk -f $stuff/extract-cfile.awk rfc3951.txt > /dev/null ) |
al@21020 | 49 mkdir -p $install/usr/bin |
al@20519 | 50 # export CXXFLAGS="$CXXFLAGS -fPIC" |
Hans-G?nter@21207 | 51 |
Hans-G?nter@21207 | 52 ./bootstrap.sh && |
Hans-G?nter@21207 | 53 ./configure \ |
Hans-G?nter@21207 | 54 --without-pwlib \ |
Hans-G?nter@21207 | 55 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \ |
Hans-G?nter@21207 | 56 --with-tonezone \ |
pascal@4111 | 57 $CONFIGURE_ARGS && |
al@21020 | 58 make -j1 2>&1 | grep -v pjproject && |
al@21020 | 59 make -j1 DESTDIR=$install install && |
al@21020 | 60 make -j1 DESTDIR=$install samples && |
pascal@4111 | 61 cd contrib/utils && |
al@21020 | 62 gcc rawplayer.c -o $install/usr/bin/rawplayer |
pascal@1187 | 63 } |
pascal@1187 | 64 |
Hans-G?nter@21207 | 65 genpkg_rules() |
Hans-G?nter@21207 | 66 { |
pascal@20324 | 67 case $PACKAGE in |
al@20519 | 68 asterisk) |
al@20519 | 69 CONFIG_FILES="/etc/asterisk" |
Hans-G?nter@21207 | 70 DEPENDS="alsa-lib attr bluez curl dahdi freetds iksemel libcap |
Hans-G?nter@21207 | 71 libcomerr3 libical libkrb5 libldap libmysqlclient libogg |
Hans-G?nter@21207 | 72 libpostgresqlclient libpri libtiff libusb-compat libunixODBC |
Hans-G?nter@21207 | 73 libvorbis libxml2 lua nbs ncurses neon net-snmp newt openssl |
Hans-G?nter@21207 | 74 popt portaudio radiusclient-ng sdl sdl-image spandsp speex |
Hans-G?nter@21207 | 75 sqlite3 util-linux-uuid zlib" |
Hans-G?nter@21207 | 76 |
al@20519 | 77 mkdir -p $fs/usr |
Hans-G?nter@21207 | 78 |
Hans-G?nter@21207 | 79 cp -a $install/etc $fs |
Hans-G?nter@21207 | 80 cp -a $install/var $fs |
Hans-G?nter@21207 | 81 cp -a $install/usr/lib $fs/usr |
Hans-G?nter@21207 | 82 cp -a $install/usr/sbin $fs/usr |
Hans-G?nter@21207 | 83 cp -a $stuff/*/ $fs |
al@20519 | 84 TAGS="telephony" |
al@20519 | 85 ;; |
al@20519 | 86 asterisk-dev) |
al@20519 | 87 copy @dev |
al@20519 | 88 ;; |
pascal@20324 | 89 esac |
pascal@1806 | 90 } |
pascal@1806 | 91 |
Hans-G?nter@21207 | 92 setup_rules() |
Hans-G?nter@21207 | 93 { |
pascal@1806 | 94 case "$2" in |
al@21020 | 95 mysql_host) |
al@21020 | 96 sed "s|^hostname=.*|hostname=$3|" -i "$1/etc/asterisk/cdr_mysql.conf" |
al@21020 | 97 sed "s|^dbhost=.*|dbhost=$3|" -i "$1/etc/asterisk/res_mysql.conf" |
al@21020 | 98 ;; |
al@21020 | 99 mysql_user) |
al@21020 | 100 sed "s|^user=.*|user=$3|" -i "$1/etc/asterisk/cdr_mysql.conf" |
al@21020 | 101 sed "s|^dbuser=.*|dbuser=$3|" -i "$1/etc/asterisk/res_mysql.conf" |
al@21020 | 102 ;; |
al@21020 | 103 mysql_password) |
al@21020 | 104 sed "s|^password=.*|password=$3|" -i "$1/etc/asterisk/cdr_mysql.conf" |
al@21020 | 105 sed "s|^dbpass=.*|dbpass=$3|" -i "$1/etc/asterisk/res_mysql.conf" |
al@21020 | 106 ;; |
al@21020 | 107 mysql_database) |
al@21020 | 108 sed "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_mysql.conf" \ |
al@21020 | 109 -i "$1/etc/asterisk/cdr_mysql.conf" |
al@21020 | 110 ;; |
al@21020 | 111 pgsql_host) |
al@21020 | 112 sed "s|^hostname=.*|hostname=$3|" -i "$1/etc/asterisk/cdr_pgsql.conf" |
al@21020 | 113 sed "s|^dbhost=.*|dbhost=$3|" -i "$1/etc/asterisk/res_pgsql.conf" |
al@21020 | 114 ;; |
al@21020 | 115 pgsql_user) |
al@21020 | 116 sed "s|^user=.*|user=$3|" -i "$1/etc/asterisk/cdr_pgsql.conf" |
al@21020 | 117 sed "s|^dbuser=.*|dbuser=$3|" -i "$1/etc/asterisk/res_pgsql.conf" |
al@21020 | 118 ;; |
al@21020 | 119 pgsql_password) |
al@21020 | 120 sed "s|^password=.*|password=$3|" -i "$1/etc/asterisk/cdr_pgsql.conf" |
al@21020 | 121 sed "s|^dbpass=.*|dbpass=$3|" -i "$1/etc/asterisk/res_pgsql.conf" |
al@21020 | 122 ;; |
al@21020 | 123 pgsql_database) |
al@21020 | 124 sed "s|^dbname=.*|dbname=$3|" "$1/etc/asterisk/res_pgsql.conf" \ |
al@21020 | 125 -i "$1/etc/asterisk/cdr_pgsql.conf" |
pascal@1920 | 126 ;; |
pascal@1806 | 127 *) cat <<EOT |
pascal@1806 | 128 mysql_host hostname or ip of mysql server |
pascal@1806 | 129 mysql_user username to connect to mysql server |
pascal@1806 | 130 mysql_password password to connect to mysql server |
pascal@1806 | 131 mysql_database database used by asterisk |
pascal@1920 | 132 pgsql_host hostname or ip of postgresql server |
pascal@1920 | 133 pgsql_user username to connect to postgresql server |
pascal@1920 | 134 pgsql_password password to connect to postgresql server |
pascal@1920 | 135 pgsql_database database used by asterisk |
pascal@1806 | 136 EOT |
pascal@1806 | 137 ;; |
pascal@1806 | 138 esac |
pascal@1187 | 139 } |