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

copied libxext recipe from wok-next
author Hans-G?nter Theisgen
date Fri Nov 15 17:38:29 2019 +0100 (2019-11-15)
parents cfbcc9c15bd8
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@slitaz.org"
9 LICENSE="other"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://www.linuxant.com/drivers"
12 WGET_URL="http://www.linuxant.com/drivers/hsf/full/archive/$SOURCE-$VERSION/$TARBALL"
14 DEPENDS="module-init-tools perl usbutils"
15 BUILD_DEPENDS="cpio linux lzma linux-module-headers util-linux-getopt \
16 usbutils-dev"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
22 echo "Apply $file..."
23 patch -p1 < $(ls $stuff/$SOURCE-*.diff) || return 1
24 grep -rl 'uname -r' . | xargs sed -i "s/uname -r/echo $kvers/g"
25 sed -i 's/DECLARE_MUTEX/DEFINE_SEMAPHORE/' \
26 modules/osnvm.c modules/GPL/serial_cnxt.c
27 sed -i 's/\.ioctl/.unlocked_ioctl/' modules/osdiag.c
28 # build driver
29 echo "Build driver"
30 make ROOT=$DESTDIR install
31 # build kernel modules
32 echo "Running $DESTDIR/usr/sbin/hsfconfig -ka..."
33 $DESTDIR/usr/sbin/hsfconfig -ka
34 echo " OK"
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 # kernel modules
41 mkdir -p $fs/lib/modules/$kvers
42 cp -a /lib/modules/$kvers/extra $fs/lib/modules/$kvers
43 # cleaning up
44 rm -r /lib/modules/$kvers/extra
45 # command files
46 mkdir -p $fs/usr
47 cp -a $install/usr/sbin $fs/usr
48 cp -a $install/usr/lib $fs/usr
49 # config files
50 mkdir -p $fs/etc
51 cp -a $install/etc/hsfmodem $fs/etc
52 cp -a $stuff/zone.tab $fs/etc/hsfmodem
53 }
55 post_install()
56 {
57 depmod -a
58 echo -n "Install serial port devices"
59 hsfconfig -s > /dev/null
60 status
61 echo -n "Install kernel modules"
62 modprobe -v /dev/ttySHSF > /dev/null
63 status
64 echo -n "Set region"
65 hsfconfig -c AUTO
66 echo "-----------------------------------------------------------------------------"
67 echo "To enable your modem's full functionality (high-speed 56k data and FAX),"
68 echo "a license registration key must be obtained from Linuxant and entered with"
69 echo "hsfconfig --license."
70 echo ""
71 echo "Without a proper license key, the modem can only operate in FREE mode,"
72 echo "limited to a maximum speed of 14.4Kbps (V.32bis) and the FAX"
73 echo "functionality will not be available."
74 }
76 pre_remove()
77 {
78 hsfstop
79 }
81 post_remove()
82 {
83 depmod -a
84 rm -r /etc/hsfmodem
85 }