wok-tiny annotate module-ne/receipt @ rev 142
Remove ashism ==
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 27 17:43:23 2019 +0100 (2019-02-27) |
parents | 34a749493ee3 |
children | 881167180f57 |
rev | line source |
---|---|
pascal@94 | 1 # SliTaz package receipt. |
pascal@94 | 2 |
pascal@94 | 3 PACKAGE="module-ne" |
pascal@94 | 4 VERSION="2.6.14" |
pascal@94 | 5 CATEGORY="base-system" |
pascal@109 | 6 GROUP="driver,ethernet" |
pascal@94 | 7 SHORT_DESC="Kernel module for the ne2000 driver" |
pascal@94 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@94 | 9 LICENSE="GPL2" |
pascal@94 | 10 WEB_SITE="http://tiny.slitaz.org/" |
pascal@94 | 11 WANTED="linux" |
pascal@94 | 12 |
pascal@94 | 13 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@94 | 14 genpkg_rules() |
pascal@94 | 15 { |
pascal@94 | 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@94 | 20 mkdir -p $fs/$path |
pascal@94 | 21 $src/slitaz/list_modules.sh drivers/net/${PACKAGE#*-}* | while read module; do |
pascal@94 | 22 dir=$path/$(dirname $module) |
pascal@94 | 23 [ -d $fs/$dir ] || mkdir -p $fs/$dir |
pascal@94 | 24 cp -a $_pkg/$path/$module $fs/$dir |
pascal@94 | 25 done |
pascal@94 | 26 } |
pascal@94 | 27 |
pascal@94 | 28 # Post install/remove commands for Tazpkg. |
pascal@94 | 29 post_install() |
pascal@94 | 30 { |
pascal@94 | 31 [ "$IRQNE2K" ] && IRQNE2K="|irq=${IRQNE2K// /,}" |
pascal@94 | 32 [ "$IONE2K" ] && IONE2K="|io=${IONE2K// /,}" |
pascal@142 | 33 [ "$BADNE2K" = "on" ] && BADNE2K="|bad" || BADNE2K="" |
pascal@114 | 34 grep -qs "^${PACKAGE#*-}|" $1/modules || |
pascal@94 | 35 echo "${PACKAGE#*-}${IONE2K:-|io=0x300}$IRQNE2K$BADNE2K" >> $1/modules |
pascal@94 | 36 } |
pascal@94 | 37 |
pascal@94 | 38 config_form() |
pascal@94 | 39 { |
pascal@126 | 40 if [ -n "$IONE2K" ]; then |
pascal@126 | 41 IONE2K=0x300 |
pascal@126 | 42 BADNE2K=on |
pascal@126 | 43 fi |
pascal@94 | 44 cat <<EOT |
pascal@94 | 45 <h4>NE2000 isa Ethernet driver</h4> |
pascal@94 | 46 <table> |
pascal@94 | 47 <tr> |
pascal@94 | 48 <td>I/O base (required)</td> |
pascal@126 | 49 <td><input type="text" name="IONE2K" ${IONE2K:+value="$IONE2K"} |
pascal@94 | 50 title="Likely 0x300 0x280 0x320 0x340 0x360 or 0x380" /></td> |
pascal@94 | 51 </tr> |
pascal@94 | 52 <tr> |
pascal@94 | 53 <td>IRQ (optionnal)</td> |
pascal@126 | 54 <td><input type="text" name="IRQNE2K" ${IRQNE2K:+value="$IRQNE2K" }/></td> |
pascal@94 | 55 </tr> |
pascal@94 | 56 </table> |
pascal@127 | 57 <input type="checkbox" name="BADNE2K" ${BADNE2K:+value="on" checked="checked" }/> |
pascal@94 | 58 Accept card with bad signatures<br> |
pascal@94 | 59 EOT |
pascal@94 | 60 } |