wok-tiny view module-ne/receipt @ rev 142

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