wok-undigest view linmodem-hsfmodem/receipt @ rev 1047

Up vifm (0.7.6)
author Paul Issott <paul@slitaz.org>
date Mon Nov 04 19:07:08 2013 +0000 (2013-11-04)
parents 2fb6f029b2c5
children 135ad0e1fc7d
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@slitaz.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-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 sed -i 's/DECLARE_MUTEX/DEFINE_SEMAPHORE/' \
25 modules/osnvm.c modules/GPL/serial_cnxt.c
26 sed -i 's/\.ioctl/.unlocked_ioctl/' modules/osdiag.c
27 # build driver
28 echo "Build driver"
29 make ROOT=$DESTDIR install
30 # build kernel modules
31 echo "Running $DESTDIR/usr/sbin/hsfconfig -ka..."
32 $DESTDIR/usr/sbin/hsfconfig -ka
33 echo " OK"
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 # kernel modules
40 mkdir -p $fs/lib/modules/$kvers
41 cp -a /lib/modules/$kvers/extra $fs/lib/modules/$kvers
42 # cleaning up
43 rm -r /lib/modules/$kvers/extra
44 # command files
45 mkdir -p $fs/usr
46 cp -a $_pkg/usr/sbin $fs/usr
47 cp -a $_pkg/usr/lib $fs/usr
48 # config files
49 mkdir -p $fs/etc
50 cp -a $_pkg/etc/hsfmodem $fs/etc
51 cp -a $stuff/zone.tab $fs/etc/hsfmodem
52 }
54 post_install()
55 {
56 depmod -a
57 echo -n "Install serial port devices"
58 hsfconfig -s > /dev/null
59 status
60 echo -n "Install kernel modules"
61 modprobe -v /dev/ttySHSF > /dev/null
62 status
63 echo -n "Set region"
64 hsfconfig -c AUTO
65 echo "-----------------------------------------------------------------------------"
66 echo "To enable your modem's full functionality (high-speed 56k data and FAX),"
67 echo "a license registration key must be obtained from Linuxant and entered with"
68 echo "hsfconfig --license."
69 echo ""
70 echo "Without a proper license key, the modem can only operate in FREE mode,"
71 echo "limited to a maximum speed of 14.4Kbps (V.32bis) and the FAX"
72 echo "functionality will not be available."
73 }
75 pre_remove()
76 {
77 hsfstop
78 }
80 post_remove()
81 {
82 depmod -a
83 rm -r /etc/hsfmodem
84 }