pcsc-lite-vl.spec 12 KB

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