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

Refresh, remove kernel*, add linux
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Oct 02 21:45:05 2015 +0200 (2015-10-02)
parents a6d2ddc65590
children 981558572b0f
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" ] && IRQCS89="|irq=${IRQCS89%%[, ]*}"
31 [ "$IOCS89" ] && IOCS89="|io=${IOCS89%%[, ]*}"
32 echo "${PACKAGE#*-}$IOCS89$IRQCS89|mode=${MODECS89:-rj45}|debug=${DEBUGCS89:-0}" >> $1/modules
33 }
35 config_form()
36 {
37 cat <<EOT
38 <h4>CS89x0 Ethernet driver</h4>
39 <table>
40 <tr>
41 <td>I/O base</td>
42 <td><input type="text" name="IOCS89"
43 title="Likely 0x300 0x320 0x340 0x360 0x200 0x220 0x240 0x260 0x280 0x2a0 0x2c0 or 0x2e0" /></td>
44 </tr>
45 <tr>
46 <td>IRQ</td>
47 <td><input type="text" name="IRQCS89" title "Likely 10 11 12 or 5" /></td>
48 </tr>
49 <tr>
50 <td>Media</td>
51 <td><select name="MODECS89">
52 <option value="rj45">rj45</option>
53 <option value="bnc"$([ "$MODECS89" == "bnc" ] && echo ' selected="selected"')>bnc</option>
54 <option value="aui"$([ "$MODECS89" == "aui" ] && echo ' selected="selected"')>aui</option>
55 </select></td>
56 </tr>
57 <tr>
58 <td>Debug</td>
59 <td><select name="DEBUGCS89">
60 EOT
61 for i in $(seq 0 6); do
62 cat <<EOT
63 <option value="$i"$([ "$DEBUGCS89" == "$i" ] && echo ' selected="selected"')>$i</option>
64 EOT
65 done
66 cat <<EOT
67 </select></td>
68 </tr>
69 </table>
70 EOT
71 }