wok-current view asterisk/receipt @ rev 1886
aufs: fix kernel module path
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Dec 17 16:22:32 2008 +0000 (2008-12-17) |
parents | 03a799424aaa |
children | 45e6c1f3da4f |
line source
1 # SliTaz package receipt.
3 PACKAGE="asterisk"
4 VERSION="bristuff"
5 CATEGORY="misc"
6 SHORT_DESC="Open Source PBX and telephony toolkit."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 WEB_SITE="http://www.digium.com/"
9 WANTED="bristuff"
10 DEPENDS="openssl ncurses zlib libogg libvorbis curl newt libusb alsa-lib \
11 speex iksemel spandsp tiff radiusclient-ng nbs freetds libpostgresqlclient \
12 libmysqlclient"
13 CONFIG_FILES="/etc/asterisk"
15 # Extract VERSION from WANTED package source
16 get_version()
17 {
18 eval $(grep ^AST_VER= $WOK/$WANTED/$WANTED-*/download.sh)
19 VERSION=$WANTED-$AST_VER
20 }
22 # Rules to gen a SliTaz package suitable for Tazpkg.
23 genpkg_rules()
24 {
25 get_version
26 [ -d taz/$PACKAGE-$WANTED/fs ] && \
27 mv taz/$PACKAGE-$WANTED taz/$PACKAGE-$VERSION
28 _pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd)
29 while read file; do
30 dir=$(dirname $file)
31 [ -d $fs$dir ] || mkdir -p $fs$dir
32 eval cp -a "$_pkg$file" $fs$dir
33 done < $_pkg/../$PACKAGE.files-list
34 for i in $fs/etc/asterisk/*.sample; do
35 mv $i ${i%.sample}
36 done
37 cp -a stuff/* $fs
38 }
40 # Rules to configure package
41 setup_rules()
42 {
43 case "$2" in
44 mysql_host)
45 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf
46 sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysqlconf
47 ;;
48 mysql_user)
49 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf
50 sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysqlconf
51 ;;
52 mysql_password)
53 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf
54 sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysqlconf
55 ;;
56 mysql_database)
57 sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysqlconf \
58 $1/etc/asterisk/cdr_mysql.conf
59 ;;
60 *) cat <<EOT
61 mysql_host hostname or ip of mysql server
62 mysql_user username to connect to mysql server
63 mysql_password password to connect to mysql server
64 mysql_database database used by asterisk
65 EOT
66 ;;
67 esac
68 }
70 # Pre and post install commands for Tazpkg.
71 post_install()
72 {
73 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
74 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
75 $(cd $1/ ; find etc/asterisk -type f)
76 EOT
77 }
79 repack_cleanup()
80 {
81 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
82 }