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

Add ipxe, memtest
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 07 14:42:58 2016 +0100 (2016-02-07)
parents 371673f39e46
children 0d8ef9102fc0
line source
1 # SliTaz package receipt.
3 PACKAGE="module-cs89x0"
4 VERSION="2.6.14"
5 CATEGORY="base-system"
6 SHORT_DESC="Kernel module for the cs89x0 driver"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://tiny.slitaz.org/"
10 WANTED="linux"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 local path
16 export src=$WOK/$WANTED/source/linux-$VERSION
17 export _pkg=$WOK/$WANTED/install
18 path=lib/modules/$(ls $_pkg/lib/modules)/kernel
19 mkdir -p $fs/$path
20 $src/slitaz/list_modules.sh drivers/net/${PACKAGE#*-}* | while read module; do
21 dir=$path/$(dirname $module)
22 [ -d $fs/$dir ] || mkdir -p $fs/$dir
23 cp -a $_pkg/$path/$module $fs/$dir
24 done
25 }
27 # Post install/remove commands for Tazpkg.
28 post_install()
29 {
30 [ "$IRQCS89" ] || return
31 IRQCS89="|irq=${IRQCS89%%[, ]*}"
32 [ "$IOCS89" ] && IOCS89="|io=${IOCS89%%[, ]*}"
33 echo "${PACKAGE#*-}$IOCS89$IRQCS89|mode=${MODECS89:-rj45}|debug=${DEBUGCS89:-0}" >> $1/modules
34 }
36 config_form()
37 {
38 cat <<EOT
39 <h4>CS89x0 Ethernet driver</h4>
40 <table>
41 <tr>
42 <td>I/O base</td>
43 <td><input type="text" name="IOCS89"
44 title="Likely 0x300 0x320 0x340 0x360 0x200 0x220 0x240 0x260 0x280 0x2a0 0x2c0 or 0x2e0" /></td>
45 </tr>
46 <tr>
47 <td>IRQ</td>
48 <td><input type="text" name="IRQCS89" title "Likely 10 11 12 or 5" /></td>
49 </tr>
50 <tr>
51 <td>Media</td>
52 <td><select name="MODECS89">
53 <option value="rj45">rj45</option>
54 <option value="bnc"$([ "$MODECS89" == "bnc" ] && echo ' selected="selected"')>bnc</option>
55 <option value="aui"$([ "$MODECS89" == "aui" ] && echo ' selected="selected"')>aui</option>
56 </select></td>
57 </tr>
58 <tr>
59 <td>Debug</td>
60 <td><select name="DEBUGCS89">
61 EOT
62 for i in $(seq 0 6); do
63 cat <<EOT
64 <option value="$i"$([ "$DEBUGCS89" == "$i" ] && echo ' selected="selected"')>$i</option>
65 EOT
66 done
67 cat <<EOT
68 </select></td>
69 </tr>
70 </table>
71 EOT
72 }