wok-stable annotate linmodem-hsfmodem/receipt @ rev 7396

linmodem-hsfmodem: fix kernel version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Nov 26 18:52:20 2010 +0100 (2010-11-26)
parents fd2978445c1a
children 9ce59d5bc5b7
rev   line source
slitaz@5309 1 # SliTaz package receipt.
slitaz@5309 2
slitaz@5309 3 PACKAGE="linmodem-hsfmodem"
slitaz@5309 4 SOURCE="hsfmodem"
pascal@7394 5 VERSION="7.80.02.06full"
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
pascal@7396 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
pascal@7396 27 grep -rl 'uname -r' . | xargs sed -i "s/uname -r/echo $KERNEL_VERSION/g"
slitaz@5309 28 # build driver
slitaz@5309 29 echo "Build driver"
slitaz@5309 30 make ROOT=$PWD/_pkg install
slitaz@5309 31 # build kernel modules
slitaz@5309 32 echo "Running $PWD/_pkg/usr/sbin/hsfconfig -ka"
slitaz@5309 33 $PWD/_pkg/usr/sbin/hsfconfig -ka
slitaz@5309 34 # reset /usr/src/linux
slitaz@5309 35 echo "Clean files"
slitaz@5309 36 rm /usr/src/linux
slitaz@5309 37 [ "$SRCDIR" = "yes" ] && rmdir /usr/src
slitaz@5309 38 echo "done."
slitaz@5309 39 }
slitaz@5309 40
slitaz@5309 41 # Rules to gen a SliTaz package suitable for Tazpkg.
slitaz@5309 42 genpkg_rules()
slitaz@5309 43 {
pascal@7396 44 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
slitaz@5309 45 # kernel modules
pascal@7396 46 mkdir -p $fs/lib/modules/$KERNEL_VERSION
pascal@7396 47 cp -a /lib/modules/$KERNEL_VERSION/extra $fs/lib/modules/$KERNEL_VERSION
slitaz@5309 48 # cleaning up
pascal@7396 49 rm -r /lib/modules/$KERNEL_VERSION/extra
slitaz@5309 50 # command files
slitaz@5309 51 mkdir -p $fs/usr
slitaz@5309 52 cp -a $_pkg/usr/sbin $fs/usr
slitaz@5309 53 cp -a $_pkg/usr/lib $fs/usr
slitaz@5309 54 # config files
slitaz@5309 55 mkdir -p $fs/etc
slitaz@5309 56 cp -a $_pkg/etc/hsfmodem $fs/etc
slitaz@5309 57 cp -a stuff/zone.tab $fs/etc/hsfmodem
slitaz@5309 58 }
slitaz@5309 59
slitaz@5309 60 post_install()
slitaz@5309 61 {
slitaz@5309 62 depmod -a
slitaz@5309 63 echo -n "Install serial port devices"
slitaz@5309 64 hsfconfig -s > /dev/null
slitaz@5309 65 status
slitaz@5309 66 echo -n "Install kernel modules"
slitaz@5309 67 modprobe -v /dev/ttySHSF > /dev/null
slitaz@5309 68 status
slitaz@5309 69 echo -n "Set region"
slitaz@5309 70 hsfconfig -c AUTO
slitaz@5309 71 echo "-----------------------------------------------------------------------------"
slitaz@5309 72 echo "To enable your modem's full functionality (high-speed 56k data and FAX),"
slitaz@5309 73 echo "a license registration key must be obtained from Linuxant and entered with"
slitaz@5309 74 echo "hsfconfig --license."
slitaz@5309 75 echo ""
slitaz@5309 76 echo "Without a proper license key, the modem can only operate in FREE mode,"
slitaz@5309 77 echo "limited to a maximum speed of 14.4Kbps (V.32bis) and the FAX"
slitaz@5309 78 echo "functionality will not be available."
slitaz@5309 79 }
slitaz@5309 80
slitaz@5309 81 pre_remove()
slitaz@5309 82 {
slitaz@5309 83 hsfstop
slitaz@5309 84 }
slitaz@5309 85
slitaz@5309 86 post_remove()
slitaz@5309 87 {
slitaz@5309 88 depmod -a
slitaz@5309 89 rm -r /etc/hsfmodem
slitaz@5309 90 }