wok annotate asterisk/receipt @ rev 6808

Fixed gettext-base and gettext. This is so we only need gettext-base in tazpkg since /usr/bin/gettext.sh needs ngettext and envsubst.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Oct 19 12:45:19 2010 +0000 (2010-10-19)
parents 255ba9018575
children 45fab90b3a6a
rev   line source
pascal@1187 1 # SliTaz package receipt.
pascal@1187 2
pascal@1187 3 PACKAGE="asterisk"
pascal@5452 4 VERSION="1.6.2.7"
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@4111 8 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@4111 9 WEB_SITE="http://www.asterisk.org/"
pascal@4111 10 WGET_URL="http://downloads.asterisk.org/pub/telephony/asterisk/$TARBALL"
pascal@1187 11 DEPENDS="openssl ncurses zlib libogg libvorbis curl newt libusb alsa-lib \
pascal@1187 12 speex iksemel spandsp tiff radiusclient-ng nbs freetds libpostgresqlclient \
pascal@4998 13 libmysqlclient libunixODBC popt dahdi libpri lua libcap attr net-snmp \
pascal@4998 14 portaudio sqlite libkrb5 libcomerr3 libsdl-image"
pascal@4111 15 BUILD_DEPENDS="libvorbis-dev curl-dev speex-dev alsa-lib-dev popt-dev \
pascal@4595 16 libpri-dev spandsp-dev lua-dev dahdi-dev postgresql-dev net-snmp-dev \
pascal@4615 17 libsdl-dev nbs-dev libogg-dev libogg speex spandsp iksemel iksemel-dev \
pascal@4615 18 gmime gmime-dev openssl-dev openssl unixODBC-dev unixODBC \
pascal@4615 19 openldap-dev openldap portaudio-dev portaudio"
pascal@1187 20 CONFIG_FILES="/etc/asterisk"
jozee@4931 21 TAGS="telephone toolkit"
pascal@1187 22
pascal@4111 23 # Rules to configure and make the package.
pascal@4111 24 #
pascal@4111 25 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig'
pascal@4111 26 #
pascal@4111 27 compile_rules()
pascal@1187 28 {
pascal@4111 29 cd $src
pascal@5442 30 busybox sed -i 's/tar xof/tar xf/' sounds/Makefile
pascal@5442 31 busybox sed -i '/LOG_ERROR, "The file/ {nd}' main/config.c
pascal@5442 32 busybox sed -i 's/LOG_ERROR, "The file/LOG_WARNING, "The file/' \
pascal@5442 33 main/config.c
pascal@5442 34 busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c
pascal@5442 35 busybox sed -i 's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/' \
pascal@4851 36 main/pbx.c
pascal@4615 37 echo '' | contrib/scripts/get_ilbc_source.sh
pascal@5442 38 busybox sed -i '/codec_ilbc/{ns/no/yes/}' menuselect-tree
pascal@4111 39 ./configure \
pascal@4111 40 --prefix=/usr \
pascal@4111 41 --sysconfdir=/etc \
pascal@4111 42 --without-pwlib \
pascal@4593 43 --with-dahdi=$WOK/dahdi/$(ls $WOK/dahdi/taz) \
pascal@4111 44 $CONFIGURE_ARGS &&
pascal@5804 45 make -j 4 &&
pascal@4111 46 make DESTDIR=$PWD/_pkg install &&
pascal@4111 47 make DESTDIR=$PWD/_pkg samples &&
pascal@4111 48 cd contrib/utils &&
pascal@4111 49 gcc rawplayer.c -o $src/_pkg/usr/bin/rawplayer
pascal@1187 50 }
pascal@1187 51
pascal@1187 52 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1187 53 genpkg_rules()
pascal@1187 54 {
pascal@4111 55 mkdir -p $fs/usr
pascal@4111 56 cp -a $_pkg/etc $fs
pascal@4111 57 cp -a $_pkg/var $fs
pascal@4111 58 cp -a $_pkg/usr/bin $fs/usr
pascal@4111 59 cp -a $_pkg/usr/lib $fs/usr
pascal@4111 60 cp -a $_pkg/usr/sbin $fs/usr
pascal@1806 61 cp -a stuff/* $fs
pascal@1806 62 }
pascal@1806 63
pascal@1806 64 # Rules to configure package
pascal@1806 65 setup_rules()
pascal@1806 66 {
pascal@1806 67 case "$2" in
pascal@1806 68 mysql_host)
pascal@1806 69 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
pascal@1920 70 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
pascal@1806 71 ;;
pascal@1806 72 mysql_user)
pascal@1806 73 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
pascal@1920 74 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
pascal@1806 75 ;;
pascal@1806 76 mysql_password)
pascal@1806 77 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
pascal@1920 78 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
pascal@1806 79 ;;
pascal@1806 80 mysql_database)
pascal@1920 81 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
pascal@1806 82 $1/etc/asterisk/cdr_mysql.conf
pascal@1806 83 ;;
pascal@1920 84 pgsql_host)
pascal@1920 85 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
pascal@1920 86 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
pascal@1920 87 ;;
pascal@1920 88 pgsql_user)
pascal@1920 89 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
pascal@1920 90 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
pascal@1920 91 ;;
pascal@1920 92 pgsql_password)
pascal@1920 93 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
pascal@1920 94 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
pascal@1920 95 ;;
pascal@1920 96 pgsql_database)
pascal@1920 97 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
pascal@1920 98 $1/etc/asterisk/cdr_pgsql.conf
pascal@1920 99 ;;
pascal@1806 100 *) cat <<EOT
pascal@1806 101 mysql_host hostname or ip of mysql server
pascal@1806 102 mysql_user username to connect to mysql server
pascal@1806 103 mysql_password password to connect to mysql server
pascal@1806 104 mysql_database database used by asterisk
pascal@1920 105 pgsql_host hostname or ip of postgresql server
pascal@1920 106 pgsql_user username to connect to postgresql server
pascal@1920 107 pgsql_password password to connect to postgresql server
pascal@1920 108 pgsql_database database used by asterisk
pascal@1806 109 EOT
pascal@1806 110 ;;
pascal@1806 111 esac
pascal@1187 112 }