wok view linmodem-hsfmodem/receipt @ rev 10414

make: Added cook_tmp_toolchain function to fix tazwok cook-toolchain.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue May 24 07:50:03 2011 +0000 (2011-05-24)
parents 9bbc51dbc27f
children 51dc38f6efca
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 DEPENDS="module-init-tools perl usbutils"
10 BUILD_DEPENDS="cpio linux lzma linux-module-headers util-linux-ng-getopt"
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 cd $src
20 echo "Apply $file..."
21 patch -p1 < $(ls $stuff/$SOURCE-*.diff) || return 1
22 grep -rl 'uname -r' . | xargs sed -i "s/uname -r/echo $KERNEL_VERSION/g"
23 # build driver
24 echo "Build driver"
25 make ROOT=$PWD/_pkg install
26 # build kernel modules
27 echo "Running $PWD/_pkg/usr/sbin/hsfconfig -ka"
28 $PWD/_pkg/usr/sbin/hsfconfig -ka
29 echo "done."
30 [ -d /lib/modules/$KERNEL_VERSION/extra ]
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
37 # kernel modules
38 mkdir -p $fs/lib/modules/$KERNEL_VERSION
39 cp -a /lib/modules/$KERNEL_VERSION/extra $fs/lib/modules/$KERNEL_VERSION
40 # cleaning up
41 rm -r /lib/modules/$KERNEL_VERSION/extra
42 # command files
43 mkdir -p $fs/usr
44 cp -a $_pkg/usr/sbin $fs/usr
45 cp -a $_pkg/usr/lib $fs/usr
46 # config files
47 mkdir -p $fs/etc
48 cp -a $_pkg/etc/hsfmodem $fs/etc
49 cp -a $stuff/zone.tab $fs/etc/hsfmodem
50 }
52 post_install()
53 {
54 depmod -a
55 echo -n "Install serial port devices"
56 hsfconfig -s > /dev/null
57 status
58 echo -n "Install kernel modules"
59 modprobe -v /dev/ttySHSF > /dev/null
60 status
61 echo -n "Set region"
62 hsfconfig -c AUTO
63 echo "-----------------------------------------------------------------------------"
64 echo "To enable your modem's full functionality (high-speed 56k data and FAX),"
65 echo "a license registration key must be obtained from Linuxant and entered with"
66 echo "hsfconfig --license."
67 echo ""
68 echo "Without a proper license key, the modem can only operate in FREE mode,"
69 echo "limited to a maximum speed of 14.4Kbps (V.32bis) and the FAX"
70 echo "functionality will not be available."
71 }
73 pre_remove()
74 {
75 hsfstop
76 }
78 post_remove()
79 {
80 depmod -a
81 rm -r /etc/hsfmodem
82 }