wok-stable view zaptel/receipt @ rev 3104
Add util-linux-ng (blkid, cfdisk, partx, etc)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun May 17 23:49:40 2009 +0200 (2009-05-17) |
parents | 74d9e193ac36 |
children | f25b1712883d |
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 }
51 post_remove()
52 {
53 depmod -a
54 }