wok-tiny view module-3c509/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 10cf1a5f187d
children
line source
1 # SliTaz package receipt.
3 PACKAGE="module-3c509"
4 VERSION="2.6.14"
5 CATEGORY="base-system"
6 GROUP="driver,ethernet"
7 SHORT_DESC="Kernel module for the 3c509 (3com Etherlink III) 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 [ "$IRQ3C509" ] && IRQ3C509="|irq=${IRQ3C509// /,}"
32 [ "$XCVR3C509" ] && XCVR3C509="|xcvr=$XCVR3C509"
33 grep -qs "^${PACKAGE#*-}|" $1/modules ||
34 echo "${PACKAGE#*-}$IRQ3C509|debug=${DBG3C509:-0}$XCVR3C509|max_interrupt_work=${MAXE3C509:-10}" >> $1/modules
35 }
37 config_form()
38 {
39 cat <<EOT
40 <h4>3Com Etherlink III (3c509, 3c509B) ISA/PnP Ethernet driver</h4>
41 <table>
42 <tr>
43 <td>IRQ</td>
44 <td><input type="text" name="IRQ3C509" ${IRQ3C509:+value="$IRQ3C509" } /></td>
45 </tr>
46 <tr>
47 <td>Tranceiver</td>
48 <td><select name="XCVR3C509">
49 <option value="">default</option>
50 <option value="0"$([ "$XCVR3C509" = "0" ] && echo ' selected="selected"')>internal</option>
51 <option value="1"$([ "$XCVR3C509" = "1" ] && echo ' selected="selected"')>external</option>
52 </select></td>
53 </tr>
54 <tr>
55 <td>Maximum events handled per interrupt</td>
56 <td><select name="MAXE3C509">
57 EOT
58 for i in $(seq 10 -1 1); do
59 cat <<EOT
60 <option value="$i"$([ "$MAXE3C509" = "$i" ] && echo ' selected="selected"')>$i</option>
61 EOT
62 done
63 cat <<EOT
64 </select></td>
65 </tr>
66 <tr>
67 <td>Debug</td>
68 <td><select name="DBG3C509">
69 EOT
70 for i in $(seq 0 6); do
71 cat <<EOT
72 <option value="$i"$([ "$DBG3C509" = "$i" ] && echo ' selected="selected"')>$i</option>
73 EOT
74 done
75 cat <<EOT
76 </select></td>
77 </tr>
78 </table>
79 EOT
80 }