wok view asterisk/receipt @ rev 4550
fix: pkg rules
author | Allan Pinto <allan316@gmail.com> |
---|---|
date | Fri Dec 04 17:16:37 2009 +0000 (2009-12-04) |
parents | 4a4eb43a0c91 |
children | 15e691c0777f |
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 lua"
14 BUILD_DEPENDS="libvorbis-dev curl-dev speex-dev alsa-lib-dev popt-dev \
15 libpri-dev spandsp-dev lua-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 sed -i 's|lua5.1/||' pbx/pbx_lua.c
26 ./configure \
27 --prefix=/usr \
28 --sysconfdir=/etc \
29 --without-pwlib \
30 $CONFIGURE_ARGS &&
31 make &&
32 make DESTDIR=$PWD/_pkg install &&
33 make DESTDIR=$PWD/_pkg samples &&
34 cd contrib/utils &&
35 gcc rawplayer.c -o $src/_pkg/usr/bin/rawplayer
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/usr
42 cp -a $_pkg/etc $fs
43 cp -a $_pkg/var $fs
44 cp -a $_pkg/usr/bin $fs/usr
45 cp -a $_pkg/usr/lib $fs/usr
46 cp -a $_pkg/usr/sbin $fs/usr
47 cp -a stuff/* $fs
48 }
50 # Rules to configure package
51 setup_rules()
52 {
53 case "$2" in
54 mysql_host)
55 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
56 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf
57 ;;
58 mysql_user)
59 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
60 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf
61 ;;
62 mysql_password)
63 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
64 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf
65 ;;
66 mysql_database)
67 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \
68 $1/etc/asterisk/cdr_mysql.conf
69 ;;
70 pgsql_host)
71 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf
72 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf
73 ;;
74 pgsql_user)
75 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf
76 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf
77 ;;
78 pgsql_password)
79 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf
80 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf
81 ;;
82 pgsql_database)
83 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \
84 $1/etc/asterisk/cdr_pgsql.conf
85 ;;
86 *) cat <<EOT
87 mysql_host hostname or ip of mysql server
88 mysql_user username to connect to mysql server
89 mysql_password password to connect to mysql server
90 mysql_database database used by asterisk
91 pgsql_host hostname or ip of postgresql server
92 pgsql_user username to connect to postgresql server
93 pgsql_password password to connect to postgresql server
94 pgsql_database database used by asterisk
95 EOT
96 ;;
97 esac
98 }