pcsc-lite-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. %bcond_with systemd
  2. Summary: PC/SC Lite smart card framework and applications
  3. Summary(ja): PC/SC Lite スマートカードフレームワークおよびアプリケーション
  4. Name: pcsc-lite
  5. Version: 2.2.3
  6. Release: 1%{?_dist_release}%{?with_systemd:.systemd}
  7. Group: system
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. License: BSD
  11. URL: https://pcsclite.apdu.fr/
  12. Source0: https://pcsclite.apdu.fr/files/%{name}-%{version}.tar.xz
  13. Source1: org.debian.pcsc-lite.policy
  14. Source2: pcscd.init
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  16. BuildRequires: meson
  17. BuildRequires: polkit-devel
  18. BuildRequires: doxygen
  19. BuildRequires: flex
  20. BuildRequires: python3
  21. BuildRequires: python3-rpm-macros
  22. Requires: pcsc-ifd-handler
  23. %if %{with systemd}
  24. BuildRequires: systemd-devel
  25. %{?systemd_requires}
  26. %else
  27. BuildRequires: eudev-libudev-devel
  28. Requires(post): initscripts
  29. Requires(post): /sbin/chkconfig
  30. Requires(preun): /sbin/chkconfig
  31. Requires(preun): initscripts
  32. Requires(postun): initscripts
  33. %endif
  34. # 390 does not have libusb or smartCards
  35. ExcludeArch: s390 s390x
  36. %description
  37. The purpose of PC/SC Lite is to provide a Windows(R) SCard interface
  38. in a very small form factor for communicating to smartcards and
  39. readers. PC/SC Lite uses the same winscard API as used under
  40. Windows(R). This package includes the PC/SC Lite daemon, a resource
  41. manager that coordinates communications with smart card readers and
  42. smart cards that are connected to the system, as well as other command
  43. line tools.
  44. %package libs
  45. Summary: PC/SC Lite libraries
  46. Summary(ja): PC/SC Lite libraries
  47. Group: system
  48. Provides: libpcsc-lite = %{version}-%{release}
  49. %description libs
  50. PC/SC Lite libraries.
  51. %package devel
  52. Summary: PC/SC Lite development files
  53. Summary(ja): PC/SC Lite development files
  54. Group: programming
  55. Requires: %{name}-libs = %{version}-%{release}
  56. Requires: pkgconfig
  57. Provides: libpcsc-lite-devel = %{version}-%{release}
  58. Obsoletes: %{name}-spy < 2.2.3
  59. Provides: %{name}-spy = %{version}-%{release}
  60. %description devel
  61. PC/SC Lite development files.
  62. %package doc
  63. Summary: PC/SC Lite developer documentation
  64. Summary(ja): PC/SC Lite developer documentation
  65. Group: documentation
  66. %description doc
  67. %{summary}.
  68. %debug_package
  69. %prep
  70. %setup -q
  71. # Convert to utf-8
  72. for file in ChangeLog; do
  73. iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
  74. touch -r $file $file.new && \
  75. mv $file.new $file
  76. done
  77. %build
  78. %meson \
  79. %if %{with systemd}
  80. -Dlibsystemd=true \
  81. -Dsystemdunit=system \
  82. %else
  83. -Dlibsystemd=false \
  84. -Dsystemdunit=system \
  85. %endif
  86. -Dserial=true \
  87. -Dusbdropdir=%{_libdir}/pcsc/drivers \
  88. -Dpolkit=true
  89. %meson_build
  90. %meson_build doc
  91. %install
  92. rm -rf $RPM_BUILD_ROOT
  93. %meson_install
  94. # Create empty directories
  95. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d
  96. mkdir -p $RPM_BUILD_ROOT%{_libdir}/pcsc/drivers
  97. mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/pcscd
  98. %if !%{with systemd}
  99. install -Dpm 755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/pcscd
  100. %endif
  101. %post
  102. %if %{with systemd}
  103. %systemd_post pcscd.socket pcscd.service
  104. # If install, test if pcscd socket is enabled.
  105. # If enabled, then attempt to start it. This will silently fail
  106. # in chroots or other environments where services aren't expected
  107. # to be started.
  108. if [ $1 -eq 1 ] ; then
  109. if systemctl -q is-enabled pcscd.socket > /dev/null 2>&1 ; then
  110. systemctl start pcscd.socket > /dev/null 2>&1 || :
  111. fi
  112. fi
  113. %else
  114. /sbin/chkconfig --add pcscd
  115. %endif
  116. %preun
  117. %if %{with systemd}
  118. %systemd_preun pcscd.socket pcscd.service
  119. %else
  120. if [ $1 = 0 -o -x /bin/systemctl ] ; then
  121. /sbin/service pcscd stop >/dev/null 2>&1 || :
  122. /sbin/chkconfig --del pcscd
  123. fi
  124. %endif
  125. %postun
  126. %if %{with systemd}
  127. %systemd_postun_with_restart pcscd.socket pcscd.service
  128. %else
  129. if [ "$1" -ge "1" ]; then
  130. /sbin/service pcscd condrestart >/dev/null 2>&1 || :
  131. fi
  132. %endif
  133. %files
  134. %license COPYING
  135. %doc AUTHORS ChangeLog HELP README SECURITY
  136. %doc doc/README.polkit
  137. %doc src/spy/setup_spy.sh
  138. %dir %{_sysconfdir}/reader.conf.d/
  139. %if %{with systemd}
  140. %{_unitdir}/pcscd.service
  141. %{_unitdir}/pcscd.socket
  142. %ghost %dir %{_localstatedir}/run/pcscd/
  143. %else
  144. %{_initrddir}/pcscd
  145. %dir %{_localstatedir}/run/pcscd/
  146. %endif
  147. %{_sbindir}/pcscd
  148. %dir %{_libdir}/pcsc/
  149. %dir %{_libdir}/pcsc/drivers/
  150. %dir %{_datadir}/polkit-1
  151. %dir %{_datadir}/polkit-1/actions
  152. %{_datadir}/polkit-1/actions/org.debian.%{name}.policy
  153. %{_mandir}/man5/reader.conf.5*
  154. %{_mandir}/man8/pcscd.8*
  155. %files libs
  156. %license COPYING
  157. %{_libdir}/libpcsclite.so.*
  158. %{_libdir}/libpcsclite_real.so.*
  159. %files devel
  160. %{_bindir}/pcsc-spy
  161. %{_includedir}/PCSC/
  162. %{_libdir}/libpcsclite.so
  163. %{_libdir}/libpcsclite_real.so
  164. %{_libdir}/libpcscspy.so*
  165. %{_libdir}/pkgconfig/libpcsclite.pc
  166. %{_mandir}/man1/pcsc-spy.1*
  167. %files doc
  168. %defattr(-,root,root,-)
  169. %doc %{_vpath_builddir}/doc/api/ doc/example/pcsc_demo.c
  170. %changelog
  171. * Thu Jun 27 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.3-1
  172. - new upstream release.
  173. * Tue Feb 02 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.0-1
  174. - new upstream release.
  175. - added systemd support (disabled as default).
  176. * Sat Oct 26 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.25-1
  177. - new upstream release.
  178. * Mon May 04 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.13-1
  179. - new upstream release
  180. - updata Patch0 (pcsc-lite-1.8.13-docinst.patch)
  181. - updata Patch1 (pcsc-lite-1.8.13-etc.patch)
  182. - add Source1 from fedora
  183. - add BuildRequires: polkit-devel
  184. * Tue Jun 17 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.3-2
  185. - change BuildRequires: eudev-libudev-devel instead of libudev-devel
  186. * Sun Jun 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.3-1
  187. - new upstream release
  188. - add Patch1 (pcsc-lite-1.8.3-etc.patch)
  189. - create -spy sub package
  190. * Sat Jan 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.1-2
  191. - fix Patch1
  192. * Sat Jan 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.1-1
  193. - new upstream release
  194. - remove BuildRequires: hal-devel, libusb-devel
  195. - add BuildRequires: libudev-devel, flex
  196. - add Patch1 (pcsc-lite-1.8.1-etc.patch)
  197. * Fri Oct 01 2010 Shu KONNO <owa@bg.wakwak.com> 1.5.5-2
  198. - rebuilt with rpm-4.8.1 for pkg-config
  199. * Sun Feb 21 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 1.5.5-1
  200. - new upstream release
  201. * Mon Mar 02 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.102-1
  202. - initial build for Vine Linux
  203. * Mon Aug 18 2008 Bob Relyea <rrelyea@redhat.com> - 1.4.102-3
  204. - bump tag becaue the build system can't deal with mistakes.
  205. * Mon Aug 18 2008 Bob Relyea <rrelyea@redhat.com> - 1.4.102-2
  206. - mock build changes
  207. * Sun Aug 17 2008 Bob Relyea <rrelyea@redhat.com> - 1.4.102-1
  208. - Pick up 1.4.102
  209. * Tue May 6 2008 Bob Relyea <rrelyea@redhat.com> - 1.4.101-1
  210. - Pick up 1.4.101
  211. * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.4.4-3
  212. - Autorebuild for GCC 4.3
  213. * Wed Jan 16 2008 Bob Relyea <rrelyea@redhat.com> - 1.4.4-2
  214. - Silence libpcsc-lite even when the daemon isn't running.
  215. - fix typo in init file which prevents the config file from being read.
  216. * Thu Nov 22 2007 Bob Relyea <rrelyea@redhat.com> - 1.4.4-1
  217. - Pick up 1.4.4
  218. * Tue Feb 06 2007 Bob Relyea <rrelyea@redhat.com> - 1.3.3-1
  219. - Pick up 1.3.3
  220. * Thu Nov 02 2006 Bob Relyea <rrelyea@redhat.com> - 1.3.2-1
  221. - Pick up 1.3.2
  222. * Thu Sep 14 2006 Bob Relyea <rrelyea@redhat.com> - 1.3.1-7
  223. - Incorporate patch from Ludovic to stop the pcsc daemon from
  224. unnecessarily waking up.
  225. * Mon Jul 31 2006 Ray Strode <rstrode@redhat.com> - 1.3.1-6
  226. - follow packaging guidelines for setting up init service
  227. (bug 200778)
  228. * Mon Jul 24 2006 Bob Relyea <rrelyea@redhat.com> - 1.3.1-5
  229. - start pcscd when pcsc-lite is installed
  230. * Sun Jul 16 2006 Florian La Roche <laroche@redhat.com> - 1.3.1-4
  231. - fix excludearch line
  232. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.3.1-3.1
  233. - rebuild
  234. * Mon Jul 10 2006 Bob Relyea <rrelyea@redhat.com> - 1.3.1-3
  235. - remove s390 from the build
  236. * Mon Jun 5 2006 Bob Relyea <rrelyea@redhat.com> - 1.3.1-2
  237. - Move to Fedora Core.
  238. - Remove dependency on graphviz.
  239. - Removed %%{_dist}
  240. * Sat Apr 22 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.3.1-1
  241. - 1.3.1.
  242. * Sun Mar 5 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.3.0-1
  243. - 1.3.0, init script and reader.conf updater included upstream.
  244. - Split developer docs into a -doc subpackage, include API docs.
  245. - libmusclecard no longer included, split into separate package upstream.
  246. * Mon Feb 13 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.2.0-14
  247. - Avoid standard rpaths on multilib archs.
  248. - Fine tune dependencies.
  249. * Fri Nov 11 2005 Ville Skyttä <ville.skytta at iki.fi> - 1.2.0-13
  250. - Don't ship static libraries.
  251. - Don't mark the init script as a config file.
  252. - Use rm instead of %%exclude.
  253. - Specfile cleanups.
  254. * Thu May 19 2005 Ville Skyttä <ville.skytta at iki.fi> - 1.2.0-12
  255. - Rebuild.
  256. * Thu Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.2.0-11
  257. - rebuilt
  258. * Tue Aug 17 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-10
  259. - Disable dependency tracking to speed up the build.
  260. - Drop reader.conf patch, it's not needed any more.
  261. - Rename update-reader-conf to update-reader.conf for consistency with Debian,
  262. and improve it a bit.
  263. * Sat Jul 31 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.9
  264. - Add update-reader-conf, thanks to Fritz Elfert.
  265. * Thu Jul 1 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.8
  266. - Own the %%{_libdir}/pcsc hierarchy.
  267. * Thu May 13 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.7
  268. - Make main package require pcsc-ifd-handler (idea from Debian).
  269. * Wed May 12 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.6
  270. - Improve package summary.
  271. - Improvements based on suggestions from Ludovic Rousseau:
  272. - Don't install pcsc_demo but do include its source in -devel.
  273. - Sync reader.conf with current upstream CVS HEAD (better docs, less
  274. intrusive in USB-only setups where it's not needed).
  275. * Fri Apr 16 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.5
  276. - Move PDF API docs to -devel.
  277. - Improve main package and init script descriptions.
  278. * Thu Jan 29 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.4
  279. - Init script fine tuning.
  280. * Fri Jan 9 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.3
  281. - BuildRequires libusb-devel 0.1.6 or newer.
  282. * Thu Oct 30 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.2
  283. - s/pkgconfi/pkgconfig/ in -devel requirements.
  284. * Tue Oct 28 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.1
  285. - Update to 1.2.0.
  286. - Add libpcsc-lite and libmusclecard provides to -libs and -devel.
  287. * Thu Oct 16 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.0.2.rc3
  288. - Update to 1.2.0-rc3.
  289. - Trivial init script improvements.
  290. - Enable %%{_smp_mflags}.
  291. - Don't bother trying to enable SCF.
  292. * Sun Sep 14 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.0.2.rc2
  293. - Specfile cleanups.
  294. * Fri Sep 5 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.0.1.rc2
  295. - Update to 1.2.0-rc2.
  296. * Wed Aug 27 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.2.0-0.fdr.0.1.rc1
  297. - Update to 1.2.0-rc1.
  298. * Sun Jun 1 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.1.2-0.fdr.0.1.beta5
  299. - Update to 1.1.2beta5.
  300. * Sat May 24 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.1.2-0.fdr.0.1.beta4
  301. - First build, based on PLD's 1.1.1-2.