2007-01-15 23:29:27 +00:00
|
|
|
#
|
2011-03-10 09:18:03 +00:00
|
|
|
# spec file for package pcsc-lite
|
2007-01-15 23:29:27 +00:00
|
|
|
#
|
2014-04-22 15:24:18 +00:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-15 23:29:27 +00:00
|
|
|
#
|
2008-08-22 23:50:21 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-15 23:29:27 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-03-30 18:10:39 +00:00
|
|
|
|
2007-01-15 23:29:27 +00:00
|
|
|
Name: pcsc-lite
|
2007-02-15 17:27:23 +00:00
|
|
|
# FIXME: Maybe we should use /usr/lib/pcsc/drivers as others do:
|
|
|
|
%define ifddir %{_libdir}/readers
|
2012-01-19 20:09:24 +00:00
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: pkg-config
|
2014-04-22 15:24:18 +00:00
|
|
|
BuildRequires: polkit-devel
|
2012-01-19 20:09:24 +00:00
|
|
|
BuildRequires: readline-devel
|
2011-04-05 18:42:13 +00:00
|
|
|
%if %suse_version >= 1120
|
|
|
|
BuildRequires: libudev-devel
|
|
|
|
%endif
|
2013-01-09 18:20:45 +00:00
|
|
|
%if %suse_version <= 1110
|
|
|
|
# libusb is an inferior method of USB enumeration, as it introduces polling
|
2011-01-11 13:33:42 +00:00
|
|
|
BuildRequires: libusb-1_0-devel
|
2011-04-05 18:42:13 +00:00
|
|
|
%endif
|
2011-11-20 12:27:01 +00:00
|
|
|
%if %suse_version > 1140
|
|
|
|
BuildRequires: systemd
|
|
|
|
%{?systemd_requires}
|
2011-01-11 13:33:42 +00:00
|
|
|
%endif
|
2013-01-16 18:59:13 +00:00
|
|
|
%if %suse_version > 1220
|
2013-01-09 17:17:48 +00:00
|
|
|
BuildRequires: gpg-offline
|
|
|
|
%endif
|
2014-04-22 15:24:18 +00:00
|
|
|
Version: 1.8.11
|
2012-01-19 20:09:24 +00:00
|
|
|
Release: 0
|
2011-05-17 20:56:45 +00:00
|
|
|
Requires(pre): pwdutils
|
2007-11-06 22:07:32 +00:00
|
|
|
Url: http://pcsclite.alioth.debian.org/
|
2011-04-05 18:42:13 +00:00
|
|
|
Summary: PCSC Smart Cards Library
|
2012-01-19 20:09:24 +00:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Productivity/Security
|
2008-04-06 05:32:17 +00:00
|
|
|
Source: %{name}-%{version}.tar.bz2
|
2009-02-03 23:22:36 +00:00
|
|
|
Source1: %{name}.sysconfig
|
2007-01-15 23:29:27 +00:00
|
|
|
Source2: README.SUSE
|
|
|
|
Source3: pre_checkin.sh
|
2010-01-07 12:02:09 +00:00
|
|
|
Source4: baselibs.conf
|
2011-01-11 13:33:42 +00:00
|
|
|
Source5: pcsc-lite-init
|
|
|
|
Source6: pcsc-lite-reader-conf
|
2013-01-09 17:17:48 +00:00
|
|
|
Source7: %{name}-%{version}.tar.bz2.asc
|
|
|
|
Source8: %{name}.keyring
|
2011-11-25 21:42:28 +00:00
|
|
|
Patch0: systemd-service.patch
|
2014-04-22 15:24:18 +00:00
|
|
|
Requires(post): %fillup_prereq
|
|
|
|
%if %suse_version < 1310
|
2011-03-10 09:18:03 +00:00
|
|
|
PreReq: sysvinit(syslog)
|
2014-04-22 15:24:18 +00:00
|
|
|
Requires(post): %insserv_prereq
|
2011-03-07 18:39:43 +00:00
|
|
|
%endif
|
2007-01-15 23:29:27 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-01-11 13:33:42 +00:00
|
|
|
%define USER scard
|
|
|
|
%define GROUP scard
|
2007-01-15 23:29:27 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
The purpose of PCSC Lite is to provide a Windows(R) SCard interface in
|
2007-11-06 22:07:32 +00:00
|
|
|
a very small form factor for communication with smart cards and
|
2007-02-15 17:27:23 +00:00
|
|
|
readers. PCSC Lite can be compiled directly for a desired reader driver
|
|
|
|
or can be used to dynamically allocate/deallocate reader drivers at
|
|
|
|
runtime (the default behavior).
|
2007-01-15 23:29:27 +00:00
|
|
|
|
2007-02-15 17:27:23 +00:00
|
|
|
PCSC Lite uses the same winscard API as used in Windows(R).
|
2007-01-15 23:29:27 +00:00
|
|
|
|
|
|
|
Security aware people should read the SECURITY file for possible
|
2007-11-06 22:07:32 +00:00
|
|
|
vulnerabilities of pcsclite and how to fix them. For information on how
|
|
|
|
to install drivers please read the DRIVERS file.
|
2007-01-15 23:29:27 +00:00
|
|
|
|
2007-11-06 22:07:32 +00:00
|
|
|
Memory cards will be supported through the MCT specification, which is
|
2007-01-15 23:29:27 +00:00
|
|
|
an APDU like manner sent normally through the SCardTransmit() function.
|
2007-11-06 22:07:32 +00:00
|
|
|
This functionality is exercised in the driver.
|
2007-01-15 23:29:27 +00:00
|
|
|
|
|
|
|
|
2009-02-03 23:22:36 +00:00
|
|
|
%package -n libpcsclite1
|
2011-05-17 20:56:45 +00:00
|
|
|
Summary: PCSC Smart Card Library
|
2012-02-07 07:59:31 +00:00
|
|
|
License: BSD-3-Clause
|
2012-01-19 20:09:24 +00:00
|
|
|
Group: System/Libraries
|
2011-05-17 20:56:45 +00:00
|
|
|
Recommends: pcsc-lite >= %{version}
|
2009-02-03 23:22:36 +00:00
|
|
|
|
|
|
|
%description -n libpcsclite1
|
|
|
|
The purpose of PCSC Lite is to provide a Windows(R) SCard interface in
|
|
|
|
a very small form factor for communication with smart cards and
|
|
|
|
readers. PCSC Lite can be compiled directly for a desired reader driver
|
|
|
|
or can be used to dynamically allocate/deallocate reader drivers at
|
|
|
|
runtime (the default behavior).
|
|
|
|
|
|
|
|
PCSC Lite uses the same winscard API as used in Windows(R).
|
|
|
|
|
|
|
|
Security aware people should read the SECURITY file for possible
|
|
|
|
vulnerabilities of pcsclite and how to fix them. For information on how
|
|
|
|
to install drivers please read the DRIVERS file.
|
|
|
|
|
|
|
|
Memory cards will be supported through the MCT specification, which is
|
|
|
|
an APDU like manner sent normally through the SCardTransmit() function.
|
|
|
|
This functionality is exercised in the driver.
|
|
|
|
|
|
|
|
|
2011-11-20 12:27:01 +00:00
|
|
|
%package -n libpcscspy0
|
|
|
|
Summary: PCSC Smart Card Library
|
2012-02-07 07:59:31 +00:00
|
|
|
License: GPL-3.0+
|
2012-01-19 20:09:24 +00:00
|
|
|
Group: System/Libraries
|
2011-11-20 12:27:01 +00:00
|
|
|
|
|
|
|
%description -n libpcscspy0
|
|
|
|
Supporting library for the PC/SC spy tool.
|
|
|
|
|
|
|
|
|
2007-02-15 17:27:23 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Development package for the MUSCLE project SmartCards library
|
2012-11-30 09:07:27 +00:00
|
|
|
License: BSD-3-Clause and GPL-3.0+
|
2012-01-19 20:09:24 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2011-05-17 21:57:02 +00:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2012-03-30 18:10:39 +00:00
|
|
|
Requires: glibc-devel
|
2011-05-17 21:57:02 +00:00
|
|
|
Requires: libpcsclite1 = %{version}-%{release}
|
2011-11-20 12:27:01 +00:00
|
|
|
Requires: libpcscspy0 = %{version}-%{release}
|
2007-01-15 23:29:27 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains the development files for pcsc-lite. It allows to
|
|
|
|
compile plugins for the pcsc-lite package.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2013-01-09 17:17:48 +00:00
|
|
|
%if 0%{?gpg_verify:1}
|
|
|
|
%gpg_verify %{S:7}
|
|
|
|
%endif
|
2007-02-15 17:27:23 +00:00
|
|
|
%setup -q
|
2011-11-25 21:42:28 +00:00
|
|
|
%patch0 -p1
|
2011-01-11 13:33:42 +00:00
|
|
|
cp -a %{S:1} %{S:2} %{S:5} %{S:6} .
|
2007-01-15 23:29:27 +00:00
|
|
|
|
|
|
|
%build
|
2007-02-15 17:27:23 +00:00
|
|
|
%configure\
|
2011-11-20 12:27:01 +00:00
|
|
|
--docdir=%{_docdir}/%{name} \
|
|
|
|
--enable-usbdropdir=%{ifddir} \
|
2011-04-05 18:42:13 +00:00
|
|
|
--disable-libhal \
|
2013-01-09 18:20:45 +00:00
|
|
|
%if %suse_version <= 1110
|
2011-04-05 18:42:13 +00:00
|
|
|
--disable-libudev \
|
2011-11-20 12:27:01 +00:00
|
|
|
%endif
|
|
|
|
%if %suse_version > 1140
|
|
|
|
--with-systemdsystemunitdir=%_unitdir \
|
2011-01-11 13:33:42 +00:00
|
|
|
%endif
|
2008-09-13 05:10:08 +00:00
|
|
|
--disable-static
|
2007-02-15 17:27:23 +00:00
|
|
|
make %{?jobs:-j%jobs}
|
2007-01-15 23:29:27 +00:00
|
|
|
|
|
|
|
%install
|
2007-02-15 17:27:23 +00:00
|
|
|
%makeinstall
|
2011-04-05 18:42:13 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{ifddir}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d/
|
2011-01-11 13:33:42 +00:00
|
|
|
sed s:@ifddir@:%{ifddir}: <pcsc-lite-reader-conf >$RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d/reader.conf
|
2007-02-15 17:27:23 +00:00
|
|
|
# this program is noinst in the package
|
2011-05-17 20:56:45 +00:00
|
|
|
#install src/.libs/testpcsc $RPM_BUILD_ROOT%{_sbindir}/
|
2014-04-22 15:24:18 +00:00
|
|
|
%if %suse_version < 1310
|
2011-05-17 20:56:45 +00:00
|
|
|
install -D -m 755 pcsc-lite-init $RPM_BUILD_ROOT%{_initrddir}/pcscd
|
|
|
|
ln -sf %{_initrddir}/pcscd $RPM_BUILD_ROOT%{_sbindir}/rcpcscd
|
2014-04-22 15:24:18 +00:00
|
|
|
%else
|
|
|
|
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcpcscd
|
|
|
|
%endif
|
2009-02-03 23:22:36 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
|
|
|
cp %{name}.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.pcscd
|
2007-07-27 00:04:14 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
2012-01-19 20:09:24 +00:00
|
|
|
cp -a AUTHORS ChangeLog ChangeLog.svn COPYING DRIVERS HELP NEWS README README.SUSE SECURITY TODO $RPM_BUILD_ROOT%{_docdir}/%{name}
|
2007-01-15 23:29:27 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2011-01-11 13:33:42 +00:00
|
|
|
%pre
|
2012-11-16 10:00:05 +00:00
|
|
|
getent group %{GROUP} >/dev/null || groupadd -r %{GROUP}
|
2013-01-07 19:05:37 +00:00
|
|
|
if getent passwd %{USER} >/dev/null ; then
|
|
|
|
# There was a bad login shell up to openSUSE 12.2 (bnc#796242), never in SLE. Fix it.
|
|
|
|
usermod -s /usr/sbin/nologin %{USER}
|
|
|
|
else
|
|
|
|
useradd -r -g %{GROUP} -s /usr/sbin/nologin -c "Smart Card Reader" -d /var/run/pcscd %{USER}
|
|
|
|
fi
|
2011-11-20 12:27:01 +00:00
|
|
|
%if %suse_version > 1140
|
|
|
|
%service_add_pre pcscd.service pcscd.socket
|
|
|
|
%endif
|
2011-05-17 20:56:45 +00:00
|
|
|
exit 0
|
2007-07-27 00:04:14 +00:00
|
|
|
|
2007-01-15 23:29:27 +00:00
|
|
|
%post
|
2011-11-20 12:27:01 +00:00
|
|
|
%if %suse_version > 1140
|
|
|
|
%service_add_post pcscd.service pcscd.socket
|
2011-11-29 09:21:05 +00:00
|
|
|
/bin/systemctl disable pcscd.service || :
|
2011-11-29 20:09:09 +00:00
|
|
|
/bin/systemctl enable pcscd.socket || :
|
2011-11-29 09:21:05 +00:00
|
|
|
/bin/systemctl try-restart pcscd.service || :
|
|
|
|
/bin/systemctl restart pcscd.socket || :
|
2011-11-25 21:42:28 +00:00
|
|
|
%endif
|
2014-04-22 15:24:18 +00:00
|
|
|
%if %suse_version < 1310
|
2011-05-17 20:56:45 +00:00
|
|
|
%fillup_and_insserv -y -n pcscd pcscd
|
2014-04-22 15:24:18 +00:00
|
|
|
%else
|
|
|
|
%fillup_only pcscd
|
|
|
|
%endif
|
2011-05-17 20:56:45 +00:00
|
|
|
|
|
|
|
%preun
|
2011-11-20 12:27:01 +00:00
|
|
|
%if %suse_version > 1140
|
|
|
|
%service_del_preun pcscd.service pcscd.socket
|
|
|
|
%endif
|
2014-04-22 15:24:18 +00:00
|
|
|
%if %suse_version < 1310
|
2011-11-25 21:42:28 +00:00
|
|
|
%stop_on_removal pcscd
|
2014-04-22 15:24:18 +00:00
|
|
|
%endif
|
2007-01-15 23:29:27 +00:00
|
|
|
|
|
|
|
%postun
|
2011-11-20 12:27:01 +00:00
|
|
|
%if %suse_version > 1140
|
|
|
|
%service_del_postun pcscd.service pcscd.socket
|
2011-11-29 09:21:05 +00:00
|
|
|
# make sure to reload systemd for possible downgrades
|
|
|
|
if [ "$1" = "1" ]; then
|
|
|
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
|
|
fi
|
2011-11-20 12:27:01 +00:00
|
|
|
%endif
|
2014-04-22 15:24:18 +00:00
|
|
|
%if %suse_version < 1310
|
2012-06-29 07:11:15 +00:00
|
|
|
%restart_on_update pcscd
|
2011-11-25 21:42:28 +00:00
|
|
|
%insserv_cleanup
|
2014-04-22 15:24:18 +00:00
|
|
|
%endif
|
2007-01-15 23:29:27 +00:00
|
|
|
|
2009-02-03 23:22:36 +00:00
|
|
|
%post -n libpcsclite1 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libpcsclite1 -p /sbin/ldconfig
|
|
|
|
|
2011-11-20 12:27:01 +00:00
|
|
|
%post -n libpcscspy0 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libpcscspy0 -p /sbin/ldconfig
|
|
|
|
|
2007-01-15 23:29:27 +00:00
|
|
|
%files
|
2007-02-15 17:27:23 +00:00
|
|
|
%defattr(-,root,root)
|
2012-01-19 20:09:24 +00:00
|
|
|
%docdir %{_docdir}/%{name}
|
|
|
|
%dir %{_docdir}/%{name}
|
|
|
|
%{_docdir}/%{name}/AUTHORS
|
|
|
|
%{_docdir}/%{name}/COPYING
|
|
|
|
%{_docdir}/%{name}/DRIVERS
|
|
|
|
%{_docdir}/%{name}/HELP
|
|
|
|
%{_docdir}/%{name}/NEWS
|
|
|
|
%{_docdir}/%{name}/README
|
|
|
|
%{_docdir}/%{name}/README.DAEMON
|
|
|
|
%{_docdir}/%{name}/README.SUSE
|
2014-04-22 15:24:18 +00:00
|
|
|
%{_docdir}/%{name}/README.polkit
|
2012-01-19 20:09:24 +00:00
|
|
|
%{_docdir}/%{name}/SECURITY
|
|
|
|
%{_docdir}/%{name}/TODO
|
2007-02-15 17:27:23 +00:00
|
|
|
%doc %{_mandir}/man?/*.*
|
|
|
|
%{_sbindir}/*
|
|
|
|
%dir %{_sysconfdir}/reader.conf.d
|
2011-01-11 13:33:42 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/reader.conf.d/reader.conf
|
2007-02-15 17:27:23 +00:00
|
|
|
%{ifddir}
|
2011-11-20 12:27:01 +00:00
|
|
|
%if %suse_version > 1140
|
|
|
|
%_unitdir/*
|
|
|
|
%endif
|
2014-04-22 15:24:18 +00:00
|
|
|
%if %suse_version < 1310
|
2011-05-17 20:56:45 +00:00
|
|
|
%{_initrddir}/pcscd
|
2014-04-22 15:24:18 +00:00
|
|
|
%endif
|
2009-02-03 23:22:36 +00:00
|
|
|
/var/adm/fillup-templates/sysconfig.pcscd
|
2011-12-09 17:42:13 +00:00
|
|
|
# libpcsclite.so should stay in the main package (#732911). Third party packages may need it for dlopen().
|
|
|
|
%{_libdir}/libpcsclite.so
|
2014-04-22 15:24:18 +00:00
|
|
|
#%{_datadir}/polkit-1/actions/org.debian.pcsc-lite.policy
|
2009-02-03 23:22:36 +00:00
|
|
|
|
|
|
|
%files -n libpcsclite1
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libpcsclite.so.*
|
2007-01-15 23:29:27 +00:00
|
|
|
|
2011-11-20 12:27:01 +00:00
|
|
|
%files -n libpcscspy0
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libpcscspy.so.*
|
|
|
|
|
2007-01-15 23:29:27 +00:00
|
|
|
%files devel
|
2007-02-15 17:27:23 +00:00
|
|
|
%defattr(-,root,root)
|
2012-01-19 20:09:24 +00:00
|
|
|
%docdir %{_docdir}/%{name}
|
|
|
|
%dir %{_docdir}/%{name}
|
|
|
|
%{_docdir}/%{name}/Change*
|
2007-01-15 23:29:27 +00:00
|
|
|
%{_includedir}/*
|
2007-02-15 17:27:23 +00:00
|
|
|
%{_libdir}/*.*a
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
2011-12-09 17:42:13 +00:00
|
|
|
%{_libdir}/*.so
|
2012-02-07 07:59:31 +00:00
|
|
|
%{_bindir}/*
|
2011-12-09 17:42:13 +00:00
|
|
|
# libpcsclite.so should stay in the main package (#732911). Third party packages may need it for dlopen().
|
|
|
|
%exclude %{_libdir}/libpcsclite.so
|
2008-04-06 05:32:17 +00:00
|
|
|
|
2007-03-06 18:02:17 +00:00
|
|
|
%changelog
|