wok-current annotate linmodem-hsfmodem/receipt @ rev 15721

Move from undigest: bullet bullet-dev connman-ui cplay dconf dconf-dev dfc dnstop efl efl-dev evolution-data-server evolution-data-server-dev goaccess granite granite-dev granite-demo l3afpad ldm linmodem-hsfmodem marlin marlin-dev miniupnpd
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Dec 26 13:16:14 2013 +0000 (2013-12-26)
parents
children
rev   line source
pascal@15721 1 # SliTaz package receipt.
pascal@15721 2
pascal@15721 3 PACKAGE="linmodem-hsfmodem"
pascal@15721 4 SOURCE="hsfmodem"
pascal@15721 5 VERSION="7.80.02.06full"
pascal@15721 6 CATEGORY="non-free"
pascal@15721 7 SHORT_DESC="Driver for the Conexant (formerly Rockwell) HSF Softmodem family."
pascal@15721 8 MAINTAINER="orphaned@slitaz.org"
pascal@15721 9 LICENSE="other"
pascal@15721 10 TARBALL="$SOURCE-$VERSION.tar.gz"
pascal@15721 11 WEB_SITE="http://www.linuxant.com/drivers"
pascal@15721 12 WGET_URL="http://www.linuxant.com/drivers/hsf/full/archive/$SOURCE-$VERSION/$TARBALL"
pascal@15721 13
pascal@15721 14 DEPENDS="module-init-tools perl usbutils"
pascal@15721 15 BUILD_DEPENDS="cpio linux lzma linux-module-headers util-linux-getopt \
pascal@15721 16 usbutils-dev"
pascal@15721 17
pascal@15721 18 # Rules to configure and make the package.
pascal@15721 19 compile_rules()
pascal@15721 20 {
pascal@15721 21 cd $src
pascal@15721 22 echo "Apply $file..."
pascal@15721 23 patch -p1 < $(ls $stuff/$SOURCE-*.diff) || return 1
pascal@15721 24 grep -rl 'uname -r' . | xargs sed -i "s/uname -r/echo $kvers/g"
pascal@15721 25 sed -i 's/DECLARE_MUTEX/DEFINE_SEMAPHORE/' \
pascal@15721 26 modules/osnvm.c modules/GPL/serial_cnxt.c
pascal@15721 27 sed -i 's/\.ioctl/.unlocked_ioctl/' modules/osdiag.c
pascal@15721 28 # build driver
pascal@15721 29 echo "Build driver"
pascal@15721 30 make ROOT=$DESTDIR install
pascal@15721 31 # build kernel modules
pascal@15721 32 echo "Running $DESTDIR/usr/sbin/hsfconfig -ka..."
pascal@15721 33 $DESTDIR/usr/sbin/hsfconfig -ka
pascal@15721 34 echo " OK"
pascal@15721 35 }
pascal@15721 36
pascal@15721 37 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@15721 38 genpkg_rules()
pascal@15721 39 {
pascal@15721 40 # kernel modules
pascal@15721 41 mkdir -p $fs/lib/modules/$kvers
pascal@15721 42 cp -a /lib/modules/$kvers/extra $fs/lib/modules/$kvers
pascal@15721 43 # cleaning up
pascal@15721 44 rm -r /lib/modules/$kvers/extra
pascal@15721 45 # command files
pascal@15721 46 mkdir -p $fs/usr
pascal@15721 47 cp -a $install/usr/sbin $fs/usr
pascal@15721 48 cp -a $install/usr/lib $fs/usr
pascal@15721 49 # config files
pascal@15721 50 mkdir -p $fs/etc
pascal@15721 51 cp -a $install/etc/hsfmodem $fs/etc
pascal@15721 52 cp -a $stuff/zone.tab $fs/etc/hsfmodem
pascal@15721 53 }
pascal@15721 54
pascal@15721 55 post_install()
pascal@15721 56 {
pascal@15721 57 depmod -a
pascal@15721 58 echo -n "Install serial port devices"
pascal@15721 59 hsfconfig -s > /dev/null
pascal@15721 60 status
pascal@15721 61 echo -n "Install kernel modules"
pascal@15721 62 modprobe -v /dev/ttySHSF > /dev/null
pascal@15721 63 status
pascal@15721 64 echo -n "Set region"
pascal@15721 65 hsfconfig -c AUTO
pascal@15721 66 echo "-----------------------------------------------------------------------------"
pascal@15721 67 echo "To enable your modem's full functionality (high-speed 56k data and FAX),"
pascal@15721 68 echo "a license registration key must be obtained from Linuxant and entered with"
pascal@15721 69 echo "hsfconfig --license."
pascal@15721 70 echo ""
pascal@15721 71 echo "Without a proper license key, the modem can only operate in FREE mode,"
pascal@15721 72 echo "limited to a maximum speed of 14.4Kbps (V.32bis) and the FAX"
pascal@15721 73 echo "functionality will not be available."
pascal@15721 74 }
pascal@15721 75
pascal@15721 76 pre_remove()
pascal@15721 77 {
pascal@15721 78 hsfstop
pascal@15721 79 }
pascal@15721 80
pascal@15721 81 post_remove()
pascal@15721 82 {
pascal@15721 83 depmod -a
pascal@15721 84 rm -r /etc/hsfmodem
pascal@15721 85 }