wok-6.x view zaptel/receipt @ rev 1828

Up: fuse (2.7.4) (fixes fusermount unmount)
author Bill Nagel <b1+slitaz@nagel.org>
date Tue Dec 09 07:44:54 2008 -0800 (2008-12-09)
parents 0d30d3d18dcb
children bd6010223726
line source
1 # SliTaz package receipt.
3 PACKAGE="zaptel"
4 VERSION="bristuff"
5 CATEGORY="misc"
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=$WANTED-$ZAP_VER
17 }
19 # Rules to gen a SliTaz package suitable for Tazpkg.
20 genpkg_rules()
21 {
22 mkdir -p $fs/etc/udev/rules.d
23 get_version
24 [ -d taz/$PACKAGE-$WANTED/fs ] && \
25 mv taz/$PACKAGE-$WANTED taz/$PACKAGE-$VERSION
26 kver=$(grep "kernel version" ../linux/linux-*/.config)
27 kver=${kver##* }
28 EXTRAVERSION=_$kver
29 _pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd)
30 while read file; do
31 dir=$(dirname $file)
32 [ -d $fs$dir ] || mkdir -p $fs$dir
33 eval cp -a "$_pkg$file" $fs$dir
34 done < $_pkg/../$PACKAGE.files-list
35 rm -f $fs/lib/modules/*/modules.*
36 src=$(dirname $_pkg)
37 cp $src/zaptel/build_tools/genudevrules $fs
38 sed -i 's/^ver/ver=99 # ver/' $fs/genudevrules
39 $fs/genudevrules | sed 's/asterisk/root/g' > $fs/etc/udev/rules.d/zaptel.rules
40 rm -f $fs/genudevrules
42 }
44 # Post install/remove commands for Tazpkg.
45 post_install()
46 {
47 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
48 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
49 etc/zaptel.conf
50 EOT
51 depmod -a -b "$1/" ${EXTRAVERSION#_}-slitaz
52 }
54 post_remove()
55 {
56 depmod -a
57 }
59 repack_cleanup()
60 {
61 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
62 }