summaryrefslogtreecommitdiff
path: root/system/pcsc-lite
diff options
context:
space:
mode:
authorLukenShiro <lukenshiro@ngi.it>2010-10-18 21:29:12 -0500
committerErik Hanson <erik@slackbuilds.org>2010-10-20 10:50:23 -0500
commit9f9119753fe68c18f8b5e2494222fe6d8f9f8934 (patch)
tree3008b4f66467999583589208ce7ed990719b834c /system/pcsc-lite
parent1a59ef2239e9a6637f0fa674df5a0f321e7422fc (diff)
downloadslackbuilds-9f9119753fe68c18f8b5e2494222fe6d8f9f8934.tar.gz
system/pcsc-lite: Updated for version 1.6.4.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/pcsc-lite')
-rw-r--r--system/pcsc-lite/README28
-rw-r--r--system/pcsc-lite/README.SLACKWARE26
-rw-r--r--system/pcsc-lite/docs-DRIVERS.diff2
-rw-r--r--system/pcsc-lite/doinst.sh2
-rw-r--r--system/pcsc-lite/pcsc-lite.SlackBuild67
-rw-r--r--system/pcsc-lite/pcsc-lite.info8
-rw-r--r--system/pcsc-lite/rc.pcscd7
7 files changed, 74 insertions, 66 deletions
diff --git a/system/pcsc-lite/README b/system/pcsc-lite/README
index 64f159110f..a197e258f9 100644
--- a/system/pcsc-lite/README
+++ b/system/pcsc-lite/README
@@ -6,25 +6,13 @@ communicating to smart cards and readers.
Compiling with "DEBUGATR=1 ./pcsc-lite.SlackBuild" enables ATR parsing debug
output messages. Compiling with "APIDOC=1 ./pcsc-lite.SlackBuild" produces
-API .pdf documentation (mainly intended for developers).
+API .pdf documentation (for ifd handlers only, mainly intended for developers).
-pcsc-lite uses libusb for smart-card reader's detection. If you want to
-avoid usb polling (according to upstream's advice), you can compile with
-"HALD=1 ./pcsc-lite.SlackBuild" in order to use libhal for detecting your
-reader.
+pcsc-lite uses libhal for smart-card reader's detection, according to
+upstream's advice. If you want to use usb polling, you can pass "HALD=0"
+to the script when building in order to use libusb for detecting your reader
+(be aware that, using libusb, if your reader can be managed at the same time
+by the openct driver *and* by the pcsc-lite driver, so you may experience
+some detection issues).
-NOTE: drivers are not included and must be compiled and installed separately.
-See DRIVERS file in pcsc-lite's doc directory for more information on getting
-and installing specific drivers. pcsc-lite is compiled with the
---enable-usbdropdir=<libdir>/pcsc/drivers flag -- this directory will be the
-destination for usb readers' drivers (ccid, cardman, and others).
-
-For serial and pcmcia readers only, it is necessary to edit files in
-/etc/reader.conf.d/ and run "/usr/sbin/update-reader.conf".
-
-To start PC/SC-lite daemon, run "/etc/rc.d/rc.pcscd start".
-For pcmcia readers, this daemon should be started after rc.pcmcia - this is
-most easily accomplished by adding the following to /etc/rc.d/rc.local:
- if [ -x /etc/rc.d/rc.pcscd ]; then
- /etc/rc.d/rc.pcscd start
- fi
+Please see README.SLACKWARE in pcsc-lite's documentation directory for notes.
diff --git a/system/pcsc-lite/README.SLACKWARE b/system/pcsc-lite/README.SLACKWARE
new file mode 100644
index 0000000000..392991f6b1
--- /dev/null
+++ b/system/pcsc-lite/README.SLACKWARE
@@ -0,0 +1,26 @@
+To start PC/SC-lite daemon, run "/etc/rc.d/rc.pcscd start". This is most
+easily accomplished by adding the following to /etc/rc.d/rc.local:
+ if [ -x /etc/rc.d/rc.pcscd ]; then
+ /etc/rc.d/rc.pcscd start
+ fi
+For pcmcia readers, this daemon should be started after rc.pcmcia.
+
+Beware!
+- PC/SL-lite daemon is meant as _alternative_ to openct: running rc.openctd
+and rc.pcscd at the same time can and will lead to unforseeable problems
+(specially with usb devices that can be managed by both of them, one daemon
+can claim one device, making it unavailable for other daemon).
+
+Smartcard reader's drivers are not included and must be compiled and installed
+separately. See DRIVERS file in pcsc-lite's doc directory for more information
+on getting and installing specific drivers. pcsc-lite is compiled with the
+--enable-usbdropdir=<libdir>/pcsc/drivers flag -- this directory will be the
+destination for usb readers' drivers (e.g. ccid, cardman, ...).
+
+Since version 1.6.0, serial support is not really maintained. Upstream
+developer deems serial readers as rare, so he no longer provides reader.conf
+file: if it's still required, you will have to manually create it in
+/etc/reader.conf.d (please see 'man 5 reader.conf' for details).
+
+Since version 1.6.0, events are sent through the socket, so you have to
+manually remove unused /var/run/pcscd/pcscd.events/ directory.
diff --git a/system/pcsc-lite/docs-DRIVERS.diff b/system/pcsc-lite/docs-DRIVERS.diff
index 821b649c21..2796aa5225 100644
--- a/system/pcsc-lite/docs-DRIVERS.diff
+++ b/system/pcsc-lite/docs-DRIVERS.diff
@@ -7,7 +7,7 @@
-copy the directory to /usr/local/pcsc/drivers/. If the directory
-/usr/local/pcsc/drivers/ does not exist create it before copying the driver
+copy the directory to <libdir>/pcsc/drivers/. If the directory
-+<libdir>/pcsc/drivers/ does not exist create it before copying the driver
++<libdir>/pcsc/drivers/ does not exist, create it before copying the driver
directory to it.
Example Mac OS X, Linux 2.4:
diff --git a/system/pcsc-lite/doinst.sh b/system/pcsc-lite/doinst.sh
index 1555bf6c5f..5086b84736 100644
--- a/system/pcsc-lite/doinst.sh
+++ b/system/pcsc-lite/doinst.sh
@@ -11,7 +11,6 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same perms on rc.pcscd.new:
if [ -e etc/rc.d/rc.pcscd ]; then
cp -a etc/rc.d/rc.pcscd etc/rc.d/rc.pcscd.new.incoming
cat etc/rc.d/rc.pcscd.new > etc/rc.d/rc.pcscd.new.incoming
@@ -19,5 +18,4 @@ if [ -e etc/rc.d/rc.pcscd ]; then
fi
config etc/rc.d/rc.pcscd.new
-config etc/reader.conf.d/reader.conf.new
diff --git a/system/pcsc-lite/pcsc-lite.SlackBuild b/system/pcsc-lite/pcsc-lite.SlackBuild
index e8c122c8d6..2d6b9d3b4e 100644
--- a/system/pcsc-lite/pcsc-lite.SlackBuild
+++ b/system/pcsc-lite/pcsc-lite.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for pcsc-lite
-# Copyright 2007-2009 LukenShiro <lukenshiro@ngi.it>
+# Copyright 2007-2010 LukenShiro <lukenshiro@ngi.it>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,16 +23,14 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=pcsc-lite
-VERSION=${VERSION:-1.5.5}
+VERSION=${VERSION:-1.6.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -44,19 +42,17 @@ OUTPUT=${OUTPUT:-/tmp}
# Debug is off by default
DEBUGATR=${DEBUGATR:-0}
-
# API documentation building is off by default
APIDOC=${APIDOC:-0}
# Program to convert .tex files into .pdf (for APIDOC)
TEXTOPDFBIN="/usr/share/texmf/bin/pdflatex"
-# using upstream preferred behaviour by default (libhal)
-# 0 for conservative detection behaviour, 1 for libhal
-HALD=${HALD:-0}
+# 0 for conservative detection behaviour (libusb), 1 for libhal
+HALD=${HALD:-1} # using libhal behaviour by default
-# README and README.DAEMON are not useful and partly outdated. ChangeLog.svn is empty.
-DOCFILES="DRIVERS SECURITY ChangeLog COPYING HELP NEWS TODO AUTHORS INSTALL"
+# README and README.DAEMON are not useful and partly outdated.
+DOCFILES="DRIVERS SECURITY ChangeLog* COPYING HELP NEWS TODO AUTHORS INSTALL"
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -72,7 +68,7 @@ else
LIBDIRSUFFIX=""
fi
-set -e # Exit on most errors
+set -e # Exit on most errors
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -81,7 +77,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
# Fix the DRIVERS file to reflect the correct drivers directory as built
# with this script
@@ -89,22 +89,18 @@ patch -p0 < $CWD/docs-DRIVERS.diff || exit 1
# ATR (answer to reset) debug parsing output
case "$DEBUGATR" in
- 0) DEBUGATR_FLAG="dis"
- ;;
- *) DEBUGATR_FLAG="en"
- ;;
+ 0) DEBUGATR_FLAG="dis" ;;
+ *) DEBUGATR_FLAG="en" ;;
esac
# libusb and libhal support are mutually exclusive for reader detection:
case "$HALD" in
- 0) LIBHAL_FLAG="--enable-libusb --disable-libhal"
- ;;
- *) LIBHAL_FLAG="--enable-libhal --disable-libusb"
- ;;
-esac
+ 0) LIBHAL_FLAG="--enable-libusb --disable-libhal" ;;
+ *) LIBHAL_FLAG="--enable-libhal --disable-libusb" ;;
+esac
-# --enable-runpid=/var/run/pcscd.pid is not supported anymore;
-# --enable-muscledropdir="<libdir>/pcsc/services" is not supported anymore;
+# --enable-runpid=/var/run/pcscd.pid, and
+# --enable-muscledropdir="<libdir>/pcsc/services" are not supported anymore;
# pid directory changed to /var/run/pcscd for consistency
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -112,14 +108,14 @@ CXXFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--sysconfdir=/etc \
--libdir=/usr/lib${LIBDIRSUFFIX} \
- --enable-confdir=/etc \
--localstatedir=/var \
--enable-ipcdir=/var/run/pcscd \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-usbdropdir="/usr/lib${LIBDIRSUFFIX}/pcsc/drivers" \
--${DEBUGATR_FLAG}able-debugatr \
- $LIBHAL_FLAG
+ $LIBHAL_FLAG \
+ --build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
@@ -132,8 +128,10 @@ install -m 0644 doc/formaticc.1 $PKG/usr/man/man1/
mkdir -p $PKG/etc/rc.d
install -m 0755 $CWD/rc.pcscd $PKG/etc/rc.d/rc.pcscd.new
-# Don't clobber the config file
-mv $PKG/etc/reader.conf.d/reader.conf $PKG/etc/reader.conf.d/reader.conf.new
+# Correct manpages in reader.conf.5 and pcscd.8
+sed -i "s|@confdir@|/etc/reader.conf.d|g" $PKG/usr/man/man5/reader.conf.5
+sed -i "s|@sysconfdir_exp@/init.d/pcscd|/etc/rc.d/rc.pcscd|g" $PKG/usr/man/man8/pcscd.8
+sed -i "s|@sysconfdir_exp@|/etc/reader.conf.d|g" $PKG/usr/man/man8/pcscd.8
# Create the directory for drivers and such (not included with this package)
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pcsc/{drivers,services}
@@ -141,26 +139,25 @@ mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pcsc/{drivers,services}
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.SBo
+cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
# remove README.DAEMON, automatically installed by doc/Makefile.
rm -f $PKG/usr/doc/$PRGNAM-$VERSION/README.DAEMON
-## .pdf api documentation files seem not to be built from .tex sources during make
-## Most people don't need/want api docs anyway. Nonetheless tex sources are removed.
+# .pdf api documentation files seem not to be built from .tex sources during
+# make. Most people don't need/want api docs anyway. Nonetheless tex sources
+# are removed.
( cd $PKG/usr/doc/$PRGNAM-$VERSION/
case "$APIDOC" in
1) if [ -x $TEXTOPDFBIN ]; then
+ echo "Building API .pdf documentation ..."
$TEXTOPDFBIN ifdhandler-3.tex 1>&2 >/dev/null
- $TEXTOPDFBIN pcsc-lite.tex 1>&2 >/dev/null
else
echo "API .pdf documentation NOT built."
fi
diff --git a/system/pcsc-lite/pcsc-lite.info b/system/pcsc-lite/pcsc-lite.info
index 695f3e8dbd..e237e568db 100644
--- a/system/pcsc-lite/pcsc-lite.info
+++ b/system/pcsc-lite/pcsc-lite.info
@@ -1,10 +1,10 @@
PRGNAM="pcsc-lite"
-VERSION="1.5.5"
+VERSION="1.6.4"
HOMEPAGE="http://pcsclite.alioth.debian.org"
-DOWNLOAD="http://alioth.debian.org/frs/download.php/3082/pcsc-lite-1.5.5.tar.bz2"
-MD5SUM="6707e967fc8bb398a5d1b1089d4dff63"
+DOWNLOAD="http://alioth.debian.org/frs/download.php/3337/pcsc-lite-1.6.4.tar.bz2"
+MD5SUM="d2106e881803784fe2f27922d2d73bc0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="LukenShiro"
EMAIL="lukenshiro@ngi.it"
-APPROVED="dsomero"
+APPROVED="rworkman"
diff --git a/system/pcsc-lite/rc.pcscd b/system/pcsc-lite/rc.pcscd
index 613c80ae44..779ec844a7 100644
--- a/system/pcsc-lite/rc.pcscd
+++ b/system/pcsc-lite/rc.pcscd
@@ -16,7 +16,6 @@ pcscd_start() {
echo "PC/SC-lite daemon already started!"
else
echo "Starting PC/SC-lite smart card daemon..."
- /usr/sbin/update-reader.conf
/usr/sbin/pcscd $PCSCD_OPTS
fi
fi
@@ -27,10 +26,10 @@ pcscd_stop() {
echo "Stopping PC/SC-lite smart card daemon..."
if [ -e "$PIDFILE" ]; then
kill $(cat $PIDFILE)
- rm -f $PIDFILE 1>&2 >/dev/null
+ rm -f $PIDFILE 2>&1 >/dev/null
fi
# Just in case:
- killall pcscd 1>&2 >/dev/null
+ killall pcscd 2>&1 >/dev/null
}
# Restart
@@ -63,5 +62,5 @@ case "$1" in
pcscd_status
;;
*)
- echo "usage $0 start|stop|restart|status"
+ echo "usage: $0 start|stop|restart|status"
esac