%bcond_with systemd Summary: PC/SC Lite smart card framework and applications Summary(ja): PC/SC Lite スマートカードフレームワークおよびアプリケーション Name: pcsc-lite Version: 2.2.3 Release: 1%{?_dist_release}%{?with_systemd:.systemd} Group: system Vendor: Project Vine Distribution: Vine Linux License: BSD URL: https://pcsclite.apdu.fr/ Source0: https://pcsclite.apdu.fr/files/%{name}-%{version}.tar.xz Source1: org.debian.pcsc-lite.policy Source2: pcscd.init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: meson BuildRequires: polkit-devel BuildRequires: doxygen BuildRequires: flex BuildRequires: python3 BuildRequires: python3-rpm-macros Requires: pcsc-ifd-handler %if %{with systemd} BuildRequires: systemd-devel %{?systemd_requires} %else BuildRequires: eudev-libudev-devel Requires(post): initscripts Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(preun): initscripts Requires(postun): initscripts %endif # 390 does not have libusb or smartCards ExcludeArch: s390 s390x %description The purpose of PC/SC Lite is to provide a Windows(R) SCard interface in a very small form factor for communicating to smartcards and readers. PC/SC Lite uses the same winscard API as used under Windows(R). This package includes the PC/SC Lite daemon, a resource manager that coordinates communications with smart card readers and smart cards that are connected to the system, as well as other command line tools. %package libs Summary: PC/SC Lite libraries Summary(ja): PC/SC Lite libraries Group: system Provides: libpcsc-lite = %{version}-%{release} %description libs PC/SC Lite libraries. %package devel Summary: PC/SC Lite development files Summary(ja): PC/SC Lite development files Group: programming Requires: %{name}-libs = %{version}-%{release} Requires: pkgconfig Provides: libpcsc-lite-devel = %{version}-%{release} Obsoletes: %{name}-spy < 2.2.3 Provides: %{name}-spy = %{version}-%{release} %description devel PC/SC Lite development files. %package doc Summary: PC/SC Lite developer documentation Summary(ja): PC/SC Lite developer documentation Group: documentation %description doc %{summary}. %debug_package %prep %setup -q # Convert to utf-8 for file in ChangeLog; do iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \ touch -r $file $file.new && \ mv $file.new $file done %build %meson \ %if %{with systemd} -Dlibsystemd=true \ -Dsystemdunit=system \ %else -Dlibsystemd=false \ -Dsystemdunit=system \ %endif -Dserial=true \ -Dusbdropdir=%{_libdir}/pcsc/drivers \ -Dpolkit=true %meson_build %meson_build doc %install rm -rf $RPM_BUILD_ROOT %meson_install # Create empty directories mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d mkdir -p $RPM_BUILD_ROOT%{_libdir}/pcsc/drivers mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/pcscd %if !%{with systemd} install -Dpm 755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/pcscd %endif %post %if %{with systemd} %systemd_post pcscd.socket pcscd.service # If install, test if pcscd socket is enabled. # If enabled, then attempt to start it. This will silently fail # in chroots or other environments where services aren't expected # to be started. if [ $1 -eq 1 ] ; then if systemctl -q is-enabled pcscd.socket > /dev/null 2>&1 ; then systemctl start pcscd.socket > /dev/null 2>&1 || : fi fi %else /sbin/chkconfig --add pcscd %endif %preun %if %{with systemd} %systemd_preun pcscd.socket pcscd.service %else if [ $1 = 0 -o -x /bin/systemctl ] ; then /sbin/service pcscd stop >/dev/null 2>&1 || : /sbin/chkconfig --del pcscd fi %endif %postun %if %{with systemd} %systemd_postun_with_restart pcscd.socket pcscd.service %else if [ "$1" -ge "1" ]; then /sbin/service pcscd condrestart >/dev/null 2>&1 || : fi %endif %files %license COPYING %doc AUTHORS ChangeLog HELP README SECURITY %doc doc/README.polkit %doc src/spy/setup_spy.sh %dir %{_sysconfdir}/reader.conf.d/ %if %{with systemd} %{_unitdir}/pcscd.service %{_unitdir}/pcscd.socket %ghost %dir %{_localstatedir}/run/pcscd/ %else %{_initrddir}/pcscd %dir %{_localstatedir}/run/pcscd/ %endif %{_sbindir}/pcscd %dir %{_libdir}/pcsc/ %dir %{_libdir}/pcsc/drivers/ %dir %{_datadir}/polkit-1 %dir %{_datadir}/polkit-1/actions %{_datadir}/polkit-1/actions/org.debian.%{name}.policy %{_mandir}/man5/reader.conf.5* %{_mandir}/man8/pcscd.8* %files libs %license COPYING %{_libdir}/libpcsclite.so.* %{_libdir}/libpcsclite_real.so.* %files devel %{_bindir}/pcsc-spy %{_includedir}/PCSC/ %{_libdir}/libpcsclite.so %{_libdir}/libpcsclite_real.so %{_libdir}/libpcscspy.so* %{_libdir}/pkgconfig/libpcsclite.pc %{_mandir}/man1/pcsc-spy.1* %files doc %defattr(-,root,root,-) %doc %{_vpath_builddir}/doc/api/ doc/example/pcsc_demo.c %changelog * Thu Jun 27 2024 Tomohiro "Tomo-p" KATO 2.2.3-1 - new upstream release. * Tue Feb 02 2021 Tomohiro "Tomo-p" KATO 1.9.0-1 - new upstream release. - added systemd support (disabled as default). * Sat Oct 26 2019 Tomohiro "Tomo-p" KATO 1.8.25-1 - new upstream release. * Mon May 04 2015 Yoji TOYODA 1.8.13-1 - new upstream release - updata Patch0 (pcsc-lite-1.8.13-docinst.patch) - updata Patch1 (pcsc-lite-1.8.13-etc.patch) - add Source1 from fedora - add BuildRequires: polkit-devel * Tue Jun 17 2014 Yoji TOYODA 1.8.3-2 - change BuildRequires: eudev-libudev-devel instead of libudev-devel * Sun Jun 24 2012 Yoji TOYODA 1.8.3-1 - new upstream release - add Patch1 (pcsc-lite-1.8.3-etc.patch) - create -spy sub package * Sat Jan 07 2012 Yoji TOYODA 1.8.1-2 - fix Patch1 * Sat Jan 07 2012 Yoji TOYODA 1.8.1-1 - new upstream release - remove BuildRequires: hal-devel, libusb-devel - add BuildRequires: libudev-devel, flex - add Patch1 (pcsc-lite-1.8.1-etc.patch) * Fri Oct 01 2010 Shu KONNO 1.5.5-2 - rebuilt with rpm-4.8.1 for pkg-config * Sun Feb 21 2010 Daisuke SUZUKI 1.5.5-1 - new upstream release * Mon Mar 02 2009 Daisuke SUZUKI 1.4.102-1 - initial build for Vine Linux * Mon Aug 18 2008 Bob Relyea - 1.4.102-3 - bump tag becaue the build system can't deal with mistakes. * Mon Aug 18 2008 Bob Relyea - 1.4.102-2 - mock build changes * Sun Aug 17 2008 Bob Relyea - 1.4.102-1 - Pick up 1.4.102 * Tue May 6 2008 Bob Relyea - 1.4.101-1 - Pick up 1.4.101 * Tue Feb 19 2008 Fedora Release Engineering - 1.4.4-3 - Autorebuild for GCC 4.3 * Wed Jan 16 2008 Bob Relyea - 1.4.4-2 - Silence libpcsc-lite even when the daemon isn't running. - fix typo in init file which prevents the config file from being read. * Thu Nov 22 2007 Bob Relyea - 1.4.4-1 - Pick up 1.4.4 * Tue Feb 06 2007 Bob Relyea - 1.3.3-1 - Pick up 1.3.3 * Thu Nov 02 2006 Bob Relyea - 1.3.2-1 - Pick up 1.3.2 * Thu Sep 14 2006 Bob Relyea - 1.3.1-7 - Incorporate patch from Ludovic to stop the pcsc daemon from unnecessarily waking up. * Mon Jul 31 2006 Ray Strode - 1.3.1-6 - follow packaging guidelines for setting up init service (bug 200778) * Mon Jul 24 2006 Bob Relyea - 1.3.1-5 - start pcscd when pcsc-lite is installed * Sun Jul 16 2006 Florian La Roche - 1.3.1-4 - fix excludearch line * Wed Jul 12 2006 Jesse Keating - 1.3.1-3.1 - rebuild * Mon Jul 10 2006 Bob Relyea - 1.3.1-3 - remove s390 from the build * Mon Jun 5 2006 Bob Relyea - 1.3.1-2 - Move to Fedora Core. - Remove dependency on graphviz. - Removed %%{_dist} * Sat Apr 22 2006 Ville Skyttä - 1.3.1-1 - 1.3.1. * Sun Mar 5 2006 Ville Skyttä - 1.3.0-1 - 1.3.0, init script and reader.conf updater included upstream. - Split developer docs into a -doc subpackage, include API docs. - libmusclecard no longer included, split into separate package upstream. * Mon Feb 13 2006 Ville Skyttä - 1.2.0-14 - Avoid standard rpaths on multilib archs. - Fine tune dependencies. * Fri Nov 11 2005 Ville Skyttä - 1.2.0-13 - Don't ship static libraries. - Don't mark the init script as a config file. - Use rm instead of %%exclude. - Specfile cleanups. * Thu May 19 2005 Ville Skyttä - 1.2.0-12 - Rebuild. * Thu Apr 7 2005 Michael Schwendt - 1.2.0-11 - rebuilt * Tue Aug 17 2004 Ville Skyttä - 0:1.2.0-10 - Disable dependency tracking to speed up the build. - Drop reader.conf patch, it's not needed any more. - Rename update-reader-conf to update-reader.conf for consistency with Debian, and improve it a bit. * Sat Jul 31 2004 Ville Skyttä - 0:1.2.0-0.fdr.9 - Add update-reader-conf, thanks to Fritz Elfert. * Thu Jul 1 2004 Ville Skyttä - 0:1.2.0-0.fdr.8 - Own the %%{_libdir}/pcsc hierarchy. * Thu May 13 2004 Ville Skyttä - 0:1.2.0-0.fdr.7 - Make main package require pcsc-ifd-handler (idea from Debian). * Wed May 12 2004 Ville Skyttä - 0:1.2.0-0.fdr.6 - Improve package summary. - Improvements based on suggestions from Ludovic Rousseau: - Don't install pcsc_demo but do include its source in -devel. - Sync reader.conf with current upstream CVS HEAD (better docs, less intrusive in USB-only setups where it's not needed). * Fri Apr 16 2004 Ville Skyttä - 0:1.2.0-0.fdr.5 - Move PDF API docs to -devel. - Improve main package and init script descriptions. * Thu Jan 29 2004 Ville Skyttä - 0:1.2.0-0.fdr.4 - Init script fine tuning. * Fri Jan 9 2004 Ville Skyttä - 0:1.2.0-0.fdr.3 - BuildRequires libusb-devel 0.1.6 or newer. * Thu Oct 30 2003 Ville Skyttä - 0:1.2.0-0.fdr.2 - s/pkgconfi/pkgconfig/ in -devel requirements. * Tue Oct 28 2003 Ville Skyttä - 0:1.2.0-0.fdr.1 - Update to 1.2.0. - Add libpcsc-lite and libmusclecard provides to -libs and -devel. * Thu Oct 16 2003 Ville Skyttä - 0:1.2.0-0.fdr.0.2.rc3 - Update to 1.2.0-rc3. - Trivial init script improvements. - Enable %%{_smp_mflags}. - Don't bother trying to enable SCF. * Sun Sep 14 2003 Ville Skyttä - 0:1.2.0-0.fdr.0.2.rc2 - Specfile cleanups. * Fri Sep 5 2003 Ville Skyttä - 0:1.2.0-0.fdr.0.1.rc2 - Update to 1.2.0-rc2. * Wed Aug 27 2003 Ville Skyttä - 0:1.2.0-0.fdr.0.1.rc1 - Update to 1.2.0-rc1. * Sun Jun 1 2003 Ville Skyttä - 0:1.1.2-0.fdr.0.1.beta5 - Update to 1.1.2beta5. * Sat May 24 2003 Ville Skyttä - 0:1.1.2-0.fdr.0.1.beta4 - First build, based on PLD's 1.1.1-2.