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: rpmbuild(macros) >= 1.364
31 BuildRequires: zlib-devel
32 Requires: filesystem >= 4.0-28
33 %{?with_openpace:Requires: openpace >= 0.9}
34 %{!?with_openct:Requires: pcsc-lite-libs >= 1.8.22}
35 Obsoletes: browser-plugin-opensc
36 Obsoletes: mozilla-plugin-opensc
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 libopensc is a library for accessing SmartCard devices using PC/SC
41 Lite middleware package. It is also the core library of the OpenSC
42 project. Basic functionality (e.g. SELECT FILE, READ BINARY) should
43 work on any ISO 7816-4 compatible SmartCard. Encryption and decryption
44 using private keys on the SmartCard is at the moment possible only
45 with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic
46 IDentity) card manufactured by Setec.
48 %description -l pl.UTF-8
49 libopensc to biblioteka do korzystania z kart procesorowych przy
50 użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa
51 biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT
52 FILE, READ BINARY) powinna działać także z dowolną kartą procesorową
53 zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu
54 prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu
55 kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic
56 IDentity) produkowanych przez Setec.
59 Summary: OpenSC development files
60 Summary(pl.UTF-8): Pliki dla programistów używających OpenSC
61 Group: Development/Tools
62 Requires: %{name} = %{version}-%{release}
63 Requires: libltdl-devel
64 %{?with_openct:Requires: openct-devel}
65 Requires: openssl-devel >= 1.1.1
66 %{!?with_openct:Requires: pcsc-lite-devel >= 1.8.22}
70 OpenSC development files.
72 %description devel -l pl.UTF-8
73 Pliki dla programistów używających OpenSC.
76 Summary: Static OpenSC library
77 Summary(pl.UTF-8): Bibloteka statyczna OpenSC
78 Group: Development/Tools
79 Requires: %{name}-devel = %{version}-%{release}
82 Static OpenSC library.
84 %description static -l pl.UTF-8
85 Biblioteka statyczna OpenSC.
87 %package -n bash-completion-opensc
88 Summary: Bash completion for OpenSC commands
89 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów poleceń OpenSC
90 Group: Applications/Shells
91 Requires: %{name} = %{version}-%{release}
93 %description -n bash-completion-opensc
94 Bash completion for OpenSC commands.
96 %description -n bash-completion-opensc -l pl.UTF-8
97 Bashowe uzupełnianie parametrów poleceń OpenSC.
109 --sysconfdir=%{_sysconfdir}/opensc \
110 %{?with_openct:--enable-openct --disable-pcsc} \
111 %{!?with_openct:--enable-pcsc --disable-openct} \
112 %{!?with_openpace:--disable-openpace} \
113 --disable-silent-rules \
116 --with-pcsc-provider=%{_libdir}/libpcsclite.so.1
121 rm -rf $RPM_BUILD_ROOT
122 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_libdir}/pkcs11}
125 DESTDIR=$RPM_BUILD_ROOT \
126 completiondir=/etc/bash_completion.d
128 # not needed (dlopened by soname)
129 %{__rm} $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc-pkcs11,opensc-pkcs11,pkcs11-spy}.la
131 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{opensc,smm-local}.la
133 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
136 rm -rf $RPM_BUILD_ROOT
138 %post -p /sbin/ldconfig
139 %postun -p /sbin/ldconfig
142 %defattr(644,root,root,755)
143 %doc NEWS README doc/tools/tools.html
144 %attr(755,root,root) %{_bindir}/cardos-tool
145 %attr(755,root,root) %{_bindir}/cryptoflex-tool
146 %attr(755,root,root) %{_bindir}/dnie-tool
147 %attr(755,root,root) %{_bindir}/egk-tool
148 %attr(755,root,root) %{_bindir}/eidenv
149 %attr(755,root,root) %{_bindir}/gids-tool
150 %attr(755,root,root) %{_bindir}/goid-tool
151 %attr(755,root,root) %{_bindir}/iasecc-tool
152 %attr(755,root,root) %{_bindir}/netkey-tool
153 %attr(755,root,root) %{_bindir}/npa-tool
154 %attr(755,root,root) %{_bindir}/openpgp-tool
155 %attr(755,root,root) %{_bindir}/opensc-asn1
156 %attr(755,root,root) %{_bindir}/opensc-explorer
157 %attr(755,root,root) %{_bindir}/opensc-notify
158 %attr(755,root,root) %{_bindir}/opensc-tool
159 %attr(755,root,root) %{_bindir}/piv-tool
160 %attr(755,root,root) %{_bindir}/pkcs11-register
161 %attr(755,root,root) %{_bindir}/pkcs11-tool
162 %attr(755,root,root) %{_bindir}/pkcs15-crypt
163 %attr(755,root,root) %{_bindir}/pkcs15-init
164 %attr(755,root,root) %{_bindir}/pkcs15-tool
165 %attr(755,root,root) %{_bindir}/sc-hsm-tool
166 %attr(755,root,root) %{_bindir}/westcos-tool
167 %attr(755,root,root) %{_libdir}/libopensc.so.*.*.*
168 %attr(755,root,root) %ghost %{_libdir}/libopensc.so.8
169 %attr(755,root,root) %{_libdir}/libsmm-local.so.*.*.*
170 %attr(755,root,root) %ghost %{_libdir}/libsmm-local.so.8
172 %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so
173 %attr(755,root,root) %{_libdir}/opensc-pkcs11.so
174 %attr(755,root,root) %{_libdir}/pkcs11-spy.so
175 %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so
176 %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so
177 %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so
178 %dir %{_sysconfdir}/opensc
179 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc/opensc.conf
180 %dir %{_datadir}/opensc
181 %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
183 /etc/eac/cvc/DESCHSMCVCA00001
184 /etc/eac/cvc/DESRCACC100001
186 %{_mandir}/man1/cardos-tool.1*
187 %{_mandir}/man1/cryptoflex-tool.1*
188 %{_mandir}/man1/dnie-tool.1*
189 %{_mandir}/man1/egk-tool.1*
190 %{_mandir}/man1/eidenv.1*
191 %{_mandir}/man1/gids-tool.1*
192 %{_mandir}/man1/goid-tool.1*
193 %{_mandir}/man1/iasecc-tool.1*
194 %{_mandir}/man1/netkey-tool.1*
195 %{_mandir}/man1/npa-tool.1*
196 %{_mandir}/man1/openpgp-tool.1*
197 %{_mandir}/man1/opensc-asn1.1*
198 %{_mandir}/man1/opensc-explorer.1*
199 %{_mandir}/man1/opensc-notify.1*
200 %{_mandir}/man1/opensc-tool.1*
201 %{_mandir}/man1/piv-tool.1*
202 %{_mandir}/man1/pkcs11-register.1*
203 %{_mandir}/man1/pkcs11-tool.1*
204 %{_mandir}/man1/pkcs15-crypt.1*
205 %{_mandir}/man1/pkcs15-init.1*
206 %{_mandir}/man1/pkcs15-tool.1*
207 %{_mandir}/man1/sc-hsm-tool.1*
208 %{_mandir}/man1/westcos-tool.1*
209 %{_mandir}/man5/opensc.conf.5*
210 %{_mandir}/man5/pkcs15-profile.5*
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{_libdir}/libopensc.so
215 %attr(755,root,root) %{_libdir}/libsmm-local.so
216 %{_pkgconfigdir}/opensc-pkcs11.pc
219 %defattr(644,root,root,755)
220 %{_libdir}/libopensc.a
222 %files -n bash-completion-opensc
223 %defattr(644,root,root,755)
224 /etc/bash_completion.d/cardos-tool
225 /etc/bash_completion.d/cryptoflex-tool
226 /etc/bash_completion.d/dnie-tool
227 /etc/bash_completion.d/egk-tool
228 /etc/bash_completion.d/eidenv
229 /etc/bash_completion.d/gids-tool
230 /etc/bash_completion.d/goid-tool
231 /etc/bash_completion.d/iasecc-tool
232 /etc/bash_completion.d/netkey-tool
233 /etc/bash_completion.d/npa-tool
234 /etc/bash_completion.d/openpgp-tool
235 /etc/bash_completion.d/opensc-asn1
236 /etc/bash_completion.d/opensc-explorer
237 /etc/bash_completion.d/opensc-notify
238 /etc/bash_completion.d/opensc-tool
239 /etc/bash_completion.d/piv-tool
240 /etc/bash_completion.d/pkcs11-register
241 /etc/bash_completion.d/pkcs11-tool
242 /etc/bash_completion.d/pkcs15-crypt
243 /etc/bash_completion.d/pkcs15-init
244 /etc/bash_completion.d/pkcs15-tool
245 /etc/bash_completion.d/sc-hsm-tool
246 /etc/bash_completion.d/westcos-tool