]>
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 |
46bcb391 JB |
9 | Version: 0.17.0 |
10 | Release: 1 | |
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 | |
15 | # Source0-md5: fc502ed7753f950b8e2a18a476d0cd52 | |
4f1bc56e | 16 | URL: https://github.com/OpenSC/OpenSC/wiki |
c28ca417 JB |
17 | BuildRequires: autoconf >= 2.60 |
18 | BuildRequires: automake >= 1:1.10 | |
455ac4e7 | 19 | BuildRequires: docbook-style-xsl |
8d087e90 | 20 | BuildRequires: libltdl-devel |
1cefa9cb | 21 | BuildRequires: libtool >= 1:1.4.2-9 |
d740a4df | 22 | BuildRequires: libxslt-progs |
455ac4e7 | 23 | %{?with_openct:BuildRequires: openct-devel} |
46bcb391 | 24 | %{?with_openpace:BuildRequires: openpace-devel >= 0.9} |
72eaba4f | 25 | BuildRequires: openssl-devel >= 0.9.7d |
46bcb391 | 26 | %{!?with_openct:BuildRequires: pcsc-lite-devel >= 1.8.22} |
34f2d3c1 | 27 | BuildRequires: pkgconfig >= 1:0.9.0 |
1cefa9cb | 28 | BuildRequires: readline-devel |
c28ca417 JB |
29 | BuildRequires: rpmbuild(macros) >= 1.364 |
30 | BuildRequires: zlib-devel | |
4f1bc56e | 31 | Requires: filesystem >= 4.0-28 |
46bcb391 JB |
32 | %{?with_openpace:Requires: openpace >= 0.9} |
33 | %{!?with_openct:Requires: pcsc-lite-libs >= 1.8.22} | |
455ac4e7 JB |
34 | Obsoletes: browser-plugin-opensc |
35 | Obsoletes: mozilla-plugin-opensc | |
896b833c | 36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
1eb351c9 | 38 | # datadir is used for config files and (editable) profiles |
ac174bda JB |
39 | %define _datadir /etc |
40 | %define _sysconfdir /etc/opensc | |
d6f32863 | 41 | |
896b833c | 42 | %description |
1cefa9cb JB |
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. | |
896b833c | 50 | |
8623b75b | 51 | %description -l pl.UTF-8 |
1cefa9cb | 52 | libopensc to biblioteka do korzystania z kart procesorowych przy |
8623b75b JR |
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 | |
1cefa9cb JB |
58 | kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic |
59 | IDentity) produkowanych przez Setec. | |
896b833c | 60 | |
61 | %package devel | |
1cefa9cb | 62 | Summary: OpenSC development files |
ae88f326 | 63 | Summary(pl.UTF-8): Pliki dla programistów używających OpenSC |
896b833c | 64 | Group: Development/Tools |
46bcb391 | 65 | Requires: %{name} = %{version}-%{release} |
24aae781 | 66 | Requires: libltdl-devel |
455ac4e7 | 67 | %{?with_openct:Requires: openct-devel} |
ef886f95 | 68 | Requires: openssl-devel >= 0.9.7d |
46bcb391 | 69 | %{!?with_openct:Requires: pcsc-lite-devel >= 1.8.22} |
ef886f95 | 70 | Requires: zlib-devel |
896b833c | 71 | |
72 | %description devel | |
1cefa9cb | 73 | OpenSC development files. |
896b833c | 74 | |
8623b75b JR |
75 | %description devel -l pl.UTF-8 |
76 | Pliki dla programistów używających OpenSC. | |
896b833c | 77 | |
78 | %package static | |
455ac4e7 JB |
79 | Summary: Static OpenSC library |
80 | Summary(pl.UTF-8): Bibloteka statyczna OpenSC | |
896b833c | 81 | Group: Development/Tools |
46bcb391 | 82 | Requires: %{name}-devel = %{version}-%{release} |
896b833c | 83 | |
84 | %description static | |
455ac4e7 | 85 | Static OpenSC library. |
896b833c | 86 | |
8623b75b | 87 | %description static -l pl.UTF-8 |
455ac4e7 | 88 | Biblioteka statyczna OpenSC. |
d6f32863 | 89 | |
47359102 JB |
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} | |
95 | ||
96 | %description -n bash-completion-opensc | |
97 | Bash completion for OpenSC commands. | |
98 | ||
99 | %description -n bash-completion-opensc -l pl.UTF-8 | |
100 | Bashowe uzupełnianie parametrów poleceń OpenSC. | |
101 | ||
896b833c | 102 | %prep |
1cefa9cb | 103 | %setup -q |
2504dc81 | 104 | |
896b833c | 105 | %build |
1cefa9cb | 106 | %{__libtoolize} |
c28ca417 | 107 | %{__aclocal} -I m4 |
1cefa9cb | 108 | %{__autoconf} |
ac174bda | 109 | %{__autoheader} |
1cefa9cb | 110 | %{__automake} |
d6f32863 | 111 | %configure \ |
455ac4e7 JB |
112 | %{?with_openct:--enable-openct --disable-pcsc} \ |
113 | %{!?with_openct:--enable-pcsc --disable-openct} \ | |
46bcb391 | 114 | %{!?with_openpace:--disable-openpace} \ |
80bde4f7 | 115 | --disable-silent-rules \ |
455ac4e7 JB |
116 | --enable-doc \ |
117 | --with-pcsc-provider=%{_libdir}/libpcsclite.so.1 | |
896b833c | 118 | |
1cefa9cb | 119 | %{__make} |
896b833c | 120 | |
121 | %install | |
122 | rm -rf $RPM_BUILD_ROOT | |
3d10579f | 123 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_libdir}/pkcs11} |
70be04b7 | 124 | |
3d10579f | 125 | %{__make} install \ |
47359102 JB |
126 | DESTDIR=$RPM_BUILD_ROOT \ |
127 | completiondir=/etc/bash_completion.d | |
896b833c | 128 | |
455ac4e7 | 129 | # not needed (dlopened by soname) |
ef886f95 | 130 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc-pkcs11,opensc-pkcs11,pkcs11-spy}.la |
46bcb391 | 131 | # API not exported |
ef886f95 | 132 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{opensc,smm-local}.la |
61f848e8 | 133 | |
53aad453 | 134 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
0a3c046b | 135 | |
896b833c | 136 | %clean |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | ||
1cefa9cb JB |
139 | %post -p /sbin/ldconfig |
140 | %postun -p /sbin/ldconfig | |
896b833c | 141 | |
142 | %files | |
143 | %defattr(644,root,root,755) | |
112cff34 | 144 | %doc NEWS README doc/tools/tools.html |
d9747ba8 | 145 | %attr(755,root,root) %{_bindir}/cardos-tool |
1cefa9cb | 146 | %attr(755,root,root) %{_bindir}/cryptoflex-tool |
ef886f95 | 147 | %attr(755,root,root) %{_bindir}/dnie-tool |
8d087e90 | 148 | %attr(755,root,root) %{_bindir}/eidenv |
112cff34 | 149 | %attr(755,root,root) %{_bindir}/gids-tool |
4f1bc56e | 150 | %attr(755,root,root) %{_bindir}/iasecc-tool |
8d087e90 | 151 | %attr(755,root,root) %{_bindir}/netkey-tool |
46bcb391 | 152 | %attr(755,root,root) %{_bindir}/npa-tool |
4f1bc56e | 153 | %attr(755,root,root) %{_bindir}/openpgp-tool |
1cefa9cb JB |
154 | %attr(755,root,root) %{_bindir}/opensc-explorer |
155 | %attr(755,root,root) %{_bindir}/opensc-tool | |
88647e66 | 156 | %attr(755,root,root) %{_bindir}/piv-tool |
61f848e8 | 157 | %attr(755,root,root) %{_bindir}/pkcs11-tool |
455ac4e7 JB |
158 | %attr(755,root,root) %{_bindir}/pkcs15-crypt |
159 | %attr(755,root,root) %{_bindir}/pkcs15-init | |
160 | %attr(755,root,root) %{_bindir}/pkcs15-tool | |
4f1bc56e | 161 | %attr(755,root,root) %{_bindir}/sc-hsm-tool |
c9f4880d | 162 | %attr(755,root,root) %{_bindir}/westcos-tool |
c39ac2c0 | 163 | %attr(755,root,root) %{_libdir}/libopensc.so.*.*.* |
46bcb391 | 164 | %attr(755,root,root) %ghost %{_libdir}/libopensc.so.5 |
ef886f95 | 165 | %attr(755,root,root) %{_libdir}/libsmm-local.so.*.*.* |
46bcb391 | 166 | %attr(755,root,root) %ghost %{_libdir}/libsmm-local.so.5 |
c28ca417 | 167 | # PKCS11 modules |
ef886f95 | 168 | %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so |
2f74c13c | 169 | %attr(755,root,root) %{_libdir}/opensc-pkcs11.so |
8d087e90 | 170 | %attr(755,root,root) %{_libdir}/pkcs11-spy.so |
ef886f95 | 171 | %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so |
c28ca417 JB |
172 | %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so |
173 | %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so | |
1cefa9cb | 174 | %dir %{_datadir}/opensc |
c9f4880d | 175 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc.conf |
4bdbfbe7 | 176 | %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile |
46bcb391 JB |
177 | %if %{with openpace} |
178 | /etc/eac/cvc/DESRCACC100001 | |
179 | %endif | |
d9747ba8 | 180 | %{_mandir}/man1/cardos-tool.1* |
61f848e8 | 181 | %{_mandir}/man1/cryptoflex-tool.1* |
47359102 | 182 | %{_mandir}/man1/dnie-tool.1* |
53aad453 | 183 | %{_mandir}/man1/eidenv.1* |
112cff34 | 184 | %{_mandir}/man1/gids-tool.1* |
4f1bc56e | 185 | %{_mandir}/man1/iasecc-tool.1* |
8d087e90 | 186 | %{_mandir}/man1/netkey-tool.1* |
46bcb391 | 187 | %{_mandir}/man1/npa-tool.1* |
4f1bc56e | 188 | %{_mandir}/man1/openpgp-tool.1* |
61f848e8 JB |
189 | %{_mandir}/man1/opensc-explorer.1* |
190 | %{_mandir}/man1/opensc-tool.1* | |
53aad453 | 191 | %{_mandir}/man1/piv-tool.1* |
92519f5f | 192 | %{_mandir}/man1/pkcs11-tool.1* |
455ac4e7 JB |
193 | %{_mandir}/man1/pkcs15-crypt.1* |
194 | %{_mandir}/man1/pkcs15-init.1* | |
195 | %{_mandir}/man1/pkcs15-tool.1* | |
4f1bc56e | 196 | %{_mandir}/man1/sc-hsm-tool.1* |
c9f4880d | 197 | %{_mandir}/man1/westcos-tool.1* |
c39ac2c0 | 198 | %{_mandir}/man5/pkcs15-profile.5* |
896b833c | 199 | |
200 | %files devel | |
201 | %defattr(644,root,root,755) | |
1cefa9cb | 202 | %attr(755,root,root) %{_libdir}/libopensc.so |
ef886f95 | 203 | %attr(755,root,root) %{_libdir}/libsmm-local.so |
46bcb391 | 204 | %{_pkgconfigdir}/opensc-pkcs11.pc |
896b833c | 205 | |
206 | %files static | |
207 | %defattr(644,root,root,755) | |
8d087e90 | 208 | %{_libdir}/libopensc.a |
47359102 JB |
209 | |
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 | |
112cff34 | 216 | /etc/bash_completion.d/gids-tool |
47359102 JB |
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 |