wok-4.x annotate linmodem-hsfmodem/receipt @ rev 7175

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