From ca641aeab8dcba4808ad91a9f29292d08feb522b Mon Sep 17 00:00:00 2001 From: LukenShiro Date: Sun, 10 Feb 2013 10:26:11 -0500 Subject: system/openct: Minor fixes and updated download link. Signed-off-by: dsomero --- system/openct/README | 2 +- system/openct/README.SBo | 18 ------------------ system/openct/README.SLACKWARE | 18 ++++++++++++++++++ system/openct/doinst.sh | 19 ++++++++++++------- system/openct/openct.SlackBuild | 26 +++++++++++++------------- system/openct/openct.info | 4 ++-- system/openct/slack-desc | 4 ++-- 7 files changed, 48 insertions(+), 43 deletions(-) delete mode 100644 system/openct/README.SBo create mode 100644 system/openct/README.SLACKWARE (limited to 'system/openct') diff --git a/system/openct/README b/system/openct/README index 506768f94b..3c2fcbd0f4 100644 --- a/system/openct/README +++ b/system/openct/README @@ -10,4 +10,4 @@ Compiling with "NONPRIV=1 ./openct.SlackBuild" enables non-privileged mode, but you may need to modify /etc/rc.d/rc.openctd to allow 'chown' to change user/group. -See README.SBo for further information. +See README.SLACKWARE for further information. diff --git a/system/openct/README.SBo b/system/openct/README.SBo deleted file mode 100644 index c15b64f274..0000000000 --- a/system/openct/README.SBo +++ /dev/null @@ -1,18 +0,0 @@ -To start OpenCT daemon, run "/etc/rc.d/rc.openctd start". This is -most easily accomplished by adding the following to /etc/rc.d/rc.local: - if [ -x /etc/rc.d/rc.openctd ]; then - /etc/rc.d/rc.openctd start - fi - -For serial and pcmcia readers only, for using it as a PC/SC ifdhandler, -you have to edit file reader-openct.conf in /etc/reader.conf.d/, to -comment lines in other file(s) and run "/usr/sbin/update-reader.conf". - -Beware! -- OpenCT daemon is meant as _alternative_ to pcsc-lite: 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). -- for some unknown reasons, if you start rc.openctd and then stop it, -you may need unplug and plug-in your usb smartcard reader in order -to it to be seen again, so udev rule is re-applied. diff --git a/system/openct/README.SLACKWARE b/system/openct/README.SLACKWARE new file mode 100644 index 0000000000..c15b64f274 --- /dev/null +++ b/system/openct/README.SLACKWARE @@ -0,0 +1,18 @@ +To start OpenCT daemon, run "/etc/rc.d/rc.openctd start". This is +most easily accomplished by adding the following to /etc/rc.d/rc.local: + if [ -x /etc/rc.d/rc.openctd ]; then + /etc/rc.d/rc.openctd start + fi + +For serial and pcmcia readers only, for using it as a PC/SC ifdhandler, +you have to edit file reader-openct.conf in /etc/reader.conf.d/, to +comment lines in other file(s) and run "/usr/sbin/update-reader.conf". + +Beware! +- OpenCT daemon is meant as _alternative_ to pcsc-lite: 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). +- for some unknown reasons, if you start rc.openctd and then stop it, +you may need unplug and plug-in your usb smartcard reader in order +to it to be seen again, so udev rule is re-applied. diff --git a/system/openct/doinst.sh b/system/openct/doinst.sh index bb02ff148c..76c6b78a52 100644 --- a/system/openct/doinst.sh +++ b/system/openct/doinst.sh @@ -11,14 +11,19 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -# Keep same perms on rc.openctd.new: -if [ -e etc/rc.d/rc.openctd ]; then - cp -a etc/rc.d/rc.openctd etc/rc.d/rc.openctd.new.incoming - cat etc/rc.d/rc.openctd.new > etc/rc.d/rc.openctd.new.incoming - mv etc/rc.d/rc.openctd.new.incoming etc/rc.d/rc.openctd.new -fi +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + -config etc/rc.d/rc.openctd.new +preserve_perms etc/rc.d/rc.openctd.new config etc/openct.conf.new config etc/reader.conf.d/reader-openct.conf.new diff --git a/system/openct/openct.SlackBuild b/system/openct/openct.SlackBuild index 8fc1ec37f5..63544bd091 100644 --- a/system/openct/openct.SlackBuild +++ b/system/openct/openct.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for openct -# Copyright 2008-2010 LukenShiro +# Copyright 2008-2013 LukenShiro, Italy # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,15 +24,13 @@ PRGNAM=openct VERSION=${VERSION:-0.6.20} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} 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 @@ -61,7 +59,7 @@ else LIBDIRSUFFIX="" fi -set -e # Exit on most errors +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -70,7 +68,11 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz 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 {} \; # building API doc case "$APIDOC" in @@ -81,7 +83,7 @@ case "$APIDOC" in esac # daemon user/group seem not to be really used unless for /var/run/openct, -# so set them to a saner 'root:root' or 'root:plugdev' (instead of upstream's +# so set them to a saner 'root:root' or 'root:plugdev' (instead of upstream's # 'openctd:usb'): for now it's unnecessary to add other user/group. # If NONPRIV is enabled you'll have to verify /etc/rc.d/rc.openctd accordingly. case "$NONPRIV" in @@ -173,18 +175,16 @@ chown $USR_GRP $PKG/var/run/openct # Make directory for openct modules (not bundled with openct) mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/ifd -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG -print0 | xargs -0 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 . -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 [ "$APIDOC" = "0" ] && rm -rf $PKG/usr/doc/$PRGNAM-$VERSION/api mkdir -p $PKG/install diff --git a/system/openct/openct.info b/system/openct/openct.info index 2c9b49c011..ee5841709d 100644 --- a/system/openct/openct.info +++ b/system/openct/openct.info @@ -1,7 +1,7 @@ PRGNAM="openct" VERSION="0.6.20" -HOMEPAGE="http://www.opensc-project.org/openct/" -DOWNLOAD="http://www.opensc-project.org/files/openct/openct-0.6.20.tar.gz" +HOMEPAGE="https://github.com/OpenSC/openct" +DOWNLOAD="http://downloads.sourceforge.net/opensc/openct/openct-0.6.20.tar.gz" MD5SUM="a1da3358ab798f1cb9232f1dbababc21" DOWNLOAD_x86_64="" MD5SUM_x86_64="" diff --git a/system/openct/slack-desc b/system/openct/slack-desc index e8768bd350..a7b579846c 100644 --- a/system/openct/slack-desc +++ b/system/openct/slack-desc @@ -10,8 +10,8 @@ openct: openct (Middleware framework for smart card terminals) openct: openct: It implements drivers for several smart card readers. It comes as openct: driver in ifdhandler format for PC/SC-Lite, as CT-API driver, or -openct: as a small and lean middleware, so applications can use it with -openct: minimal overhead. OpenCT also has a primitive mechanism to export +openct: as a small and lean middleware, so applications can use it with +openct: minimal overhead. OpenCT also has a primitive mechanism to export openct: smart card readers to remote machines via TCP/IP. openct: openct: Homepage: http://www.opensc-project.org/openct/ -- cgit v1.2.3-65-gdbad