wok-next view zaptel/receipt @ rev 3864
Up: linux (2.6.30.4)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri Aug 07 23:18:34 2009 +0200 (2009-08-07) |
parents | f306d126580e |
children |
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 DEPENDS="libusb newt linux"
10 WANTED="bristuff"
11 CONFIG_FILES="/etc/zaptel.conf"
13 # Extract VERSION from WANTED package source
14 get_version()
15 {
16 eval $(grep ^ZAP_VER= $WOK/$WANTED/$WANTED-*/download.sh)
17 VERSION=$WANTED-$ZAP_VER
18 }
20 # Rules to gen a SliTaz package suitable for Tazpkg.
21 genpkg_rules()
22 {
23 mkdir -p $fs/etc/udev/rules.d
24 get_version
25 [ -d taz/$PACKAGE-$WANTED/fs ] && \
26 mv taz/$PACKAGE-$WANTED taz/$PACKAGE-$VERSION
27 kver=$(grep "kernel version" ../linux/$(ls ../linux/taz)/.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 src=$(dirname $_pkg)
38 cp $src/zaptel/build_tools/genudevrules $fs
39 sed -i 's/^ver/ver=99 # ver/' $fs/genudevrules
40 $fs/genudevrules | sed 's/asterisk/root/g' > $fs/etc/udev/rules.d/zaptel.rules
41 rm -f $fs/genudevrules
43 }
45 # Post install/remove commands for Tazpkg.
46 post_install()
47 {
48 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
49 tazpkg reconfigure udev --root=$1
50 }
52 post_remove()
53 {
54 depmod -a
55 }