wok-next view zaptel/receipt @ rev 1517
mhwaveedit: fix compile_rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Oct 08 10:42:32 2008 +0000 (2008-10-08) |
parents | 03a799424aaa |
children | 879fb025757a |
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 get_version
23 [ -d taz/$PACKAGE-$WANTED/fs ] && \
24 mv taz/$PACKAGE-$WANTED taz/$PACKAGE-$VERSION
25 kver=$(grep "kernel version" ../linux/linux-*/.config)
26 kver=${kver##* }
27 EXTRAVERSION=_$kver
28 _pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd)
29 while read file; do
30 dir=$(dirname $file)
31 [ -d $fs$dir ] || mkdir -p $fs$dir
32 eval cp -a "$_pkg$file" $fs$dir
33 done < $_pkg/../$PACKAGE.files-list
34 rm -f $fs/lib/modules/*/modules.*
35 }
37 # Post install/remove commands for Tazpkg.
38 post_install()
39 {
40 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
41 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
42 etc/zaptel.conf
43 EOT
44 depmod -a -b "$1/" ${EXTRAVERSION#_}-slitaz
45 }
47 post_remove()
48 {
49 depmod -a
50 }
52 repack_cleanup()
53 {
54 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
55 }