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: 40734b2343cf83c62c4c403f8a37475e
17 Patch1: no-Werror.patch
18 URL: https://github.com/OpenSC/OpenSC/wiki
19 BuildRequires: autoconf >= 2.60
20 BuildRequires: automake >= 1:1.10
21 BuildRequires: docbook-style-xsl
22 BuildRequires: libltdl-devel
23 BuildRequires: libtool >= 1:1.4.2-9
24 BuildRequires: libxslt-progs
25 %{?with_openct:BuildRequires: openct-devel}
26 %{?with_openpace:BuildRequires: openpace-devel >= 0.9}
27 BuildRequires: openssl-devel >= 0.9.7d
28 %{!?with_openct:BuildRequires: pcsc-lite-devel >= 1.8.22}
29 BuildRequires: pkgconfig >= 1:0.9.0
30 BuildRequires: readline-devel
31 BuildRequires: rpmbuild(macros) >= 1.364
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)
40 # datadir is used for config files and (editable) profiles
42 %define _sysconfdir /etc/opensc
45 libopensc is a library for accessing SmartCard devices using PC/SC
46 Lite middleware package. It is also the core library of the OpenSC
47 project. Basic functionality (e.g. SELECT FILE, READ BINARY) should
48 work on any ISO 7816-4 compatible SmartCard. Encryption and decryption
49 using private keys on the SmartCard is at the moment possible only
50 with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic
51 IDentity) card manufactured by Setec.
53 %description -l pl.UTF-8
54 libopensc to biblioteka do korzystania z kart procesorowych przy
55 użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa
56 biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT
57 FILE, READ BINARY) powinna działać także z dowolną kartą procesorową
58 zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu
59 prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu
60 kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic
61 IDentity) produkowanych przez Setec.
64 Summary: OpenSC development files
65 Summary(pl.UTF-8): Pliki dla programistów używających OpenSC
66 Group: Development/Tools
67 Requires: %{name} = %{version}-%{release}
68 Requires: libltdl-devel
69 %{?with_openct:Requires: openct-devel}
70 Requires: openssl-devel >= 0.9.7d
71 %{!?with_openct:Requires: pcsc-lite-devel >= 1.8.22}
75 OpenSC development files.
77 %description devel -l pl.UTF-8
78 Pliki dla programistów używających OpenSC.
81 Summary: Static OpenSC library
82 Summary(pl.UTF-8): Bibloteka statyczna OpenSC
83 Group: Development/Tools
84 Requires: %{name}-devel = %{version}-%{release}
87 Static OpenSC library.
89 %description static -l pl.UTF-8
90 Biblioteka statyczna OpenSC.
92 %package -n bash-completion-opensc
93 Summary: Bash completion for OpenSC commands
94 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów poleceń OpenSC
95 Group: Applications/Shells
96 Requires: %{name} = %{version}-%{release}
98 %description -n bash-completion-opensc
99 Bash completion for OpenSC commands.
101 %description -n bash-completion-opensc -l pl.UTF-8
102 Bashowe uzupełnianie parametrów poleceń OpenSC.
116 %{?with_openct:--enable-openct --disable-pcsc} \
117 %{!?with_openct:--enable-pcsc --disable-openct} \
118 %{!?with_openpace:--disable-openpace} \
119 --disable-silent-rules \
121 --with-pcsc-provider=%{_libdir}/libpcsclite.so.1
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_libdir}/pkcs11}
130 DESTDIR=$RPM_BUILD_ROOT \
131 completiondir=/etc/bash_completion.d
133 # not needed (dlopened by soname)
134 %{__rm} $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc-pkcs11,opensc-pkcs11,pkcs11-spy}.la
136 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{opensc,smm-local}.la
138 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
141 rm -rf $RPM_BUILD_ROOT
143 %post -p /sbin/ldconfig
144 %postun -p /sbin/ldconfig
147 %defattr(644,root,root,755)
148 %doc NEWS README doc/tools/tools.html
149 %attr(755,root,root) %{_bindir}/cardos-tool
150 %attr(755,root,root) %{_bindir}/cryptoflex-tool
151 %attr(755,root,root) %{_bindir}/dnie-tool
152 %attr(755,root,root) %{_bindir}/egk-tool
153 %attr(755,root,root) %{_bindir}/eidenv
154 %attr(755,root,root) %{_bindir}/gids-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-tool
165 %attr(755,root,root) %{_bindir}/pkcs15-crypt
166 %attr(755,root,root) %{_bindir}/pkcs15-init
167 %attr(755,root,root) %{_bindir}/pkcs15-tool
168 %attr(755,root,root) %{_bindir}/sc-hsm-tool
169 %attr(755,root,root) %{_bindir}/westcos-tool
170 %attr(755,root,root) %{_libdir}/libopensc.so.*.*.*
171 %attr(755,root,root) %ghost %{_libdir}/libopensc.so.6
172 %attr(755,root,root) %{_libdir}/libsmm-local.so.*.*.*
173 %attr(755,root,root) %ghost %{_libdir}/libsmm-local.so.6
175 %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so
176 %attr(755,root,root) %{_libdir}/opensc-pkcs11.so
177 %attr(755,root,root) %{_libdir}/pkcs11-spy.so
178 %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so
179 %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so
180 %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so
181 %dir %{_datadir}/opensc
182 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc.conf
183 %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
185 /etc/eac/cvc/DESRCACC100001
187 %{_mandir}/man1/cardos-tool.1*
188 %{_mandir}/man1/cryptoflex-tool.1*
189 %{_mandir}/man1/dnie-tool.1*
190 %{_mandir}/man1/egk-tool.1*
191 %{_mandir}/man1/eidenv.1*
192 %{_mandir}/man1/gids-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-tool.1*
203 %{_mandir}/man1/pkcs15-crypt.1*
204 %{_mandir}/man1/pkcs15-init.1*
205 %{_mandir}/man1/pkcs15-tool.1*
206 %{_mandir}/man1/sc-hsm-tool.1*
207 %{_mandir}/man1/westcos-tool.1*
208 %{_mandir}/man5/opensc.conf.5*
209 %{_mandir}/man5/pkcs15-profile.5*
212 %defattr(644,root,root,755)
213 %attr(755,root,root) %{_libdir}/libopensc.so
214 %attr(755,root,root) %{_libdir}/libsmm-local.so
215 %{_pkgconfigdir}/opensc-pkcs11.pc
218 %defattr(644,root,root,755)
219 %{_libdir}/libopensc.a
221 %files -n bash-completion-opensc
222 %defattr(644,root,root,755)
223 /etc/bash_completion.d/cardos-tool
224 /etc/bash_completion.d/cryptoflex-tool
225 /etc/bash_completion.d/dnie-tool
226 /etc/bash_completion.d/egk-tool
227 /etc/bash_completion.d/eidenv
228 /etc/bash_completion.d/gids-tool
229 /etc/bash_completion.d/iasecc-tool
230 /etc/bash_completion.d/netkey-tool
231 /etc/bash_completion.d/npa-tool
232 /etc/bash_completion.d/openpgp-tool
233 /etc/bash_completion.d/opensc-asn1
234 /etc/bash_completion.d/opensc-explorer
235 /etc/bash_completion.d/opensc-notify
236 /etc/bash_completion.d/opensc-tool
237 /etc/bash_completion.d/piv-tool
238 /etc/bash_completion.d/pkcs11-tool
239 /etc/bash_completion.d/pkcs15-crypt
240 /etc/bash_completion.d/pkcs15-init
241 /etc/bash_completion.d/pkcs15-tool
242 /etc/bash_completion.d/sc-hsm-tool
243 /etc/bash_completion.d/westcos-tool