wok view linmodem-hsfmodem/receipt @ rev 10668

linmodem-*: clean-up, tab ident and user $kvers set by pkg builders
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 27 10:23:00 2011 +0200 (2011-05-27)
parents 61b2df5c8f90
children
line source
1 # SliTaz package receipt.
3 PACKAGE="linmodem-hsfmodem"
4 SOURCE="hsfmodem"
5 VERSION="7.80.02.06full"
6 CATEGORY="non-free"
7 SHORT_DESC="Driver for the Conexant (formerly Rockwell) HSF Softmodem family."
8 MAINTAINER="orphaned@sliatz.org"
9 TARBALL="$SOURCE-$VERSION.tar.gz"
10 WEB_SITE="http://www.linuxant.com/drivers"
11 WGET_URL="http://www.linuxant.com/drivers/hsf/full/archive/$SOURCE-$VERSION/$TARBALL"
13 DEPENDS="module-init-tools perl usbutils"
14 BUILD_DEPENDS="cpio linux lzma linux-module-headers util-linux-ng-getopt \
15 usbutils-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 echo "Apply $file..."
22 patch -p1 < $(ls $stuff/$SOURCE-*.diff) || return 1
23 grep -rl 'uname -r' . | xargs sed -i "s/uname -r/echo $kvers/g"
24 # build driver
25 echo "Build driver"
26 make ROOT=$DESTDIR install
27 # build kernel modules
28 echo "Running $DESTDIR/usr/sbin/hsfconfig -ka..."
29 $DESTDIR/usr/sbin/hsfconfig -ka
30 echo " OK"
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 # kernel modules
37 mkdir -p $fs/lib/modules/$kvers
38 cp -a /lib/modules/$kvers/extra $fs/lib/modules/$kvers
39 # cleaning up
40 rm -r /lib/modules/$kvers/extra
41 # command files
42 mkdir -p $fs/usr
43 cp -a $_pkg/usr/sbin $fs/usr
44 cp -a $_pkg/usr/lib $fs/usr
45 # config files
46 mkdir -p $fs/etc
47 cp -a $_pkg/etc/hsfmodem $fs/etc
48 cp -a $stuff/zone.tab $fs/etc/hsfmodem
49 }
51 post_install()
52 {
53 depmod -a
54 echo -n "Install serial port devices"
55 hsfconfig -s > /dev/null
56 status
57 echo -n "Install kernel modules"
58 modprobe -v /dev/ttySHSF > /dev/null
59 status
60 echo -n "Set region"
61 hsfconfig -c AUTO
62 echo "-----------------------------------------------------------------------------"
63 echo "To enable your modem's full functionality (high-speed 56k data and FAX),"
64 echo "a license registration key must be obtained from Linuxant and entered with"
65 echo "hsfconfig --license."
66 echo ""
67 echo "Without a proper license key, the modem can only operate in FREE mode,"
68 echo "limited to a maximum speed of 14.4Kbps (V.32bis) and the FAX"
69 echo "functionality will not be available."
70 }
72 pre_remove()
73 {
74 hsfstop
75 }
77 post_remove()
78 {
79 depmod -a
80 rm -r /etc/hsfmodem
81 }