wok-tiny diff module-sg/receipt @ rev 143

Add some SCSI modules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Aug 31 18:58:32 2019 +0200 (2019-08-31)
parents
children a28c45a86936
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/module-sg/receipt	Sat Aug 31 18:58:32 2019 +0200
     1.3 @@ -0,0 +1,55 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKED_SIZE="60.0K"
     1.7 +UNPACKED_SIZE="176.0K"
     1.8 +PACKAGE="module-sg"
     1.9 +VERSION="2.6.14"
    1.10 +CATEGORY="base-system"
    1.11 +GROUP="driver,scsi"
    1.12 +SHORT_DESC="Kernel module for the SCSI generic (sg) driver"
    1.13 +MAINTAINER="pascal.bellard@slitaz.org"
    1.14 +LICENSE="GPL"
    1.15 +WEB_SITE="http://tiny.slitaz.org/"
    1.16 +WANTED="linux"
    1.17 +
    1.18 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.19 +genpkg_rules()
    1.20 +{
    1.21 +	local path
    1.22 +	export src=$WOK/$WANTED/source/linux-$VERSION
    1.23 +	export _pkg=$WOK/$WANTED/install
    1.24 +	path=lib/modules/$(ls $_pkg/lib/modules)/kernel
    1.25 +	mkdir -p $fs/$path
    1.26 +	$src/slitaz/list_modules.sh drivers/scsi/${PACKAGE#*-}* | while read module; do
    1.27 +		dir=$path/$(dirname $module)
    1.28 +		[ -d $fs/$dir ] || mkdir -p $fs/$dir
    1.29 +		cp -a $_pkg/$path/$module $fs/$dir
    1.30 +	done
    1.31 +}
    1.32 +
    1.33 +# Post install/remove commands for Tazpkg.
    1.34 +post_install()
    1.35 +{
    1.36 +	if !grep -qs "^${PACKAGE#*-}|" $1/modules; then
    1.37 +		echo -n "${PACKAGE#*-}|allow_dio=" >> $1/modules
    1.38 +		echo -n "$([ "$SG_ALLOW_DIO" ] && echo 1 || echo 0)|" >> $1/modules
    1.39 +		echo "def_reserved_size=${SG_DEFRESSZ:--1}" >> $1/modules
    1.40 +	fi
    1.41 +}
    1.42 +
    1.43 +config_form()
    1.44 +{
    1.45 +	cat <<EOT
    1.46 +<h4>SCSI generic driver</h4>
    1.47 +<table>
    1.48 +<tr>
    1.49 +<td>Size of buffer reserved for each fd</td>
    1.50 +<td><input type="text" name="SG_DEFRESSZ" ${SG_DEFRESSZ:+value="$SG_DEFRESSZ" }/></td>
    1.51 +</tr>
    1.52 +<tr>
    1.53 +<td><input type="checkbox" name="SG_ALLOW_DIO" ${SG_ALLOW_DIO:+checked=checked }> allow direct I/O
    1.54 +</td><td></td>
    1.55 +</tr>
    1.56 +</table>
    1.57 +EOT
    1.58 +}