wok-6.x annotate linmodem-hsfmodem/receipt @ rev 7397
linmodem-hsfmodem: check for modules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Nov 26 20:59:24 2010 +0100 (2010-11-26) |
parents | 0d891bf92e0c |
children | bab55f4929c2 |
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." |
pascal@7397 | 39 [ -d /lib/modules/$KERNEL_VERSION/extra ] |
slitaz@5309 | 40 } |
slitaz@5309 | 41 |
slitaz@5309 | 42 # Rules to gen a SliTaz package suitable for Tazpkg. |
slitaz@5309 | 43 genpkg_rules() |
slitaz@5309 | 44 { |
pascal@7396 | 45 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` |
slitaz@5309 | 46 # kernel modules |
pascal@7396 | 47 mkdir -p $fs/lib/modules/$KERNEL_VERSION |
pascal@7396 | 48 cp -a /lib/modules/$KERNEL_VERSION/extra $fs/lib/modules/$KERNEL_VERSION |
slitaz@5309 | 49 # cleaning up |
pascal@7396 | 50 rm -r /lib/modules/$KERNEL_VERSION/extra |
slitaz@5309 | 51 # command files |
slitaz@5309 | 52 mkdir -p $fs/usr |
slitaz@5309 | 53 cp -a $_pkg/usr/sbin $fs/usr |
slitaz@5309 | 54 cp -a $_pkg/usr/lib $fs/usr |
slitaz@5309 | 55 # config files |
slitaz@5309 | 56 mkdir -p $fs/etc |
slitaz@5309 | 57 cp -a $_pkg/etc/hsfmodem $fs/etc |
slitaz@5309 | 58 cp -a stuff/zone.tab $fs/etc/hsfmodem |
slitaz@5309 | 59 } |
slitaz@5309 | 60 |
slitaz@5309 | 61 post_install() |
slitaz@5309 | 62 { |
slitaz@5309 | 63 depmod -a |
slitaz@5309 | 64 echo -n "Install serial port devices" |
slitaz@5309 | 65 hsfconfig -s > /dev/null |
slitaz@5309 | 66 status |
slitaz@5309 | 67 echo -n "Install kernel modules" |
slitaz@5309 | 68 modprobe -v /dev/ttySHSF > /dev/null |
slitaz@5309 | 69 status |
slitaz@5309 | 70 echo -n "Set region" |
slitaz@5309 | 71 hsfconfig -c AUTO |
slitaz@5309 | 72 echo "-----------------------------------------------------------------------------" |
slitaz@5309 | 73 echo "To enable your modem's full functionality (high-speed 56k data and FAX)," |
slitaz@5309 | 74 echo "a license registration key must be obtained from Linuxant and entered with" |
slitaz@5309 | 75 echo "hsfconfig --license." |
slitaz@5309 | 76 echo "" |
slitaz@5309 | 77 echo "Without a proper license key, the modem can only operate in FREE mode," |
slitaz@5309 | 78 echo "limited to a maximum speed of 14.4Kbps (V.32bis) and the FAX" |
slitaz@5309 | 79 echo "functionality will not be available." |
slitaz@5309 | 80 } |
slitaz@5309 | 81 |
slitaz@5309 | 82 pre_remove() |
slitaz@5309 | 83 { |
slitaz@5309 | 84 hsfstop |
slitaz@5309 | 85 } |
slitaz@5309 | 86 |
slitaz@5309 | 87 post_remove() |
slitaz@5309 | 88 { |
slitaz@5309 | 89 depmod -a |
slitaz@5309 | 90 rm -r /etc/hsfmodem |
slitaz@5309 | 91 } |