wok-current annotate zaptel/receipt @ rev 2199
Remove duplicate get-*-firmware
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 09 17:12:44 2009 +0000 (2009-02-09) |
parents | bd6010223726 |
children | 74d9e193ac36 |
rev | line source |
---|---|
pascal@1187 | 1 # SliTaz package receipt. |
pascal@1187 | 2 |
pascal@1187 | 3 PACKAGE="zaptel" |
pascal@1327 | 4 VERSION="bristuff" |
pascal@1423 | 5 CATEGORY="misc" |
pascal@1187 | 6 SHORT_DESC="Zapata Telephony Interface Driver." |
pascal@1187 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@1187 | 8 WEB_SITE="http://www.digium.com/" |
pascal@1187 | 9 WANTED="bristuff" |
pascal@1187 | 10 CONFIG_FILES="/etc/zaptel.conf" |
pascal@1187 | 11 |
pascal@1187 | 12 # Extract VERSION from WANTED package source |
pascal@1187 | 13 get_version() |
pascal@1187 | 14 { |
pascal@1187 | 15 eval $(grep ^ZAP_VER= $WOK/$WANTED/$WANTED-*/download.sh) |
pascal@1327 | 16 VERSION=$WANTED-$ZAP_VER |
pascal@1187 | 17 } |
pascal@1187 | 18 |
pascal@1187 | 19 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1187 | 20 genpkg_rules() |
pascal@1187 | 21 { |
pascal@1780 | 22 mkdir -p $fs/etc/udev/rules.d |
pascal@1327 | 23 get_version |
pascal@1327 | 24 [ -d taz/$PACKAGE-$WANTED/fs ] && \ |
pascal@1327 | 25 mv taz/$PACKAGE-$WANTED taz/$PACKAGE-$VERSION |
pascal@2062 | 26 kver=$(grep "kernel version" ../linux/$(ls ../linux/taz)/.config) |
pascal@1187 | 27 kver=${kver##* } |
pascal@1187 | 28 EXTRAVERSION=_$kver |
pascal@1187 | 29 _pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd) |
pascal@1187 | 30 while read file; do |
pascal@1187 | 31 dir=$(dirname $file) |
pascal@1187 | 32 [ -d $fs$dir ] || mkdir -p $fs$dir |
pascal@1187 | 33 eval cp -a "$_pkg$file" $fs$dir |
pascal@1187 | 34 done < $_pkg/../$PACKAGE.files-list |
pascal@1187 | 35 rm -f $fs/lib/modules/*/modules.* |
pascal@1780 | 36 src=$(dirname $_pkg) |
pascal@1780 | 37 cp $src/zaptel/build_tools/genudevrules $fs |
pascal@1780 | 38 sed -i 's/^ver/ver=99 # ver/' $fs/genudevrules |
pascal@1780 | 39 $fs/genudevrules | sed 's/asterisk/root/g' > $fs/etc/udev/rules.d/zaptel.rules |
pascal@1780 | 40 rm -f $fs/genudevrules |
pascal@1780 | 41 |
pascal@1187 | 42 } |
pascal@1187 | 43 |
pascal@1187 | 44 # Post install/remove commands for Tazpkg. |
pascal@1187 | 45 post_install() |
pascal@1187 | 46 { |
pascal@1455 | 47 depmod -a -b "$1/" ${EXTRAVERSION#_}-slitaz |
pascal@1187 | 48 } |
pascal@1187 | 49 |
pascal@1187 | 50 post_remove() |
pascal@1187 | 51 { |
pascal@1187 | 52 depmod -a |
pascal@1187 | 53 } |