diff options
author | LukenShiro <lukenshiro@ngi.it> | 2010-05-12 17:45:43 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-12 17:45:43 +0200 |
commit | d5b94fe2515c8e1003d35a315f080846fd6aed2a (patch) | |
tree | a95c9be83335a4c7ec962bc6de63c33930484994 /system/openct | |
parent | 1edfcecbd54c9413f1b1e94132e393f16297d301 (diff) |
system/openct: Updated for version 0.6.16
Diffstat (limited to 'system/openct')
-rw-r--r-- | system/openct/README | 8 | ||||
-rw-r--r-- | system/openct/openct.SlackBuild | 117 | ||||
-rw-r--r-- | system/openct/openct.info | 8 | ||||
-rw-r--r-- | system/openct/rc.openctd | 2 |
4 files changed, 77 insertions, 58 deletions
diff --git a/system/openct/README b/system/openct/README index 9824b881f1fb..fc4f066f7f3c 100644 --- a/system/openct/README +++ b/system/openct/README @@ -13,9 +13,13 @@ comment lines in other file(s) and run "/usr/sbin/update-reader.conf". Compiling with "APIDOC=1 ./openct.SlackBuild" produces API .pdf documentation (mainly intended for developers). +Compiling with "HALD=1 ./openct.SlackBuild" enable smart-card reader +detection using hal daemon's .fdi files. By default openct uses udev rules +instead to detect it. Hal and udev are alternative. + Compiling with "NONPRIV=1 ./openct.SlackBuild" enable non-privileged -mode, but you need to modify /etc/rc.d/rc.openctd to allow 'chown' to -change user/group. +mode, but you may need to modify /etc/rc.d/rc.openctd to allow 'chown' +to change user/group. 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: diff --git a/system/openct/openct.SlackBuild b/system/openct/openct.SlackBuild index f3db81a3e30e..b4083691053f 100644 --- a/system/openct/openct.SlackBuild +++ b/system/openct/openct.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for openct -# Copyright 2008 LukenShiro <lukenshiro@ngi.it> +# Copyright 2008-2009 LukenShiro <lukenshiro@ngi.it> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=openct -VERSION=${VERSION:-0.6.15} +VERSION=${VERSION:-0.6.16} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -33,16 +33,20 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -APIDOC=${APIDOC:-0} # api documentation not built by default -NONPRIV=${NONPRIV:-0} # disable not-privileged mode (it will be used by root) +APIDOC=${APIDOC:-0} # api documentation not built by default +NONPRIV=${NONPRIV:-0} # disable not-privileged mode (it will be used by root) +HALD=${HALD:-0} # hal detection is disabled by default, we use udev instead DOCFILES="NEWS TODO LGPL-2.1" if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" fi set -e # Exit on most errors @@ -69,11 +73,18 @@ esac # '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 - 0) NONPRIV_FLAGS="--with-daemon-user=root \ - --with-daemon-groups=root --disable-non-privileged" # root-only + 0) NONPRIV_FLAGS="--with-daemon-groups=root \ + --disable-non-privileged" # root-only ;; - *) NONPRIV_FLAGS="--with-daemon-user=root \ - --with-daemon-groups=plugdev --enable-non-privileged" # non privileged mode + *) NONPRIV_FLAGS="--with-daemon-groups=plugdev \ + --enable-non-privileged" # non privileged mode + ;; +esac + +case "$HALD" in + 0) UDEV_FLAGS="--with-udev=/lib${LIBDIRSUFFIX}/udev" + ;; + *) UDEV_FLAGS="" # do nothing ;; esac @@ -82,21 +93,22 @@ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --localstatedir=/var \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --datarootdir=/usr/share \ --mandir=/usr/man \ - --disable-static \ --enable-usb \ --enable-pcsc \ --enable-doc \ - --with-udev=/lib/udev \ - --with-bundle=/usr/lib/pcsc/drivers \ + --with-bundle=/usr/lib${LIBDIRSUFFIX}/pcsc/drivers \ --${APIDOC_FLAG}able-api-doc \ - --with-ifddir \ + --with-ifddir=/usr/lib${LIBDIRSUFFIX}/ifd \ --disable-static \ --build=$ARCH-slackware-linux \ - $NONPRIV_FLAGS + --with-daemon-user=root \ + $NONPRIV_FLAGS \ + $UDEV_FLAGS make make install DESTDIR=$PKG @@ -106,20 +118,20 @@ mkdir -p $PKG/etc/rc.d cat $CWD/rc.openctd > $PKG/etc/rc.d/rc.openctd.new chmod 0755 $PKG/etc/rc.d/rc.openctd.new case "$NONPRIV" in - 0) true # do nothing - ;; - *) # enable non-privileged in rc.openctd + 0) true # do nothing + ;; + *) # enable non-privileged in rc.openctd sed -i "s|#chown root:plugdev|chown root:plugdev|g" $PKG/etc/rc.d/rc.openctd.new - sed -i "s|#chmod 750|chmod 750|g" $PKG/etc/rc.d/rc.openctd.new + sed -i "s|#chmod 750|chmod 750|g" $PKG/etc/rc.d/rc.openctd.new ;; esac # Don't clobber the config file mv $PKG/etc/openct.conf $PKG/etc/openct.conf.new -# used for serial devices within pcsc-lite -# entries decommented by default (as they could tamper with pcsc-lite's device detection) -# renamed to avoid pcsc-lite's reader.conf overwriting +# Used for serial devices within pcsc-lite +# entries decommented by default (as they could tamper with pcsc-lite's device +# detection) renamed to avoid pcsc-lite's reader.conf overwriting mkdir -p $PKG/etc/reader.conf.d cp -a etc/reader.conf $PKG/etc/reader.conf.d/reader-openct.conf.new sed -i "s|^FRIENDLYNAME|#FRIENDLYNAME|g" $PKG/etc/reader.conf.d/reader-openct.conf.new @@ -127,37 +139,37 @@ sed -i "s|^DEVICENAME|#DEVICENAME|g" $PKG/etc/reader.conf.d/reader-openct.conf.n sed -i "s|^LIBPATH|#LIBPATH|g" $PKG/etc/reader.conf.d/reader-openct.conf.new sed -i "s|^CHANNELID|#CHANNELID|g" $PKG/etc/reader.conf.d/reader-openct.conf.new -# installing udev scripts for openct -mkdir -p $PKG/lib/udev -install -m755 etc/openct_usb $PKG/lib/udev/openct_usb -install -m755 etc/openct_pcmcia $PKG/lib/udev/openct_pcmcia -install -m755 etc/openct_serial $PKG/lib/udev/openct_serial -# to maintain forward compatibility with more recent udev (particularly Slackware post-12.1 current's udev) -sed -i "s|udevinfo|udevadm info|g" $PKG/lib/udev/openct_usb - -# installing udev rules for openct -mkdir -p $PKG/etc/udev/rules.d -cp -a etc/openct.udev $PKG/etc/udev/rules.d/95-openct.rules -# update attributes according to recent udev rules' naming convention -sed -i "s|SYSFS{|ATTR{|g" $PKG/etc/udev/rules.d/95-openct.rules -# modification taken to prevent bug (as happened in other distributions: -# i.e. https://bugzilla.redhat.com/287871): -# it seems 'sleep' program would otherwise be applied to every usb add event, -# not only to this one -sed -i "s|^PROGRAM=|#PROGRAM=|g" $PKG/etc/udev/rules.d/95-openct.rules - -# REMINDER for slackware-current post-12.1: -# as WAIT_FOR_SYSFS is replaced by WAIT_FOR in udev>=123: -#sed -i "s|WAIT_FOR_SYSFS=|WAIT_FOR=|g" $PKG/etc/udev/rules.d/95-openct.rules -# maybe it will have to be moved to /lib/udev/rules.d/, too - -# installing openct rules/script for hal -mkdir -p $PKG/usr/share/hal/fdi/information/10freedesktop/ -cp -a etc/openct.fdi $PKG/usr/share/hal/fdi/information/10freedesktop/10-usb-openct.fdi -mkdir -p $PKG/usr/libexec -cp -a etc/openct.hald $PKG/usr/libexec/hald-addon-openct - -# directory for status, socket and lock files +# Hal and udev detection are alternative, and their rules should not be +# installed at the same time, according to upstream. +case "$HALD" in + 0) # Install udev scripts for openct + mkdir -p $PKG/lib${LIBDIRSUFFIX}/udev + install -m755 etc/openct_usb $PKG/lib${LIBDIRSUFFIX}/udev/openct_usb + install -m755 etc/openct_pcmcia $PKG/lib${LIBDIRSUFFIX}/udev/openct_pcmcia + install -m755 etc/openct_serial $PKG/lib${LIBDIRSUFFIX}/udev/openct_serial + + # Install udev rules for openct + mkdir -p $PKG/lib${LIBDIRSUFFIX}/udev/rules.d + cp -a etc/openct.udev $PKG/lib${LIBDIRSUFFIX}/udev/rules.d/95-openct.rules + # Update attributes according to recent udev rules' naming convention + sed -i "s|SYSFS{|ATTR{|g" $PKG/lib${LIBDIRSUFFIX}/udev/rules.d/95-openct.rules + # WAIT_FOR_SYSFS is replaced by WAIT_FOR in udev>=123: + sed -i "s|WAIT_FOR_SYSFS=|WAIT_FOR=|g" $PKG/lib${LIBDIRSUFFIX}/udev/rules.d/95-openct.rules + # modification taken to prevent bug (as happened in other distributions: + # i.e. https://bugzilla.redhat.com/287871): + # it seems 'sleep' program would otherwise be applied to every usb add + # event, not only to this one + sed -i "s|^PROGRAM=|#PROGRAM=|g" $PKG/lib${LIBDIRSUFFIX}/udev/rules.d/95-openct.rules + ;; + *) # Install openct rules/script for hal + mkdir -p $PKG/usr/share/hal/fdi/information/10freedesktop/ + cp -a etc/openct.fdi $PKG/usr/share/hal/fdi/information/10freedesktop/10-usb-openct.fdi + mkdir -p $PKG/usr/libexec + install -m755 etc/openct.hald $PKG/usr/libexec/hald-addon-openct + ;; +esac + +# Directory for status, socket and lock files mkdir -p $PKG/var/run/openct case "$NONPRIV" in 0) USR_GRP="root:root" # root-only @@ -167,6 +179,9 @@ case "$NONPRIV" in esac chown $USR_GRP $PKG/var/run/openct +# Make directory for openct modules (not bundled with openct) +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/ifd + ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null diff --git a/system/openct/openct.info b/system/openct/openct.info index 33eb4739513e..8dc3749ed2ae 100644 --- a/system/openct/openct.info +++ b/system/openct/openct.info @@ -1,8 +1,8 @@ PRGNAM="openct" -VERSION="0.6.15" +VERSION="0.6.16" HOMEPAGE="http://www.opensc-project.org/openct/" -DOWNLOAD="http://www.opensc-project.org/files/openct/openct-0.6.15.tar.gz" -MD5SUM="70205beac03974e266fc259b6c9feaa8" +DOWNLOAD="http://www.opensc-project.org/files/openct/openct-0.6.16.tar.gz" +MD5SUM="d8d8c63269985303a303a218c4b953d7" MAINTAINER="LukenShiro" EMAIL="lukenshiro@ngi.it" -APPROVED="rworkman" +APPROVED="dsomero" diff --git a/system/openct/rc.openctd b/system/openct/rc.openctd index 93244034aede..28fab3edc680 100644 --- a/system/openct/rc.openctd +++ b/system/openct/rc.openctd @@ -4,7 +4,7 @@ # based on original upstream openct's init-script, modified for # SlackBuilds.org by LukenShiro <lukenshiro<at>ngi.it> -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/openct-control NAME="OpenCT smart card terminal framework" OPENCT_OPTS="" |