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

Remove ashism ==
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Feb 27 17:43:23 2019 +0100 (2 months ago)
parents 10cf1a5f187d
children
line source
1 # SliTaz package receipt.
3 PACKAGE="module-cs89x0"
4 VERSION="2.6.14"
5 CATEGORY="base-system"
6 GROUP="driver,ethernet"
7 SHORT_DESC="Kernel module for the cs89x0 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 [ "$IRQCS89" ] || return
32 IRQCS89="|irq=${IRQCS89%%[, ]*}"
33 [ "$IOCS89" ] && IOCS89="|io=${IOCS89%%[, ]*}"
34 grep -qs "^${PACKAGE#*-}|" $1/modules ||
35 echo "${PACKAGE#*-}$IOCS89$IRQCS89|mode=${MODECS89:-rj45}|debug=${DEBUGCS89:-0}" >> $1/modules
36 }
38 config_form()
39 {
40 cat <<EOT
41 <h4>CS89x0 Ethernet driver</h4>
42 <table>
43 <tr>
44 <td>I/O base</td>
45 <td><input type="text" name="IOCS89" ${IOCS89:+value="$IOCS89" }
46 title="Likely 0x300 0x320 0x340 0x360 0x200 0x220 0x240 0x260 0x280 0x2a0 0x2c0 or 0x2e0" /></td>
47 </tr>
48 <tr>
49 <td>IRQ</td>
50 <td><input type="text" name="IRQCS89" title "Likely 10 11 12 or 5" ${IRQCS89:+value="$IRQCS89" }/></td>
51 </tr>
52 <tr>
53 <td>Media</td>
54 <td><select name="MODECS89">
55 <option value="rj45">rj45</option>
56 <option value="bnc"$([ "$MODECS89" = "bnc" ] && echo ' selected="selected"')>bnc</option>
57 <option value="aui"$([ "$MODECS89" = "aui" ] && echo ' selected="selected"')>aui</option>
58 </select></td>
59 </tr>
60 <tr>
61 <td>Debug</td>
62 <td><select name="DEBUGCS89">
63 EOT
64 for i in $(seq 0 6); do
65 cat <<EOT
66 <option value="$i"$([ "$DEBUGCS89" = "$i" ] && echo ' selected="selected"')>$i</option>
67 EOT
68 done
69 cat <<EOT
70 </select></td>
71 </tr>
72 </table>
73 EOT
74 }