wok-current view zaptel/receipt @ rev 1272
lighttpd: declare config files
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 18 11:52:51 2008 +0000 (2008-08-18) |
parents | d659eda8a095 |
children | c343c644ab92 |
line source
1 # SliTaz package receipt.
3 PACKAGE="zaptel"
4 VERSION=
5 CATEGORY="system"
6 SHORT_DESC="Zapata Telephony Interface Driver."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 WEB_SITE="http://www.digium.com/"
9 WANTED="bristuff"
10 CONFIG_FILES="/etc/zaptel.conf"
12 # Extract VERSION from WANTED package source
13 get_version()
14 {
15 eval $(grep ^ZAP_VER= $WOK/$WANTED/$WANTED-*/download.sh)
16 VERSION=$ZAP_VER
17 }
19 # Rules to gen a SliTaz package suitable for Tazpkg.
20 genpkg_rules()
21 {
22 if [ -d taz/$PACKAGE-/fs ]; then
23 get_version
24 sed -i "s/^VERSION=.*/VERSION=\"$VERSION\"/" receipt
25 mv taz/$PACKAGE- taz/$PACKAGE-$VERSION
26 fi
27 kver=$(grep "kernel version" ../linux/linux-*/.config)
28 kver=${kver##* }
29 EXTRAVERSION=_$kver
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 rm -f $fs/lib/modules/*/modules.*
37 }
39 # Post install/remove commands for Tazpkg.
40 post_install()
41 {
42 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
43 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
44 etc/zaptel.conf
45 EOT
46 depmod -a -b "$1/"
47 }
49 post_remove()
50 {
51 depmod -a
52 }
54 repack_cleanup()
55 {
56 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
57 }