wok rev 13660

Add ccid
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 21 21:44:02 2012 +0100 (2012-11-21)
parents 111165cbc6d4
children 844aa2812cd6
files ccid/receipt linux/stuff/bootloader.sh syslinux/stuff/tools/isohybrid.sh
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ccid/receipt	Wed Nov 21 21:44:02 2012 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="ccid"
     1.7 +VERSION="1.4.8"
     1.8 +CATEGORY="base-system"
     1.9 +SHORT_DESC="Chip/Smart Card Interface Devices driver."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +WEB_SITE="http://pcsclite.alioth.debian.org/"
    1.12 +TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.13 +WGET_URL="https://alioth.debian.org/frs/download.php/3768/$TARBALL"
    1.14 +#https://alioth.debian.org/frs/download.php/3768/ccid-1.4.8.tar.bz2
    1.15 +
    1.16 +DEPENDS="libusb pcsc-lite"
    1.17 +BUILD_DEPENDS="wget pcsc-lite-dev libusb-dev"
    1.18 +
    1.19 +# Rules to configure and make the package.
    1.20 +compile_rules()
    1.21 +{
    1.22 +	cd $src
    1.23 +	./configure --prefix=/usr \
    1.24 +		--enable-usbdropdir=/usr/lib/pscs/drivers \
    1.25 +		$CONFIGURE_ARGS &&
    1.26 +	make && make DESTDIR=$DESTDIR install
    1.27 +}
    1.28 +
    1.29 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.30 +genpkg_rules()
    1.31 +{
    1.32 +	mkdir $fs/etc/udev/rules.d/
    1.33 +	cp -a $install/* $fs/
    1.34 +	cp $src/src/92_pcscd_ccid.rules $fs/etc/udev/rules.d/
    1.35 +}
     2.1 --- a/linux/stuff/bootloader.sh	Wed Nov 21 20:46:23 2012 +0000
     2.2 +++ b/linux/stuff/bootloader.sh	Wed Nov 21 21:44:02 2012 +0100
     2.3 @@ -88,10 +88,10 @@
     2.4  	[ -n "$DEBUG" ] && printf "store%d(%03X) = %0$(($1/4))X	%s\n" $1 $2 $3 "$5" 1>&2
     2.5  }
     2.6  
     2.7 -# usage: getlong offset file
     2.8 +# usage: getlong offset file [bytes]
     2.9  getlong()
    2.10  {
    2.11 -	ddq if=$2 bs=1 skip=$(($1)) count=4 | hexdump -e '"" 1/4 "%d" "\n"'
    2.12 +	od -j $1 -N ${3:-4} -t u${3:-4} -An $2
    2.13  }
    2.14  
    2.15  error()
    2.16 @@ -122,8 +122,7 @@
    2.17  	[ -n "$DEBUG" ] && echo "Read bootsector..." 1>&2
    2.18  	ddq if=$KERNEL bs=512 count=1 of=$bs
    2.19  
    2.20 -	[ $(( $(getlong 0x1FE $bs) & 0xFFFF )) -eq 43605 ] ||
    2.21 -		error "Not bootable"
    2.22 +	[ $(getlong 0x1FE $bs 2) -eq 43605 ] || error "Not bootable"
    2.23  	
    2.24  	uudecode <<EOT | ddq of=$bs conv=notrunc
    2.25  begin-base64 644 -
    2.26 @@ -141,7 +140,7 @@
    2.27  ====
    2.28  EOT
    2.29  	# Get setup
    2.30 -	setupsz=$(( $(getlong $SetupSzOfs $bs) & 0xFF ))
    2.31 +	setupsz=$(getlong $SetupSzOfs $bs 1)
    2.32  	if [ $setupsz -eq 0 ]; then
    2.33  		setupsz=4
    2.34  		store 8 $SetupSzOfs $setupsz $bs "setup size $setupsz"
    2.35 @@ -149,7 +148,7 @@
    2.36  	[ -n "$DEBUG" ] && echo "Read setup ($setupsz sectors) ..." 1>&2
    2.37  	ddq if=$KERNEL bs=512 skip=1 count=$setupsz >> $bs
    2.38  
    2.39 -	Version=$(( $(getlong 0x206 $bs) & 0xFFFF ))
    2.40 +	Version=$(getlong 0x206 $bs 2)
    2.41  	[ $(getlong $Magic $bs) -ne 1400005704 ] && Version=0
    2.42  	feature=""
    2.43  	while read prot kern info ; do
    2.44 @@ -181,7 +180,7 @@
    2.45  201 FFF 224	00:9B				heap_end_ptr
    2.46  EOT
    2.47  	if [ $Version -lt 514 ]; then
    2.48 -		version_string=$((0x200 + ($(getlong 0x20E $bs) & 65535) ))
    2.49 +		version_string=$((0x200 + $(getlong 0x20E $bs 2) ))
    2.50  		store	16	0x0037	$version_string	$bs version_string
    2.51  	fi
    2.52  	if [ $Version -ge 512 -a $(getlong 0x214 $bs) -ge $((0x100000)) ]; then 
     3.1 --- a/syslinux/stuff/tools/isohybrid.sh	Wed Nov 21 20:46:23 2012 +0000
     3.2 +++ b/syslinux/stuff/tools/isohybrid.sh	Wed Nov 21 21:44:02 2012 +0100
     3.3 @@ -71,7 +71,7 @@
     3.4  # read a 32 bits data
     3.5  read32()
     3.6  {
     3.7 -	readiso $1 $2 4 | hexdump -e '"" 1/4 "%d" "\n"'
     3.8 +	readiso $1 $2 4 | od -N 4 -t u4 -An
     3.9  }
    3.10  
    3.11  # write a 32 bits data