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

linux/bundle: multi floppy support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Sep 15 19:49:24 2019 +0200 (2019-09-15)
parents 3de5e6325aab
children a28c45a86936
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>Base io address</td>
49 <td><select name="IONE2K">
50 EOT
51 for i in 0x300 0x280 0x320 0x340 0x360 0x380; do
52 echo -n "<option value=\"$i\""
53 [ "$i" = "$IONE2K" ] && echo -n ' selected="selected"'
54 echo ">$i</option>"
55 done
56 cat <<EOT
57 </select></td>
58 </tr>
59 <tr>
60 <td>IRQ (optionnal)</td>
61 <td><input type="text" name="IRQNE2K" ${IRQNE2K:+value="$IRQNE2K" }/></td>
62 </tr>
63 </table>
64 <input type="checkbox" name="BADNE2K" ${BADNE2K:+value="on" checked="checked" }/>
65 Accept card with bad signatures<br>
66 EOT
67 }