ccid-vl.spec 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. %bcond_with systemd
  2. %define dropdir %(pkg-config libpcsclite --variable usbdropdir 2>/dev/null)
  3. %define libusb1_ver 1.0.27
  4. %define pcsc_lite_ver 2.2.3
  5. Name: ccid
  6. Version: 1.6.0
  7. Release: 1%{?_dist_release}%{?with_systemd:.systemd}
  8. Summary: Generic USB CCID smart card reader driver
  9. Summary(ja): Generic USB CCID smart card reader driver
  10. Group: system
  11. Vendor: Project Vine
  12. Distribution: Vine Linux
  13. License: LGPLv2+
  14. URL: https://ccid.apdu.fr/
  15. Source0: https://ccid.apdu.fr/files/%{name}-%{version}.tar.xz
  16. Patch0: ccid-1.4.26-omnikey-3121.patch
  17. BuildRequires: meson
  18. BuildRequires: cmake
  19. BuildRequires: flex
  20. BuildRequires: libusb1-devel >= %{libusb1_ver}
  21. BuildRequires: pcsc-lite-devel >= %{pcsc_lite_ver}
  22. BuildRequires: pkgconfig(zlib)
  23. %if !%{with systemd}
  24. Requires(post): initscripts
  25. Requires(postun): initscripts
  26. %endif
  27. Requires: libusb1
  28. Requires: pcsc-lite
  29. Provides: pcsc-ifd-handler
  30. Conflicts: ccid145
  31. # 390 does not have libusb or smartCards
  32. ExcludeArch: s390 s390x
  33. %description
  34. Generic USB CCID (Chip/Smart Card Interface Devices) driver.
  35. %prep
  36. %setup -q
  37. %patch0 -p1 -b .omnikey
  38. %build
  39. %meson -Dserial=true
  40. %meson_build
  41. %install
  42. rm -rf $RPM_BUILD_ROOT
  43. %meson_install
  44. %{__mkdir_p} $RPM_BUILD_ROOT/%{_sysconfdir}/udev/rules.d
  45. %{__install} -m 644 src/92_pcscd_ccid.rules $RPM_BUILD_ROOT/%{_sysconfdir}/udev/rules.d/92-pcscd_ccid.rules
  46. cp -p src/openct/LICENSE LICENSE.openct
  47. %post
  48. %if %{with systemd}
  49. /bin/systemctl try-restart pcscd.service >/dev/null 2>&1 || :
  50. %else
  51. [ -x %{_initrddir}/pcscd ] && %{_initrddir}/pcscd status >> /dev/null 2>&1 && %{_sbindir}/pcscd -H > /dev/null 2>&1
  52. exit 0
  53. %endif
  54. %postun
  55. %if %{with systemd}
  56. /bin/systemctl try-restart pcscd.service >/dev/null 2>&1 || :
  57. %else
  58. [ -x %{_initrddir}/pcscd ] && %{_initrddir}/pcscd status >> /dev/null 2>&1 && %{_sbindir}/pcscd -H > /dev/null 2>&1
  59. exit 0
  60. %endif
  61. %files
  62. %defattr(-,root,root,-)
  63. %license COPYING LICENSE.openct
  64. %doc AUTHORS README.md
  65. %{dropdir}/ifd-ccid.bundle/
  66. %{dropdir}/serial/
  67. %config(noreplace) %{_sysconfdir}/reader.conf.d/libccidtwin
  68. %config %{_sysconfdir}/udev/rules.d/92-pcscd_ccid.rules
  69. %changelog
  70. * Thu Jun 27 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.6.0-1
  71. - new upstream release.
  72. * Sat Oct 26 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.31-1
  73. - new upstream release.
  74. * Mon May 04 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.18-1
  75. - new upstream release
  76. * Tue Jun 26 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.7-2
  77. - add Conflicts: ccid145
  78. * Sun Jun 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.7-1
  79. - new upstream release
  80. - change BuildRequires: libusb1-devel instead of libusb-devel
  81. * Mon Mar 02 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.8-1
  82. - initial build for Vine Linux
  83. * Tue Aug 26 2008 Bob Relyea <rrelyea@redhat.com> - 1.3.8-1
  84. - update to ccid 1.3.8
  85. * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.2.1-4
  86. - Autorebuild for GCC 4.3
  87. * Mon Aug 20 2007 Bob Relyea <rrelyea@redhat.com> - 1.2.1-3
  88. - Update License description to the new Fedora standard
  89. * Mon Apr 30 2007 Bob Relyea <rrelyea@redhat.com> - 1.2.1-2
  90. - Fix the missed use of the version macro
  91. * Tue Feb 06 2007 Bob Relyea <rrelyea@redhat.com> - 1.2.1-1
  92. - Pick up ccid 1.2.1
  93. - use pcscd 'hotplug' feature instead of restarting the daemon
  94. - add enable_udev
  95. * Mon Nov 06 2006 Bob Relyea <rrelyea@redhat.com> - 1.1.0-2
  96. - Fix version macro to remove '-'
  97. * Thu Nov 02 2006 Bob Relyea <rrelyea@redhat.com> - 1.1.0-1
  98. - Pickup ccid 1.1.0
  99. * Thu Jul 20 2006 Florian La Roche <laroche@redhat.com> - 1.0.1-5
  100. - require initscripts for post/postun
  101. * Sun Jul 16 2006 Florian La Roche <laroche@redhat.com> - 1.0.1-4
  102. - fix excludearch line
  103. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0.1-3.1
  104. - rebuild
  105. * Mon Jul 10 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-3
  106. - remove s390 from the build
  107. * Mon Jun 5 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-2
  108. - Move to Fedora Core, removed %%{_dist}.
  109. * Sat Apr 22 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.0.1-1
  110. - 1.0.1.
  111. * Mon Mar 6 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.0.0-1
  112. - 1.0.0, license changed to LGPL.
  113. * Wed Feb 15 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.4.1-7
  114. - Rebuild.
  115. * Thu Nov 3 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.4.1-6
  116. - Clean up build dependencies.
  117. - Convert docs to UTF-8.
  118. * Thu Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.4.1-5
  119. - rebuilt
  120. * Fri Feb 25 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.4.1-4
  121. - Drop Epoch: 0.
  122. - Improve summary.
  123. - Build with dependency tracking disabled.
  124. * Thu Jul 1 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:0.4.1-0.fdr.3
  125. - Restart pcscd in post(un)install phase if it's available and running.
  126. * Thu May 13 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:0.4.1-0.fdr.2
  127. - Provide pcsc-ifd-handler (idea from Debian).
  128. * Sat Feb 14 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:0.4.1-0.fdr.1
  129. - Update to 0.4.1.
  130. * Fri Feb 13 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:0.4.0-0.fdr.1
  131. - Update to 0.4.0.
  132. * Wed Nov 5 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:0.3.2-0.fdr.1
  133. - Update to 0.3.2.
  134. - Update URL.
  135. * Thu Oct 16 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:0.3.1-0.fdr.1
  136. - Update to 0.3.1.
  137. * Wed Sep 10 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:0.3.0-0.fdr.1
  138. - Update to 0.3.0.
  139. * Wed Aug 27 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:0.2.0-0.fdr.1
  140. - Update to 0.2.0.
  141. * Tue Aug 19 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:0.1.0-0.fdr.1
  142. - First build.