wok-tiny annotate module-sg/receipt @ rev 174
Up linux 2.6.20 (avoid 386 & 486 problems)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jul 14 14:20:00 2021 +0000 (2021-07-14) |
parents | a28c45a86936 |
children |
rev | line source |
---|---|
pascal@143 | 1 # SliTaz package receipt. |
pascal@143 | 2 |
pascal@143 | 3 PACKAGE="module-sg" |
pascal@174 | 4 VERSION="2.6.20" |
pascal@143 | 5 CATEGORY="base-system" |
pascal@143 | 6 GROUP="driver,scsi" |
pascal@143 | 7 SHORT_DESC="Kernel module for the SCSI generic (sg) driver" |
pascal@143 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@143 | 9 LICENSE="GPL" |
pascal@143 | 10 WEB_SITE="http://tiny.slitaz.org/" |
pascal@143 | 11 WANTED="linux" |
pascal@143 | 12 |
pascal@143 | 13 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@143 | 14 genpkg_rules() |
pascal@143 | 15 { |
pascal@143 | 16 local path |
pascal@143 | 17 export src=$WOK/$WANTED/source/linux-$VERSION |
pascal@143 | 18 export _pkg=$WOK/$WANTED/install |
pascal@143 | 19 path=lib/modules/$(ls $_pkg/lib/modules)/kernel |
pascal@143 | 20 mkdir -p $fs/$path |
pascal@143 | 21 $src/slitaz/list_modules.sh drivers/scsi/${PACKAGE#*-}* | while read module; do |
pascal@143 | 22 dir=$path/$(dirname $module) |
pascal@143 | 23 [ -d $fs/$dir ] || mkdir -p $fs/$dir |
pascal@143 | 24 cp -a $_pkg/$path/$module $fs/$dir |
pascal@143 | 25 done |
pascal@143 | 26 } |
pascal@143 | 27 |
pascal@143 | 28 # Post install/remove commands for Tazpkg. |
pascal@143 | 29 post_install() |
pascal@143 | 30 { |
pascal@143 | 31 if !grep -qs "^${PACKAGE#*-}|" $1/modules; then |
pascal@143 | 32 echo -n "${PACKAGE#*-}|allow_dio=" >> $1/modules |
pascal@143 | 33 echo -n "$([ "$SG_ALLOW_DIO" ] && echo 1 || echo 0)|" >> $1/modules |
pascal@143 | 34 echo "def_reserved_size=${SG_DEFRESSZ:--1}" >> $1/modules |
pascal@143 | 35 fi |
pascal@143 | 36 } |
pascal@143 | 37 |
pascal@143 | 38 config_form() |
pascal@143 | 39 { |
pascal@143 | 40 cat <<EOT |
pascal@143 | 41 <h4>SCSI generic driver</h4> |
pascal@143 | 42 <table> |
pascal@143 | 43 <tr> |
pascal@143 | 44 <td>Size of buffer reserved for each fd</td> |
pascal@143 | 45 <td><input type="text" name="SG_DEFRESSZ" ${SG_DEFRESSZ:+value="$SG_DEFRESSZ" }/></td> |
pascal@143 | 46 </tr> |
pascal@143 | 47 <tr> |
pascal@143 | 48 <td><input type="checkbox" name="SG_ALLOW_DIO" ${SG_ALLOW_DIO:+checked=checked }> allow direct I/O |
pascal@143 | 49 </td><td></td> |
pascal@143 | 50 </tr> |
pascal@143 | 51 </table> |
pascal@143 | 52 EOT |
pascal@143 | 53 } |