wok-tiny annotate module-3c509/receipt @ rev 114
modules-*: fix post_install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Apr 01 23:34:24 2016 +0200 (2016-04-01) |
parents | 0d8ef9102fc0 |
children | 10cf1a5f187d |
rev | line source |
---|---|
pascal@20 | 1 # SliTaz package receipt. |
pascal@20 | 2 |
pascal@20 | 3 PACKAGE="module-3c509" |
pascal@94 | 4 VERSION="2.6.14" |
pascal@20 | 5 CATEGORY="base-system" |
pascal@109 | 6 GROUP="driver,ethernet" |
pascal@101 | 7 SHORT_DESC="Kernel module for the 3c509 (3com Etherlink III) driver" |
pascal@20 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@90 | 9 LICENSE="GPL2" |
pascal@55 | 10 WEB_SITE="http://tiny.slitaz.org/" |
pascal@94 | 11 WANTED="linux" |
pascal@20 | 12 |
pascal@20 | 13 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@20 | 14 genpkg_rules() |
pascal@20 | 15 { |
pascal@20 | 16 local path |
pascal@94 | 17 export src=$WOK/$WANTED/source/linux-$VERSION |
pascal@94 | 18 export _pkg=$WOK/$WANTED/install |
pascal@94 | 19 path=lib/modules/$(ls $_pkg/lib/modules)/kernel |
pascal@20 | 20 mkdir -p $fs/$path |
pascal@20 | 21 $src/slitaz/list_modules.sh drivers/net/${PACKAGE#*-}* | while read module; do |
pascal@20 | 22 dir=$path/$(dirname $module) |
pascal@20 | 23 [ -d $fs/$dir ] || mkdir -p $fs/$dir |
pascal@20 | 24 cp -a $_pkg/$path/$module $fs/$dir |
pascal@20 | 25 done |
pascal@20 | 26 } |
pascal@20 | 27 |
pascal@20 | 28 # Post install/remove commands for Tazpkg. |
pascal@20 | 29 post_install() |
pascal@20 | 30 { |
pascal@94 | 31 [ "$IRQ3C509" ] && IRQ3C509="|irq=${IRQ3C509// /,}" |
pascal@94 | 32 [ "$XCVR3C509" ] && XCVR3C509="|xcvr=$XCVR3C509" |
pascal@114 | 33 grep -qs "^${PACKAGE#*-}|" $1/modules || |
pascal@94 | 34 echo "${PACKAGE#*-}$IRQ3C509|debug=${DBG3C509:-0}$XCVR3C509|max_interrupt_work=${MAXE3C509:-10}" >> $1/modules |
pascal@20 | 35 } |
pascal@94 | 36 |
pascal@94 | 37 config_form() |
pascal@94 | 38 { |
pascal@94 | 39 cat <<EOT |
pascal@94 | 40 <h4>3Com Etherlink III (3c509, 3c509B) ISA/PnP Ethernet driver</h4> |
pascal@94 | 41 <table> |
pascal@94 | 42 <tr> |
pascal@94 | 43 <td>IRQ</td> |
pascal@94 | 44 <td><input type="text" name="IRQ3C509" /></td> |
pascal@94 | 45 </tr> |
pascal@94 | 46 <tr> |
pascal@94 | 47 <td>Tranceiver</td> |
pascal@94 | 48 <td><select name="XCVR3C509"> |
pascal@94 | 49 <option value="">default</option> |
pascal@94 | 50 <option value="0"$([ "$XCVR3C509" == "0" ] && echo ' selected="selected"')>internal</option> |
pascal@94 | 51 <option value="1"$([ "$XCVR3C509" == "1" ] && echo ' selected="selected"')>external</option> |
pascal@94 | 52 </select></td> |
pascal@94 | 53 </tr> |
pascal@94 | 54 <tr> |
pascal@94 | 55 <td>Maximum events handled per interrupt</td> |
pascal@94 | 56 <td><select name="MAXE3C509"> |
pascal@94 | 57 EOT |
pascal@94 | 58 for i in $(seq 10 -1 1); do |
pascal@94 | 59 cat <<EOT |
pascal@94 | 60 <option value="$i"$([ "$MAXE3C509" == "$i" ] && echo ' selected="selected"')>$i</option> |
pascal@94 | 61 EOT |
pascal@94 | 62 done |
pascal@94 | 63 cat <<EOT |
pascal@94 | 64 </select></td> |
pascal@94 | 65 </tr> |
pascal@94 | 66 <tr> |
pascal@94 | 67 <td>Debug</td> |
pascal@94 | 68 <td><select name="DBG3C509"> |
pascal@94 | 69 EOT |
pascal@94 | 70 for i in $(seq 0 6); do |
pascal@94 | 71 cat <<EOT |
pascal@94 | 72 <option value="$i"$([ "$DBG3C509" == "$i" ] && echo ' selected="selected"')>$i</option> |
pascal@94 | 73 EOT |
pascal@94 | 74 done |
pascal@94 | 75 cat <<EOT |
pascal@94 | 76 </select></td> |
pascal@94 | 77 </tr> |
pascal@94 | 78 </table> |
pascal@94 | 79 EOT |
pascal@94 | 80 } |