wok view linmodem-hsfmodem/receipt @ rev 7120

Up: slitaz-configs (4.0) with new cooking artwork
author Christophe Lincoln <pankso@slitaz.org>
date Thu Nov 04 21:29:09 2010 +0100 (2010-11-04)
parents
children 559c48f2524f
line source
1 # SliTaz package receipt.
3 PACKAGE="linmodem-hsfmodem"
4 SOURCE="hsfmodem"
5 VERSION="7.80.02.05full"
6 CATEGORY="non-free"
7 SHORT_DESC="Driver for the Conexant (formerly Rockwell) HSF Softmodem family."
8 MAINTAINER="orphaned@sliatz.org"
9 DEPENDS="module-init-tools perl usbutils"
10 BUILD_DEPENDS="cpio linux lzma"
11 TARBALL="$SOURCE-$VERSION.tar.gz"
12 WEB_SITE="http://www.linuxant.com/drivers"
13 WGET_URL="http://www.linuxant.com/drivers/hsf/full/archive/$SOURCE-$VERSION/$TARBALL"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
19 [ -d $WOK/linux/taz ] || tazwok cook linux
20 cd $src
21 echo "Apply $file..."
22 patch -p1 < ../stuff/$SOURCE-$VERSION.diff || exit 1
23 # set /usr/src/linux
24 echo "Set fake /usr/src/linux dir..Ã"
25 [ -e /usr/src ] && SRCDIR=yes || mkdir -p /usr/src
26 ln -s $WOK/linux/linux-$(uname -r | sed s/-slitaz//) /usr/src/linux
27 # build driver
28 echo "Build driver"
29 make ROOT=$PWD/_pkg install
30 # build kernel modules
31 echo "Running $PWD/_pkg/usr/sbin/hsfconfig -ka"
32 $PWD/_pkg/usr/sbin/hsfconfig -ka
33 # reset /usr/src/linux
34 echo "Clean files"
35 rm /usr/src/linux
36 [ "$SRCDIR" = "yes" ] && rmdir /usr/src
37 echo "done."
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 # kernel modules
44 mkdir -p $fs/lib/modules/$(uname -r)
45 cp -a /lib/modules/$(uname -r)/extra $fs/lib/modules/$(uname -r)
46 # cleaning up
47 rm -r /lib/modules/$(uname -r)/extra
48 # command files
49 mkdir -p $fs/usr
50 cp -a $_pkg/usr/sbin $fs/usr
51 cp -a $_pkg/usr/lib $fs/usr
52 # config files
53 mkdir -p $fs/etc
54 cp -a $_pkg/etc/hsfmodem $fs/etc
55 cp -a stuff/zone.tab $fs/etc/hsfmodem
56 }
58 post_install()
59 {
60 depmod -a
61 echo -n "Install serial port devices"
62 hsfconfig -s > /dev/null
63 status
64 echo -n "Install kernel modules"
65 modprobe -v /dev/ttySHSF > /dev/null
66 status
67 echo -n "Set region"
68 hsfconfig -c AUTO
69 echo "-----------------------------------------------------------------------------"
70 echo "To enable your modem's full functionality (high-speed 56k data and FAX),"
71 echo "a license registration key must be obtained from Linuxant and entered with"
72 echo "hsfconfig --license."
73 echo ""
74 echo "Without a proper license key, the modem can only operate in FREE mode,"
75 echo "limited to a maximum speed of 14.4Kbps (V.32bis) and the FAX"
76 echo "functionality will not be available."
77 }
79 pre_remove()
80 {
81 hsfstop
82 }
84 post_remove()
85 {
86 depmod -a
87 rm -r /etc/hsfmodem
88 }