]>
Commit | Line | Data |
---|---|---|
455ac4e7 JB |
1 | # |
2 | # Conditional build: | |
46bcb391 JB |
3 | %bcond_with openct # use OpenCT instead of PC/SC for reader access |
4 | %bcond_without openpace # OpenPACE support | |
53aad453 | 5 | # |
1cefa9cb | 6 | Summary: OpenSC library - for accessing SmartCard devices using PC/SC Lite |
ae88f326 | 7 | Summary(pl.UTF-8): Biblioteka OpenSC - do korzystania z kart procesorowych przy użyciu PC/SC Lite |
896b833c | 8 | Name: opensc |
f449ddbe | 9 | Version: 0.23.0 |
ec1145fc | 10 | Release: 2 |
18e38179 | 11 | License: LGPL v2.1+ |
1cefa9cb | 12 | Group: Applications |
46bcb391 JB |
13 | #Source0Download: https://github.com/OpenSC/OpenSC/releases |
14 | Source0: https://github.com/OpenSC/OpenSC/releases/download/%{version}/%{name}-%{version}.tar.gz | |
f449ddbe | 15 | # Source0-md5: 35c599e673ae9205550974e2dcbe0825 |
4f1bc56e | 16 | URL: https://github.com/OpenSC/OpenSC/wiki |
f449ddbe | 17 | BuildRequires: autoconf >= 2.68 |
c28ca417 | 18 | BuildRequires: automake >= 1:1.10 |
0ad4458f | 19 | BuildRequires: cmocka-devel |
455ac4e7 | 20 | BuildRequires: docbook-style-xsl |
8d087e90 | 21 | BuildRequires: libltdl-devel |
1cefa9cb | 22 | BuildRequires: libtool >= 1:1.4.2-9 |
d740a4df | 23 | BuildRequires: libxslt-progs |
455ac4e7 | 24 | %{?with_openct:BuildRequires: openct-devel} |
46bcb391 | 25 | %{?with_openpace:BuildRequires: openpace-devel >= 0.9} |
f449ddbe | 26 | BuildRequires: openssl-devel >= 1.1.1 |
46bcb391 | 27 | %{!?with_openct:BuildRequires: pcsc-lite-devel >= 1.8.22} |
34f2d3c1 | 28 | BuildRequires: pkgconfig >= 1:0.9.0 |
1cefa9cb | 29 | BuildRequires: readline-devel |
b4121807 JB |
30 | BuildRequires: rpm-build >= 4.6 |
31 | BuildRequires: rpmbuild(macros) >= 1.673 | |
c28ca417 | 32 | BuildRequires: zlib-devel |
4f1bc56e | 33 | Requires: filesystem >= 4.0-28 |
46bcb391 JB |
34 | %{?with_openpace:Requires: openpace >= 0.9} |
35 | %{!?with_openct:Requires: pcsc-lite-libs >= 1.8.22} | |
707b6c90 JB |
36 | Obsoletes: browser-plugin-opensc < 0.12 |
37 | Obsoletes: mozilla-plugin-opensc < 0.11.0-2 | |
38 | Obsoletes: opensc-initramfs < 0.12.2-2 | |
896b833c | 39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %description | |
1cefa9cb JB |
42 | libopensc is a library for accessing SmartCard devices using PC/SC |
43 | Lite middleware package. It is also the core library of the OpenSC | |
44 | project. Basic functionality (e.g. SELECT FILE, READ BINARY) should | |
45 | work on any ISO 7816-4 compatible SmartCard. Encryption and decryption | |
46 | using private keys on the SmartCard is at the moment possible only | |
47 | with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic | |
48 | IDentity) card manufactured by Setec. | |
896b833c | 49 | |
8623b75b | 50 | %description -l pl.UTF-8 |
1cefa9cb | 51 | libopensc to biblioteka do korzystania z kart procesorowych przy |
8623b75b JR |
52 | użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa |
53 | biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT | |
54 | FILE, READ BINARY) powinna działać także z dowolną kartą procesorową | |
55 | zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu | |
56 | prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu | |
1cefa9cb JB |
57 | kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic |
58 | IDentity) produkowanych przez Setec. | |
896b833c | 59 | |
60 | %package devel | |
1cefa9cb | 61 | Summary: OpenSC development files |
ae88f326 | 62 | Summary(pl.UTF-8): Pliki dla programistów używających OpenSC |
896b833c | 63 | Group: Development/Tools |
46bcb391 | 64 | Requires: %{name} = %{version}-%{release} |
24aae781 | 65 | Requires: libltdl-devel |
455ac4e7 | 66 | %{?with_openct:Requires: openct-devel} |
f449ddbe | 67 | Requires: openssl-devel >= 1.1.1 |
46bcb391 | 68 | %{!?with_openct:Requires: pcsc-lite-devel >= 1.8.22} |
ef886f95 | 69 | Requires: zlib-devel |
896b833c | 70 | |
71 | %description devel | |
1cefa9cb | 72 | OpenSC development files. |
896b833c | 73 | |
8623b75b JR |
74 | %description devel -l pl.UTF-8 |
75 | Pliki dla programistów używających OpenSC. | |
896b833c | 76 | |
77 | %package static | |
455ac4e7 JB |
78 | Summary: Static OpenSC library |
79 | Summary(pl.UTF-8): Bibloteka statyczna OpenSC | |
896b833c | 80 | Group: Development/Tools |
46bcb391 | 81 | Requires: %{name}-devel = %{version}-%{release} |
896b833c | 82 | |
83 | %description static | |
455ac4e7 | 84 | Static OpenSC library. |
896b833c | 85 | |
8623b75b | 86 | %description static -l pl.UTF-8 |
455ac4e7 | 87 | Biblioteka statyczna OpenSC. |
d6f32863 | 88 | |
47359102 JB |
89 | %package -n bash-completion-opensc |
90 | Summary: Bash completion for OpenSC commands | |
91 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów poleceń OpenSC | |
92 | Group: Applications/Shells | |
93 | Requires: %{name} = %{version}-%{release} | |
b4121807 JB |
94 | Requires: bash-completion >= 1:2.0 |
95 | BuildArch: noarch | |
47359102 JB |
96 | |
97 | %description -n bash-completion-opensc | |
98 | Bash completion for OpenSC commands. | |
99 | ||
100 | %description -n bash-completion-opensc -l pl.UTF-8 | |
101 | Bashowe uzupełnianie parametrów poleceń OpenSC. | |
102 | ||
896b833c | 103 | %prep |
1cefa9cb | 104 | %setup -q |
2504dc81 | 105 | |
896b833c | 106 | %build |
1cefa9cb | 107 | %{__libtoolize} |
c28ca417 | 108 | %{__aclocal} -I m4 |
1cefa9cb | 109 | %{__autoconf} |
ac174bda | 110 | %{__autoheader} |
1cefa9cb | 111 | %{__automake} |
d6f32863 | 112 | %configure \ |
bc53361b | 113 | --sysconfdir=%{_sysconfdir}/opensc \ |
455ac4e7 JB |
114 | %{?with_openct:--enable-openct --disable-pcsc} \ |
115 | %{!?with_openct:--enable-pcsc --disable-openct} \ | |
46bcb391 | 116 | %{!?with_openpace:--disable-openpace} \ |
80bde4f7 | 117 | --disable-silent-rules \ |
f449ddbe | 118 | --disable-strict \ |
455ac4e7 | 119 | --enable-doc \ |
b4121807 | 120 | --with-completiondir=%{bash_compdir} \ |
455ac4e7 | 121 | --with-pcsc-provider=%{_libdir}/libpcsclite.so.1 |
896b833c | 122 | |
1cefa9cb | 123 | %{__make} |
896b833c | 124 | |
125 | %install | |
126 | rm -rf $RPM_BUILD_ROOT | |
3d10579f | 127 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_libdir}/pkcs11} |
70be04b7 | 128 | |
3d10579f | 129 | %{__make} install \ |
47359102 | 130 | DESTDIR=$RPM_BUILD_ROOT \ |
b4121807 | 131 | xdg_autostartdir=/etc/xdg/autostart |
896b833c | 132 | |
455ac4e7 | 133 | # not needed (dlopened by soname) |
ef886f95 | 134 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc-pkcs11,opensc-pkcs11,pkcs11-spy}.la |
46bcb391 | 135 | # API not exported |
ef886f95 | 136 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{opensc,smm-local}.la |
61f848e8 | 137 | |
53aad453 | 138 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
0a3c046b | 139 | |
896b833c | 140 | %clean |
141 | rm -rf $RPM_BUILD_ROOT | |
142 | ||
1cefa9cb JB |
143 | %post -p /sbin/ldconfig |
144 | %postun -p /sbin/ldconfig | |
896b833c | 145 | |
146 | %files | |
147 | %defattr(644,root,root,755) | |
112cff34 | 148 | %doc NEWS README doc/tools/tools.html |
d9747ba8 | 149 | %attr(755,root,root) %{_bindir}/cardos-tool |
1cefa9cb | 150 | %attr(755,root,root) %{_bindir}/cryptoflex-tool |
ef886f95 | 151 | %attr(755,root,root) %{_bindir}/dnie-tool |
5f4e2851 | 152 | %attr(755,root,root) %{_bindir}/egk-tool |
8d087e90 | 153 | %attr(755,root,root) %{_bindir}/eidenv |
112cff34 | 154 | %attr(755,root,root) %{_bindir}/gids-tool |
f449ddbe | 155 | %attr(755,root,root) %{_bindir}/goid-tool |
4f1bc56e | 156 | %attr(755,root,root) %{_bindir}/iasecc-tool |
8d087e90 | 157 | %attr(755,root,root) %{_bindir}/netkey-tool |
46bcb391 | 158 | %attr(755,root,root) %{_bindir}/npa-tool |
4f1bc56e | 159 | %attr(755,root,root) %{_bindir}/openpgp-tool |
5f4e2851 | 160 | %attr(755,root,root) %{_bindir}/opensc-asn1 |
1cefa9cb | 161 | %attr(755,root,root) %{_bindir}/opensc-explorer |
5f4e2851 | 162 | %attr(755,root,root) %{_bindir}/opensc-notify |
1cefa9cb | 163 | %attr(755,root,root) %{_bindir}/opensc-tool |
88647e66 | 164 | %attr(755,root,root) %{_bindir}/piv-tool |
f449ddbe | 165 | %attr(755,root,root) %{_bindir}/pkcs11-register |
61f848e8 | 166 | %attr(755,root,root) %{_bindir}/pkcs11-tool |
455ac4e7 JB |
167 | %attr(755,root,root) %{_bindir}/pkcs15-crypt |
168 | %attr(755,root,root) %{_bindir}/pkcs15-init | |
169 | %attr(755,root,root) %{_bindir}/pkcs15-tool | |
4f1bc56e | 170 | %attr(755,root,root) %{_bindir}/sc-hsm-tool |
c9f4880d | 171 | %attr(755,root,root) %{_bindir}/westcos-tool |
c39ac2c0 | 172 | %attr(755,root,root) %{_libdir}/libopensc.so.*.*.* |
f449ddbe | 173 | %attr(755,root,root) %ghost %{_libdir}/libopensc.so.8 |
ef886f95 | 174 | %attr(755,root,root) %{_libdir}/libsmm-local.so.*.*.* |
f449ddbe | 175 | %attr(755,root,root) %ghost %{_libdir}/libsmm-local.so.8 |
c28ca417 | 176 | # PKCS11 modules |
ef886f95 | 177 | %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so |
2f74c13c | 178 | %attr(755,root,root) %{_libdir}/opensc-pkcs11.so |
8d087e90 | 179 | %attr(755,root,root) %{_libdir}/pkcs11-spy.so |
ef886f95 | 180 | %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so |
c28ca417 JB |
181 | %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so |
182 | %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so | |
bc53361b JB |
183 | %dir %{_sysconfdir}/opensc |
184 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc/opensc.conf | |
1cefa9cb | 185 | %dir %{_datadir}/opensc |
4bdbfbe7 | 186 | %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile |
b4121807 JB |
187 | %{_desktopdir}/org.opensc.notify.desktop |
188 | /etc/xdg/autostart/pkcs11-register.desktop | |
46bcb391 | 189 | %if %{with openpace} |
f449ddbe | 190 | /etc/eac/cvc/DESCHSMCVCA00001 |
46bcb391 JB |
191 | /etc/eac/cvc/DESRCACC100001 |
192 | %endif | |
d9747ba8 | 193 | %{_mandir}/man1/cardos-tool.1* |
61f848e8 | 194 | %{_mandir}/man1/cryptoflex-tool.1* |
47359102 | 195 | %{_mandir}/man1/dnie-tool.1* |
5f4e2851 | 196 | %{_mandir}/man1/egk-tool.1* |
53aad453 | 197 | %{_mandir}/man1/eidenv.1* |
112cff34 | 198 | %{_mandir}/man1/gids-tool.1* |
f449ddbe | 199 | %{_mandir}/man1/goid-tool.1* |
4f1bc56e | 200 | %{_mandir}/man1/iasecc-tool.1* |
8d087e90 | 201 | %{_mandir}/man1/netkey-tool.1* |
46bcb391 | 202 | %{_mandir}/man1/npa-tool.1* |
4f1bc56e | 203 | %{_mandir}/man1/openpgp-tool.1* |
5f4e2851 | 204 | %{_mandir}/man1/opensc-asn1.1* |
61f848e8 | 205 | %{_mandir}/man1/opensc-explorer.1* |
5f4e2851 | 206 | %{_mandir}/man1/opensc-notify.1* |
61f848e8 | 207 | %{_mandir}/man1/opensc-tool.1* |
53aad453 | 208 | %{_mandir}/man1/piv-tool.1* |
f449ddbe | 209 | %{_mandir}/man1/pkcs11-register.1* |
92519f5f | 210 | %{_mandir}/man1/pkcs11-tool.1* |
455ac4e7 JB |
211 | %{_mandir}/man1/pkcs15-crypt.1* |
212 | %{_mandir}/man1/pkcs15-init.1* | |
213 | %{_mandir}/man1/pkcs15-tool.1* | |
4f1bc56e | 214 | %{_mandir}/man1/sc-hsm-tool.1* |
c9f4880d | 215 | %{_mandir}/man1/westcos-tool.1* |
5f4e2851 | 216 | %{_mandir}/man5/opensc.conf.5* |
c39ac2c0 | 217 | %{_mandir}/man5/pkcs15-profile.5* |
896b833c | 218 | |
219 | %files devel | |
220 | %defattr(644,root,root,755) | |
1cefa9cb | 221 | %attr(755,root,root) %{_libdir}/libopensc.so |
ef886f95 | 222 | %attr(755,root,root) %{_libdir}/libsmm-local.so |
46bcb391 | 223 | %{_pkgconfigdir}/opensc-pkcs11.pc |
896b833c | 224 | |
225 | %files static | |
226 | %defattr(644,root,root,755) | |
8d087e90 | 227 | %{_libdir}/libopensc.a |
47359102 JB |
228 | |
229 | %files -n bash-completion-opensc | |
230 | %defattr(644,root,root,755) | |
b4121807 JB |
231 | %{bash_compdir}/cardos-tool |
232 | %{bash_compdir}/cryptoflex-tool | |
233 | %{bash_compdir}/dnie-tool | |
234 | %{bash_compdir}/egk-tool | |
235 | %{bash_compdir}/eidenv | |
236 | %{bash_compdir}/gids-tool | |
237 | %{bash_compdir}/goid-tool | |
238 | %{bash_compdir}/iasecc-tool | |
239 | %{bash_compdir}/netkey-tool | |
240 | %{bash_compdir}/npa-tool | |
241 | %{bash_compdir}/openpgp-tool | |
242 | %{bash_compdir}/opensc-asn1 | |
243 | %{bash_compdir}/opensc-explorer | |
244 | %{bash_compdir}/opensc-notify | |
245 | %{bash_compdir}/opensc-tool | |
246 | %{bash_compdir}/piv-tool | |
247 | %{bash_compdir}/pkcs11-register | |
248 | %{bash_compdir}/pkcs11-tool | |
249 | %{bash_compdir}/pkcs15-crypt | |
250 | %{bash_compdir}/pkcs15-init | |
251 | %{bash_compdir}/pkcs15-tool | |
252 | %{bash_compdir}/sc-hsm-tool | |
253 | %{bash_compdir}/westcos-tool |