fix build for older dists

OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=33
This commit is contained in:
Wolfgang Rosenauer 2010-12-21 20:21:22 +00:00 committed by Git OBS Bridge
parent e1d0c0e626
commit 5b98dde807
3 changed files with 11 additions and 95 deletions

View File

@ -1,66 +0,0 @@
--- etc/pcscd.init.in
+++ etc/pcscd.init.in
@@ -24,12 +24,14 @@
# PC/SC lite and Musclecard frameworks. It coordinates
# communications with smart card readers, smart cards, and
# cryptographic tokens that are connected to the system.
+# X-UnitedLinux-Default-Enabled: yes
### END INIT INFO
#
# Note! pcscd should be started after pcmcia, and shut down before it
# for smooth experience with PCMCIA readers.
-. @sysconfdir_exp@/init.d/functions
+. @sysconfdir_exp@/rc.status
+rc_reset
umask 077
@@ -45,19 +47,21 @@
start() {
echo -n $"Starting PC/SC smart card daemon ($prog): "
- @sbindir_exp@/update-reader.conf && daemon $prog $PCSCD_OPTIONS
+ @sbindir_exp@/update-reader.conf && startproc $exec $PCSCD_OPTIONS
retval=$?
+ rc_status
echo
[ $retval -eq 0 ] && touch $lockfile
- return $retval
+ rc_status -v
}
stop() {
echo -n $"Stopping PC/SC smart card daemon ($prog): "
- killproc $prog
+ killproc $exec
retval=$?
+ rc_status
echo
[ $retval -eq 0 ] && rm -f $lockfile
- return $retval
+ rc_status -v
}
restart() {
stop
@@ -73,12 +77,19 @@
restart
;;
status)
- status $prog
+ checkproc $exec
+ rc_status -v
;;
condrestart|try-restart)
- [ ! -f $lockfile ] || restart
+ if test -f $lockfile ; then
+ restart
+ else
+ rc_reset
+ fi
+ rc_status
;;
*)
echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
exit 2
esac
+rc_exit

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Dec 21 20:19:48 UTC 2010 - wr@rosenauer.org
- keep it building for older distributions as well by moving
the sysvinit requirement into a conditional
-------------------------------------------------------------------
Thu Dec 9 15:52:33 CET 2010 - duwe@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package pcsc-lite (Version 1.5.5)
# spec file for package pcsc-lite (Version 1.6.5)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -24,7 +24,7 @@ Name: pcsc-lite
BuildRequires: hal-devel pkg-config readline-devel
Version: 1.6.5
Release: 2
PreReq: %{insserv_prereq} %{fillup_prereq} sysvinit(syslog)
PreReq: %{insserv_prereq} %{fillup_prereq}
Group: Productivity/Security
License: BSD3c(or similar)
Url: http://pcsclite.alioth.debian.org/
@ -36,6 +36,9 @@ Source3: pre_checkin.sh
Source4: baselibs.conf
Source5: rcpcscd
Requires: libpcsclite1 >= %{version}
%if %suse_version > 1130
Requires: sysvinit(syslog)
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -56,15 +59,6 @@ an APDU like manner sent normally through the SCardTransmit() function.
This functionality is exercised in the driver.
Authors:
--------
David Corcoran <corcoran@linuxnet.com>
Ludovic Rousseau <ludovic.rousseau@free.fr>
Damien Sauveron <sauveron@labri.fr>
Carlos Prados <cprados@yahoo.com>
Antti Tapaninen <aet@cc.hut.fi>
%package -n libpcsclite1
License: BSD3c(or similar)
Group: System/Libraries
@ -88,15 +82,6 @@ an APDU like manner sent normally through the SCardTransmit() function.
This functionality is exercised in the driver.
Authors:
--------
David Corcoran <corcoran@linuxnet.com>
Ludovic Rousseau <ludovic.rousseau@free.fr>
Damien Sauveron <sauveron@labri.fr>
Carlos Prados <cprados@yahoo.com>
Antti Tapaninen <aet@cc.hut.fi>
%package devel
License: BSD3c(or similar)
Group: Development/Libraries/C and C++
@ -108,15 +93,6 @@ This package contains the development files for pcsc-lite. It allows to
compile plugins for the pcsc-lite package.
Authors:
--------
David Corcoran <corcoran@linuxnet.com>
Ludovic Rousseau <ludovic.rousseau@free.fr>
Damien Sauveron <sauveron@labri.fr>
Carlos Prados <cprados@yahoo.com>
Antti Tapaninen <aet@cc.hut.fi>
%prep
%setup -q
cp -a %{S:1} %{S:2} .