wok view asterisk/receipt @ rev 4111
Up asterisk (1.6.1.6) thanks pankso !
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Sep 19 22:31:37 2009 +0200 (2009-09-19) |
parents | 7a436db659a4 |
children | 4a4eb43a0c91 |
line source
1 # SliTaz package receipt.
3 PACKAGE="asterisk"
4 VERSION="1.6.1.6"
5 CATEGORY="misc"
6 SHORT_DESC="Open Source PBX and telephony toolkit."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.asterisk.org/"
10 WGET_URL="http://downloads.asterisk.org/pub/telephony/asterisk/$TARBALL"
11 DEPENDS="openssl ncurses zlib libogg libvorbis curl newt libusb alsa-lib \
12 speex iksemel spandsp tiff radiusclient-ng nbs freetds libpostgresqlclient \
13 libmysqlclient libunixODBC popt dahdi libpri"
14 BUILD_DEPENDS="libvorbis-dev curl-dev speex-dev alsa-lib-dev popt-dev \
15 libpri-dev spandsp-dev"
16 CONFIG_FILES="/etc/asterisk"
18 # Rules to configure and make the package.
19 #
20 # Graphical configuration: 'make menuconfig' or 'make gmenuconfig'
21 #
22 compile_rules()
23 {
24 cd $src
25 ./configure \
26 --prefix=/usr \
27 --sysconfdir=/etc \
28 --without-pwlib \
29 $CONFIGURE_ARGS &&
30 make &&
31 make DESTDIR=$PWD/_pkg install &&
32 make DESTDIR=$PWD/_pkg samples &&
33 cd contrib/utils &&
34 gcc rawplayer.c -o $src/_pkg/usr/bin/rawplayer
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr
41 cp -a $_pkg/etc $fs
42 cp -a $_pkg/var $fs
43 cp -a $_pkg/usr/bin $fs/usr
44 cp -a $_pkg/usr/lib $fs/usr
45 cp -a $_pkg/usr/sbin $fs/usr
46 cp -a stuff/* $fs
47 }
49 # Rules to configure package
50 setup_rules()
51 {
52 case "$2" in
53 mysql_host)
54 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
55 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
56 ;;
57 mysql_user)
58 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
59 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
60 ;;
61 mysql_password)
62 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
63 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
64 ;;
65 mysql_database)
66 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
67 $1/etc/asterisk/cdr_mysql.conf
68 ;;
69 pgsql_host)
70 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
71 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
72 ;;
73 pgsql_user)
74 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
75 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
76 ;;
77 pgsql_password)
78 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
79 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
80 ;;
81 pgsql_database)
82 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
83 $1/etc/asterisk/cdr_pgsql.conf
84 ;;
85 *) cat <<EOT
86 mysql_host hostname or ip of mysql server
87 mysql_user username to connect to mysql server
88 mysql_password password to connect to mysql server
89 mysql_database database used by asterisk
90 pgsql_host hostname or ip of postgresql server
91 pgsql_user username to connect to postgresql server
92 pgsql_password password to connect to postgresql server
93 pgsql_database database used by asterisk
94 EOT
95 ;;
96 esac
97 }