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: fc502ed7753f950b8e2a18a476d0cd52
16 URL: https://github.com/OpenSC/OpenSC/wiki
17 BuildRequires: autoconf >= 2.60
18 BuildRequires: automake >= 1:1.10
19 BuildRequires: docbook-style-xsl
20 BuildRequires: libltdl-devel
21 BuildRequires: libtool >= 1:1.4.2-9
22 BuildRequires: libxslt-progs
23 %{?with_openct:BuildRequires: openct-devel}
24 %{?with_openpace:BuildRequires: openpace-devel >= 0.9}
25 BuildRequires: openssl-devel >= 0.9.7d
26 %{!?with_openct:BuildRequires: pcsc-lite-devel >= 1.8.22}
27 BuildRequires: pkgconfig >= 1:0.9.0
28 BuildRequires: readline-devel
29 BuildRequires: rpmbuild(macros) >= 1.364
30 BuildRequires: zlib-devel
31 Requires: filesystem >= 4.0-28
32 %{?with_openpace:Requires: openpace >= 0.9}
33 %{!?with_openct:Requires: pcsc-lite-libs >= 1.8.22}
34 Obsoletes: browser-plugin-opensc
35 Obsoletes: mozilla-plugin-opensc
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 # datadir is used for config files and (editable) profiles
40 %define _sysconfdir /etc/opensc
43 libopensc is a library for accessing SmartCard devices using PC/SC
44 Lite middleware package. It is also the core library of the OpenSC
45 project. Basic functionality (e.g. SELECT FILE, READ BINARY) should
46 work on any ISO 7816-4 compatible SmartCard. Encryption and decryption
47 using private keys on the SmartCard is at the moment possible only
48 with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic
49 IDentity) card manufactured by Setec.
51 %description -l pl.UTF-8
52 libopensc to biblioteka do korzystania z kart procesorowych przy
53 użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa
54 biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT
55 FILE, READ BINARY) powinna działać także z dowolną kartą procesorową
56 zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu
57 prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu
58 kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic
59 IDentity) produkowanych przez Setec.
62 Summary: OpenSC development files
63 Summary(pl.UTF-8): Pliki dla programistów używających OpenSC
64 Group: Development/Tools
65 Requires: %{name} = %{version}-%{release}
66 Requires: libltdl-devel
67 %{?with_openct:Requires: openct-devel}
68 Requires: openssl-devel >= 0.9.7d
69 %{!?with_openct:Requires: pcsc-lite-devel >= 1.8.22}
73 OpenSC development files.
75 %description devel -l pl.UTF-8
76 Pliki dla programistów używających OpenSC.
79 Summary: Static OpenSC library
80 Summary(pl.UTF-8): Bibloteka statyczna OpenSC
81 Group: Development/Tools
82 Requires: %{name}-devel = %{version}-%{release}
85 Static OpenSC library.
87 %description static -l pl.UTF-8
88 Biblioteka statyczna OpenSC.
90 %package -n bash-completion-opensc
91 Summary: Bash completion for OpenSC commands
92 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów poleceń OpenSC
93 Group: Applications/Shells
94 Requires: %{name} = %{version}-%{release}
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 %{?with_openct:--enable-openct --disable-pcsc} \
113 %{!?with_openct:--enable-pcsc --disable-openct} \
114 %{!?with_openpace:--disable-openpace} \
115 --disable-silent-rules \
117 --with-pcsc-provider=%{_libdir}/libpcsclite.so.1
122 rm -rf $RPM_BUILD_ROOT
123 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_libdir}/pkcs11}
126 DESTDIR=$RPM_BUILD_ROOT \
127 completiondir=/etc/bash_completion.d
129 # not needed (dlopened by soname)
130 %{__rm} $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc-pkcs11,opensc-pkcs11,pkcs11-spy}.la
132 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{opensc,smm-local}.la
134 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
137 rm -rf $RPM_BUILD_ROOT
139 %post -p /sbin/ldconfig
140 %postun -p /sbin/ldconfig
143 %defattr(644,root,root,755)
144 %doc NEWS README doc/tools/tools.html
145 %attr(755,root,root) %{_bindir}/cardos-tool
146 %attr(755,root,root) %{_bindir}/cryptoflex-tool
147 %attr(755,root,root) %{_bindir}/dnie-tool
148 %attr(755,root,root) %{_bindir}/eidenv
149 %attr(755,root,root) %{_bindir}/gids-tool
150 %attr(755,root,root) %{_bindir}/iasecc-tool
151 %attr(755,root,root) %{_bindir}/netkey-tool
152 %attr(755,root,root) %{_bindir}/npa-tool
153 %attr(755,root,root) %{_bindir}/openpgp-tool
154 %attr(755,root,root) %{_bindir}/opensc-explorer
155 %attr(755,root,root) %{_bindir}/opensc-tool
156 %attr(755,root,root) %{_bindir}/piv-tool
157 %attr(755,root,root) %{_bindir}/pkcs11-tool
158 %attr(755,root,root) %{_bindir}/pkcs15-crypt
159 %attr(755,root,root) %{_bindir}/pkcs15-init
160 %attr(755,root,root) %{_bindir}/pkcs15-tool
161 %attr(755,root,root) %{_bindir}/sc-hsm-tool
162 %attr(755,root,root) %{_bindir}/westcos-tool
163 %attr(755,root,root) %{_libdir}/libopensc.so.*.*.*
164 %attr(755,root,root) %ghost %{_libdir}/libopensc.so.5
165 %attr(755,root,root) %{_libdir}/libsmm-local.so.*.*.*
166 %attr(755,root,root) %ghost %{_libdir}/libsmm-local.so.5
168 %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so
169 %attr(755,root,root) %{_libdir}/opensc-pkcs11.so
170 %attr(755,root,root) %{_libdir}/pkcs11-spy.so
171 %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so
172 %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so
173 %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so
174 %dir %{_datadir}/opensc
175 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc.conf
176 %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
178 /etc/eac/cvc/DESRCACC100001
180 %{_mandir}/man1/cardos-tool.1*
181 %{_mandir}/man1/cryptoflex-tool.1*
182 %{_mandir}/man1/dnie-tool.1*
183 %{_mandir}/man1/eidenv.1*
184 %{_mandir}/man1/gids-tool.1*
185 %{_mandir}/man1/iasecc-tool.1*
186 %{_mandir}/man1/netkey-tool.1*
187 %{_mandir}/man1/npa-tool.1*
188 %{_mandir}/man1/openpgp-tool.1*
189 %{_mandir}/man1/opensc-explorer.1*
190 %{_mandir}/man1/opensc-tool.1*
191 %{_mandir}/man1/piv-tool.1*
192 %{_mandir}/man1/pkcs11-tool.1*
193 %{_mandir}/man1/pkcs15-crypt.1*
194 %{_mandir}/man1/pkcs15-init.1*
195 %{_mandir}/man1/pkcs15-tool.1*
196 %{_mandir}/man1/sc-hsm-tool.1*
197 %{_mandir}/man1/westcos-tool.1*
198 %{_mandir}/man5/pkcs15-profile.5*
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_libdir}/libopensc.so
203 %attr(755,root,root) %{_libdir}/libsmm-local.so
204 %{_pkgconfigdir}/opensc-pkcs11.pc
207 %defattr(644,root,root,755)
208 %{_libdir}/libopensc.a
210 %files -n bash-completion-opensc
211 %defattr(644,root,root,755)
212 /etc/bash_completion.d/cardos-tool
213 /etc/bash_completion.d/cryptoflex-tool
214 /etc/bash_completion.d/dnie-tool
215 /etc/bash_completion.d/eidenv
216 /etc/bash_completion.d/gids-tool
217 /etc/bash_completion.d/iasecc-tool
218 /etc/bash_completion.d/netkey-tool
219 /etc/bash_completion.d/openpgp-tool
220 /etc/bash_completion.d/opensc-explorer
221 /etc/bash_completion.d/opensc-tool
222 /etc/bash_completion.d/piv-tool
223 /etc/bash_completion.d/pkcs11-tool
224 /etc/bash_completion.d/pkcs15-crypt
225 /etc/bash_completion.d/pkcs15-init
226 /etc/bash_completion.d/pkcs15-tool
227 /etc/bash_completion.d/sc-hsm-tool
228 /etc/bash_completion.d/westcos-tool