wok-tiny view module-sg/receipt @ rev 157

Add geninitramfs & busybox-net
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Feb 28 16:03:43 2020 +0100 (2020-02-28)
parents df0a7ccded6c
children 2c80994c5e30
line source
1 # SliTaz package receipt.
3 PACKAGE="module-sg"
4 VERSION="2.6.14"
5 CATEGORY="base-system"
6 GROUP="driver,scsi"
7 SHORT_DESC="Kernel module for the SCSI generic (sg) driver"
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL"
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/scsi/${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 if !grep -qs "^${PACKAGE#*-}|" $1/modules; then
32 echo -n "${PACKAGE#*-}|allow_dio=" >> $1/modules
33 echo -n "$([ "$SG_ALLOW_DIO" ] && echo 1 || echo 0)|" >> $1/modules
34 echo "def_reserved_size=${SG_DEFRESSZ:--1}" >> $1/modules
35 fi
36 }
38 config_form()
39 {
40 cat <<EOT
41 <h4>SCSI generic driver</h4>
42 <table>
43 <tr>
44 <td>Size of buffer reserved for each fd</td>
45 <td><input type="text" name="SG_DEFRESSZ" ${SG_DEFRESSZ:+value="$SG_DEFRESSZ" }/></td>
46 </tr>
47 <tr>
48 <td><input type="checkbox" name="SG_ALLOW_DIO" ${SG_ALLOW_DIO:+checked=checked }> allow direct I/O
49 </td><td></td>
50 </tr>
51 </table>
52 EOT
53 }