wok-6.x annotate linmodem-hsfmodem/receipt @ rev 8078
Up: mesa 7.10
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sat Jan 22 02:37:34 2011 +0100 (2011-01-22) |
parents | 9ce59d5bc5b7 |
children | 0b4cf0d9e1b5 |
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" |
slaxemulator@7398 | 10 BUILD_DEPENDS="cpio linux lzma linux-module-headers" |
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 cd $src |
slitaz@5309 | 20 echo "Apply $file..." |
slitaz@5309 | 21 patch -p1 < ../stuff/$SOURCE-$VERSION.diff || exit 1 |
pascal@7396 | 22 grep -rl 'uname -r' . | xargs sed -i "s/uname -r/echo $KERNEL_VERSION/g" |
slitaz@5309 | 23 # build driver |
slitaz@5309 | 24 echo "Build driver" |
slitaz@5309 | 25 make ROOT=$PWD/_pkg install |
slitaz@5309 | 26 # build kernel modules |
slitaz@5309 | 27 echo "Running $PWD/_pkg/usr/sbin/hsfconfig -ka" |
slitaz@5309 | 28 $PWD/_pkg/usr/sbin/hsfconfig -ka |
slitaz@5309 | 29 echo "done." |
pascal@7397 | 30 [ -d /lib/modules/$KERNEL_VERSION/extra ] |
slitaz@5309 | 31 } |
slitaz@5309 | 32 |
slitaz@5309 | 33 # Rules to gen a SliTaz package suitable for Tazpkg. |
slitaz@5309 | 34 genpkg_rules() |
slitaz@5309 | 35 { |
pascal@7396 | 36 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` |
slitaz@5309 | 37 # kernel modules |
pascal@7396 | 38 mkdir -p $fs/lib/modules/$KERNEL_VERSION |
pascal@7396 | 39 cp -a /lib/modules/$KERNEL_VERSION/extra $fs/lib/modules/$KERNEL_VERSION |
slitaz@5309 | 40 # cleaning up |
pascal@7396 | 41 rm -r /lib/modules/$KERNEL_VERSION/extra |
slitaz@5309 | 42 # command files |
slitaz@5309 | 43 mkdir -p $fs/usr |
slitaz@5309 | 44 cp -a $_pkg/usr/sbin $fs/usr |
slitaz@5309 | 45 cp -a $_pkg/usr/lib $fs/usr |
slitaz@5309 | 46 # config files |
slitaz@5309 | 47 mkdir -p $fs/etc |
slitaz@5309 | 48 cp -a $_pkg/etc/hsfmodem $fs/etc |
slitaz@5309 | 49 cp -a stuff/zone.tab $fs/etc/hsfmodem |
slitaz@5309 | 50 } |
slitaz@5309 | 51 |
slitaz@5309 | 52 post_install() |
slitaz@5309 | 53 { |
slitaz@5309 | 54 depmod -a |
slitaz@5309 | 55 echo -n "Install serial port devices" |
slitaz@5309 | 56 hsfconfig -s > /dev/null |
slitaz@5309 | 57 status |
slitaz@5309 | 58 echo -n "Install kernel modules" |
slitaz@5309 | 59 modprobe -v /dev/ttySHSF > /dev/null |
slitaz@5309 | 60 status |
slitaz@5309 | 61 echo -n "Set region" |
slitaz@5309 | 62 hsfconfig -c AUTO |
slitaz@5309 | 63 echo "-----------------------------------------------------------------------------" |
slitaz@5309 | 64 echo "To enable your modem's full functionality (high-speed 56k data and FAX)," |
slitaz@5309 | 65 echo "a license registration key must be obtained from Linuxant and entered with" |
slitaz@5309 | 66 echo "hsfconfig --license." |
slitaz@5309 | 67 echo "" |
slitaz@5309 | 68 echo "Without a proper license key, the modem can only operate in FREE mode," |
slitaz@5309 | 69 echo "limited to a maximum speed of 14.4Kbps (V.32bis) and the FAX" |
slitaz@5309 | 70 echo "functionality will not be available." |
slitaz@5309 | 71 } |
slitaz@5309 | 72 |
slitaz@5309 | 73 pre_remove() |
slitaz@5309 | 74 { |
slitaz@5309 | 75 hsfstop |
slitaz@5309 | 76 } |
slitaz@5309 | 77 |
slitaz@5309 | 78 post_remove() |
slitaz@5309 | 79 { |
slitaz@5309 | 80 depmod -a |
slitaz@5309 | 81 rm -r /etc/hsfmodem |
slitaz@5309 | 82 } |