wok rev 13657
pcsc-lite: up to 1.8.6, fix drivers path and add daemon init script
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Nov 21 20:44:31 2012 +0000 (2012-11-21) |
parents | 1d9aa01ffc5a |
children | 7cdbcec1f857 |
files | pcsc-lite-dev/receipt pcsc-lite/receipt pcsc-lite/stuff/init.d/pcscd |
line diff
1.1 --- a/pcsc-lite-dev/receipt Tue Nov 20 13:57:37 2012 +0200 1.2 +++ b/pcsc-lite-dev/receipt Wed Nov 21 20:44:31 2012 +0000 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="pcsc-lite-dev" 1.7 -VERSION="1.8.5" 1.8 +VERSION="1.8.6" 1.9 CATEGORY="development" 1.10 SHORT_DESC="SCard interface for communicating to smart cards and readers, developement files" 1.11 MAINTAINER="pascal.bellard@slitaz.org"
2.1 --- a/pcsc-lite/receipt Tue Nov 20 13:57:37 2012 +0200 2.2 +++ b/pcsc-lite/receipt Wed Nov 21 20:44:31 2012 +0000 2.3 @@ -1,7 +1,7 @@ 2.4 # SliTaz package receipt. 2.5 2.6 PACKAGE="pcsc-lite" 2.7 -VERSION="1.8.5" 2.8 +VERSION="1.8.6" 2.9 CATEGORY="base-system" 2.10 SHORT_DESC="SCard interface for communicating to smart cards and readers." 2.11 MAINTAINER="pascal.bellard@slitaz.org" 2.12 @@ -9,15 +9,18 @@ 2.13 TARBALL="$PACKAGE-$VERSION.tar.bz2" 2.14 WGET_URL="https://alioth.debian.org/frs/download.php/3741/$TARBALL" 2.15 2.16 -DEPENDS="udev" 2.17 +DEPENDS="udev python" 2.18 BUILD_DEPENDS="wget udev-dev perl libtool" 2.19 2.20 # Rules to configure and make the package. 2.21 compile_rules() 2.22 { 2.23 cd $src 2.24 - ./configure --prefix=/usr \ 2.25 - --enable-usbdropdir=/usr/lib/pscs/drivers \ 2.26 + ./configure \ 2.27 + --prefix=/usr \ 2.28 + --enable-libudev \ 2.29 + --enable-ipcdir=/run/pcscd \ 2.30 + --enable-usbdropdir=/usr/lib/pcsc/drivers \ 2.31 $CONFIGURE_ARGS && 2.32 make && make DESTDIR=$DESTDIR install 2.33 } 2.34 @@ -25,8 +28,21 @@ 2.35 # Rules to gen a SliTaz package suitable for Tazpkg. 2.36 genpkg_rules() 2.37 { 2.38 - mkdir -p $fs/usr/lib 2.39 + mkdir -p $fs/usr/lib/pcsc/drivers $fs/etc 2.40 cp -a $install/usr/lib/*.so* $fs/usr/lib 2.41 cp -a $install/usr/sbin $fs/usr 2.42 cp -a $install/usr/bin $fs/usr 2.43 + cp -a $stuff/init.d $fs/etc 2.44 } 2.45 + 2.46 +# Daemon options in: daemons.conf 2.47 +post_install() 2.48 +{ 2.49 + local root 2.50 + root=$1 2.51 + if ! grep -q 'PCSCD_OPTIONS' $root/etc/daemons.conf; then 2.52 + echo '# PC/SC smart card daemon options.' >> $root/etc/daemons.conf 2.53 + echo 'PCSCD_OPTIONS=""' >> $root/etc/daemons.conf 2.54 + echo '' >> $root/etc/daemons.conf 2.55 + fi 2.56 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/pcsc-lite/stuff/init.d/pcscd Wed Nov 21 20:44:31 2012 +0000 3.3 @@ -0,0 +1,43 @@ 3.4 +#!/bin/sh 3.5 +# /etc/init.d/pcscd: Start, stop and restart pcsc-lite daemon on SliTaz, 3.6 +# at boot time or with the command line. Daemons options are configured 3.7 +# with /etc/daemons.conf 3.8 +# 3.9 +. /etc/init.d/rc.functions 3.10 +. /etc/daemons.conf 3.11 + 3.12 +NAME=Pcscd 3.13 +DESC="PC/SC smart card daemon" 3.14 +DAEMON=/usr/bin/pcscd 3.15 +PIDFILE=/run/pcscd/pcscd.pid 3.16 + 3.17 +case "$1" in 3.18 + start) 3.19 + if active_pidfile $PIDFILE pcscd ; then 3.20 + echo "$NAME already running." 3.21 + exit 1 3.22 + fi 3.23 + echo "Starting $DESC: $NAME... " 3.24 + mkdir -p $(dirname $PIDFILE) 3.25 + $DAEMON $PCSCD_OPTIONS ;; 3.26 + stop) 3.27 + if ! active_pidfile $PIDFILE pcscd ; then 3.28 + echo "$NAME is not running." 3.29 + exit 1 3.30 + fi 3.31 + echo -n "Stopping $DESC: $NAME... " 3.32 + kill $(cat $PIDFILE) 3.33 + rm $PIDFILE 3.34 + status ;; 3.35 + restart) 3.36 + $0 stop 3.37 + sleep 2 3.38 + $0 start ;; 3.39 + *) 3.40 + echo "" 3.41 + echo -e "\033[1mUsage:\033[0m /etc/init.d/$(basename $0) [start|stop|restart]" 3.42 + echo "" 3.43 + exit 1 ;; 3.44 +esac 3.45 + 3.46 +exit 0