# HG changeset patch # User Christophe Lincoln # Date 1353530671 0 # Node ID e509bd5076505f9d7ad49d18bc85925f20fe4a4e # Parent 1d9aa01ffc5a349cd5f7b4f175292ce4caadefde pcsc-lite: up to 1.8.6, fix drivers path and add daemon init script diff -r 1d9aa01ffc5a -r e509bd507650 pcsc-lite-dev/receipt --- a/pcsc-lite-dev/receipt Tue Nov 20 13:57:37 2012 +0200 +++ b/pcsc-lite-dev/receipt Wed Nov 21 20:44:31 2012 +0000 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="pcsc-lite-dev" -VERSION="1.8.5" +VERSION="1.8.6" CATEGORY="development" SHORT_DESC="SCard interface for communicating to smart cards and readers, developement files" MAINTAINER="pascal.bellard@slitaz.org" diff -r 1d9aa01ffc5a -r e509bd507650 pcsc-lite/receipt --- a/pcsc-lite/receipt Tue Nov 20 13:57:37 2012 +0200 +++ b/pcsc-lite/receipt Wed Nov 21 20:44:31 2012 +0000 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="pcsc-lite" -VERSION="1.8.5" +VERSION="1.8.6" CATEGORY="base-system" SHORT_DESC="SCard interface for communicating to smart cards and readers." MAINTAINER="pascal.bellard@slitaz.org" @@ -9,15 +9,18 @@ TARBALL="$PACKAGE-$VERSION.tar.bz2" WGET_URL="https://alioth.debian.org/frs/download.php/3741/$TARBALL" -DEPENDS="udev" +DEPENDS="udev python" BUILD_DEPENDS="wget udev-dev perl libtool" # Rules to configure and make the package. compile_rules() { cd $src - ./configure --prefix=/usr \ - --enable-usbdropdir=/usr/lib/pscs/drivers \ + ./configure \ + --prefix=/usr \ + --enable-libudev \ + --enable-ipcdir=/run/pcscd \ + --enable-usbdropdir=/usr/lib/pcsc/drivers \ $CONFIGURE_ARGS && make && make DESTDIR=$DESTDIR install } @@ -25,8 +28,21 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr/lib + mkdir -p $fs/usr/lib/pcsc/drivers $fs/etc cp -a $install/usr/lib/*.so* $fs/usr/lib cp -a $install/usr/sbin $fs/usr cp -a $install/usr/bin $fs/usr + cp -a $stuff/init.d $fs/etc } + +# Daemon options in: daemons.conf +post_install() +{ + local root + root=$1 + if ! grep -q 'PCSCD_OPTIONS' $root/etc/daemons.conf; then + echo '# PC/SC smart card daemon options.' >> $root/etc/daemons.conf + echo 'PCSCD_OPTIONS=""' >> $root/etc/daemons.conf + echo '' >> $root/etc/daemons.conf + fi +} diff -r 1d9aa01ffc5a -r e509bd507650 pcsc-lite/stuff/init.d/pcscd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pcsc-lite/stuff/init.d/pcscd Wed Nov 21 20:44:31 2012 +0000 @@ -0,0 +1,43 @@ +#!/bin/sh +# /etc/init.d/pcscd: Start, stop and restart pcsc-lite daemon on SliTaz, +# at boot time or with the command line. Daemons options are configured +# with /etc/daemons.conf +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=Pcscd +DESC="PC/SC smart card daemon" +DAEMON=/usr/bin/pcscd +PIDFILE=/run/pcscd/pcscd.pid + +case "$1" in + start) + if active_pidfile $PIDFILE pcscd ; then + echo "$NAME already running." + exit 1 + fi + echo "Starting $DESC: $NAME... " + mkdir -p $(dirname $PIDFILE) + $DAEMON $PCSCD_OPTIONS ;; + stop) + if ! active_pidfile $PIDFILE pcscd ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill $(cat $PIDFILE) + rm $PIDFILE + status ;; + restart) + $0 stop + sleep 2 + $0 start ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/$(basename $0) [start|stop|restart]" + echo "" + exit 1 ;; +esac + +exit 0