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