wok-stable view asterisk/receipt @ rev 1213
asterisk, zaptel: create volatile.cpio.gz
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Aug 09 17:55:16 2008 +0000 (2008-08-09) |
parents | d659eda8a095 |
children | 1e551bfbe671 |
line source
1 # SliTaz package receipt.
3 PACKAGE="asterisk"
4 VERSION=
5 CATEGORY="system"
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=$AST_VER
20 }
22 # Rules to gen a SliTaz package suitable for Tazpkg.
23 genpkg_rules()
24 {
25 if [ -d taz/$PACKAGE-/fs ]; then
26 get_version
27 sed -i "s/^VERSION=.*/VERSION=\"$VERSION\"/" receipt
28 mv taz/$PACKAGE- taz/$PACKAGE-$VERSION
29 fi
30 _pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd)
31 while read file; do
32 dir=$(dirname $file)
33 [ -d $fs$dir ] || mkdir -p $fs$dir
34 eval cp -a "$_pkg$file" $fs$dir
35 done < $_pkg/../$PACKAGE.files-list
36 for i in $fs/etc/asterisk/*.sample; do
37 mv $i ${i%.sample}
38 done
39 }
41 # Pre and post install commands for Tazpkg.
42 post_install()
43 {
44 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
45 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
46 $(cd $1/ ; find etc/asterisk -type f)
47 EOT
48 }
50 repack_cleanup()
51 {
52 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
53 }