3 %bcond_with openct # use OpenCT instead of PC/SC for reader access
4 %bcond_without openpace # OpenPACE support
6 Summary: OpenSC library - for accessing SmartCard devices using PC/SC Lite
7 Summary(pl.UTF-8): Biblioteka OpenSC - do korzystania z kart procesorowych przy użyciu PC/SC Lite
13 #Source0Download: https://github.com/OpenSC/OpenSC/releases
14 Source0: https://github.com/OpenSC/OpenSC/releases/download/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 35c599e673ae9205550974e2dcbe0825
16 URL: https://github.com/OpenSC/OpenSC/wiki
17 BuildRequires: autoconf >= 2.68
18 BuildRequires: automake >= 1:1.10
19 BuildRequires: cmocka-devel
20 BuildRequires: docbook-style-xsl
21 BuildRequires: libltdl-devel
22 BuildRequires: libtool >= 1:1.4.2-9
23 BuildRequires: libxslt-progs
24 %{?with_openct:BuildRequires: openct-devel}
25 %{?with_openpace:BuildRequires: openpace-devel >= 0.9}
26 BuildRequires: openssl-devel >= 1.1.1
27 %{!?with_openct:BuildRequires: pcsc-lite-devel >= 1.8.22}
28 BuildRequires: pkgconfig >= 1:0.9.0
29 BuildRequires: readline-devel
30 BuildRequires: rpm-build >= 4.6
31 BuildRequires: rpmbuild(macros) >= 1.673
32 BuildRequires: zlib-devel
33 Requires: filesystem >= 4.0-28
34 %{?with_openpace:Requires: openpace >= 0.9}
35 %{!?with_openct:Requires: pcsc-lite-libs >= 1.8.22}
36 Obsoletes: browser-plugin-opensc
37 Obsoletes: mozilla-plugin-opensc
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 libopensc is a library for accessing SmartCard devices using PC/SC
42 Lite middleware package. It is also the core library of the OpenSC
43 project. Basic functionality (e.g. SELECT FILE, READ BINARY) should
44 work on any ISO 7816-4 compatible SmartCard. Encryption and decryption
45 using private keys on the SmartCard is at the moment possible only
46 with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic
47 IDentity) card manufactured by Setec.
49 %description -l pl.UTF-8
50 libopensc to biblioteka do korzystania z kart procesorowych przy
51 użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa
52 biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT
53 FILE, READ BINARY) powinna działać także z dowolną kartą procesorową
54 zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu
55 prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu
56 kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic
57 IDentity) produkowanych przez Setec.
60 Summary: OpenSC development files
61 Summary(pl.UTF-8): Pliki dla programistów używających OpenSC
62 Group: Development/Tools
63 Requires: %{name} = %{version}-%{release}
64 Requires: libltdl-devel
65 %{?with_openct:Requires: openct-devel}
66 Requires: openssl-devel >= 1.1.1
67 %{!?with_openct:Requires: pcsc-lite-devel >= 1.8.22}
71 OpenSC development files.
73 %description devel -l pl.UTF-8
74 Pliki dla programistów używających OpenSC.
77 Summary: Static OpenSC library
78 Summary(pl.UTF-8): Bibloteka statyczna OpenSC
79 Group: Development/Tools
80 Requires: %{name}-devel = %{version}-%{release}
83 Static OpenSC library.
85 %description static -l pl.UTF-8
86 Biblioteka statyczna OpenSC.
88 %package -n bash-completion-opensc
89 Summary: Bash completion for OpenSC commands
90 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów poleceń OpenSC
91 Group: Applications/Shells
92 Requires: %{name} = %{version}-%{release}
93 Requires: bash-completion >= 1:2.0
96 %description -n bash-completion-opensc
97 Bash completion for OpenSC commands.
99 %description -n bash-completion-opensc -l pl.UTF-8
100 Bashowe uzupełnianie parametrów poleceń OpenSC.
112 --sysconfdir=%{_sysconfdir}/opensc \
113 %{?with_openct:--enable-openct --disable-pcsc} \
114 %{!?with_openct:--enable-pcsc --disable-openct} \
115 %{!?with_openpace:--disable-openpace} \
116 --disable-silent-rules \
119 --with-completiondir=%{bash_compdir} \
120 --with-pcsc-provider=%{_libdir}/libpcsclite.so.1
125 rm -rf $RPM_BUILD_ROOT
126 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_libdir}/pkcs11}
129 DESTDIR=$RPM_BUILD_ROOT \
130 xdg_autostartdir=/etc/xdg/autostart
132 # not needed (dlopened by soname)
133 %{__rm} $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc-pkcs11,opensc-pkcs11,pkcs11-spy}.la
135 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{opensc,smm-local}.la
137 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
140 rm -rf $RPM_BUILD_ROOT
142 %post -p /sbin/ldconfig
143 %postun -p /sbin/ldconfig
146 %defattr(644,root,root,755)
147 %doc NEWS README doc/tools/tools.html
148 %attr(755,root,root) %{_bindir}/cardos-tool
149 %attr(755,root,root) %{_bindir}/cryptoflex-tool
150 %attr(755,root,root) %{_bindir}/dnie-tool
151 %attr(755,root,root) %{_bindir}/egk-tool
152 %attr(755,root,root) %{_bindir}/eidenv
153 %attr(755,root,root) %{_bindir}/gids-tool
154 %attr(755,root,root) %{_bindir}/goid-tool
155 %attr(755,root,root) %{_bindir}/iasecc-tool
156 %attr(755,root,root) %{_bindir}/netkey-tool
157 %attr(755,root,root) %{_bindir}/npa-tool
158 %attr(755,root,root) %{_bindir}/openpgp-tool
159 %attr(755,root,root) %{_bindir}/opensc-asn1
160 %attr(755,root,root) %{_bindir}/opensc-explorer
161 %attr(755,root,root) %{_bindir}/opensc-notify
162 %attr(755,root,root) %{_bindir}/opensc-tool
163 %attr(755,root,root) %{_bindir}/piv-tool
164 %attr(755,root,root) %{_bindir}/pkcs11-register
165 %attr(755,root,root) %{_bindir}/pkcs11-tool
166 %attr(755,root,root) %{_bindir}/pkcs15-crypt
167 %attr(755,root,root) %{_bindir}/pkcs15-init
168 %attr(755,root,root) %{_bindir}/pkcs15-tool
169 %attr(755,root,root) %{_bindir}/sc-hsm-tool
170 %attr(755,root,root) %{_bindir}/westcos-tool
171 %attr(755,root,root) %{_libdir}/libopensc.so.*.*.*
172 %attr(755,root,root) %ghost %{_libdir}/libopensc.so.8
173 %attr(755,root,root) %{_libdir}/libsmm-local.so.*.*.*
174 %attr(755,root,root) %ghost %{_libdir}/libsmm-local.so.8
176 %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so
177 %attr(755,root,root) %{_libdir}/opensc-pkcs11.so
178 %attr(755,root,root) %{_libdir}/pkcs11-spy.so
179 %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so
180 %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so
181 %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so
182 %dir %{_sysconfdir}/opensc
183 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc/opensc.conf
184 %dir %{_datadir}/opensc
185 %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
186 %{_desktopdir}/org.opensc.notify.desktop
187 /etc/xdg/autostart/pkcs11-register.desktop
189 /etc/eac/cvc/DESCHSMCVCA00001
190 /etc/eac/cvc/DESRCACC100001
192 %{_mandir}/man1/cardos-tool.1*
193 %{_mandir}/man1/cryptoflex-tool.1*
194 %{_mandir}/man1/dnie-tool.1*
195 %{_mandir}/man1/egk-tool.1*
196 %{_mandir}/man1/eidenv.1*
197 %{_mandir}/man1/gids-tool.1*
198 %{_mandir}/man1/goid-tool.1*
199 %{_mandir}/man1/iasecc-tool.1*
200 %{_mandir}/man1/netkey-tool.1*
201 %{_mandir}/man1/npa-tool.1*
202 %{_mandir}/man1/openpgp-tool.1*
203 %{_mandir}/man1/opensc-asn1.1*
204 %{_mandir}/man1/opensc-explorer.1*
205 %{_mandir}/man1/opensc-notify.1*
206 %{_mandir}/man1/opensc-tool.1*
207 %{_mandir}/man1/piv-tool.1*
208 %{_mandir}/man1/pkcs11-register.1*
209 %{_mandir}/man1/pkcs11-tool.1*
210 %{_mandir}/man1/pkcs15-crypt.1*
211 %{_mandir}/man1/pkcs15-init.1*
212 %{_mandir}/man1/pkcs15-tool.1*
213 %{_mandir}/man1/sc-hsm-tool.1*
214 %{_mandir}/man1/westcos-tool.1*
215 %{_mandir}/man5/opensc.conf.5*
216 %{_mandir}/man5/pkcs15-profile.5*
219 %defattr(644,root,root,755)
220 %attr(755,root,root) %{_libdir}/libopensc.so
221 %attr(755,root,root) %{_libdir}/libsmm-local.so
222 %{_pkgconfigdir}/opensc-pkcs11.pc
225 %defattr(644,root,root,755)
226 %{_libdir}/libopensc.a
228 %files -n bash-completion-opensc
229 %defattr(644,root,root,755)
230 %{bash_compdir}/cardos-tool
231 %{bash_compdir}/cryptoflex-tool
232 %{bash_compdir}/dnie-tool
233 %{bash_compdir}/egk-tool
234 %{bash_compdir}/eidenv
235 %{bash_compdir}/gids-tool
236 %{bash_compdir}/goid-tool
237 %{bash_compdir}/iasecc-tool
238 %{bash_compdir}/netkey-tool
239 %{bash_compdir}/npa-tool
240 %{bash_compdir}/openpgp-tool
241 %{bash_compdir}/opensc-asn1
242 %{bash_compdir}/opensc-explorer
243 %{bash_compdir}/opensc-notify
244 %{bash_compdir}/opensc-tool
245 %{bash_compdir}/piv-tool
246 %{bash_compdir}/pkcs11-register
247 %{bash_compdir}/pkcs11-tool
248 %{bash_compdir}/pkcs15-crypt
249 %{bash_compdir}/pkcs15-init
250 %{bash_compdir}/pkcs15-tool
251 %{bash_compdir}/sc-hsm-tool
252 %{bash_compdir}/westcos-tool