]>
Commit | Line | Data |
---|---|---|
88be3d4b JB |
1 | Summary: An Implementation of PKCS#11 (Cryptoki) v2.11 |
2 | Summary(pl.UTF-8): Implementacja PKCS#11 (Cryptoki) v2.11 | |
3 | Name: opencryptoki | |
aabc4c14 | 4 | Version: 3.4.1 |
88be3d4b JB |
5 | Release: 1 |
6 | License: CPL v0.5 | |
7 | Group: Applications/System | |
aabc4c14 JB |
8 | Source0: http://downloads.sourceforge.net/opencryptoki/%{name}-v%{version}.tgz |
9 | # Source0-md5: 100d587be68f299b1f196aba0e6e0b76 | |
10 | Patch0: %{name}-sh.patch | |
11 | Patch1: %{name}-noroot.patch | |
12 | Patch2: %{name}-notonlysystemd.patch | |
88be3d4b | 13 | URL: http://opencryptoki.sourceforge.net/ |
20a70d11 JB |
14 | BuildRequires: autoconf |
15 | BuildRequires: automake >= 1.6 | |
20a70d11 JB |
16 | %ifarch s390 s390x |
17 | BuildRequires: libica-devel >= 2.0 | |
18 | %endif | |
fb843822 JB |
19 | BuildRequires: libtool >= 2:2 |
20 | BuildRequires: openldap-devel | |
88be3d4b | 21 | BuildRequires: openssl-devel |
fb843822 | 22 | BuildRequires: rpmbuild(macros) >= 1.647 |
9381ad4d | 23 | BuildRequires: trousers-devel >= 0.2.9 |
fb843822 JB |
24 | Requires(post,preun): /sbin/chkconfig |
25 | Requires(post,preun,postun): systemd-units >= 38 | |
26 | Requires(postun): /usr/sbin/groupdel | |
27 | Requires(pre): /usr/bin/getgid | |
28 | Requires(pre): /usr/sbin/groupadd | |
88be3d4b | 29 | Requires: %{name}-libs = %{version}-%{release} |
fb843822 JB |
30 | Requires: rc-scripts |
31 | Requires: systemd-units >= 38 | |
32 | Provides: group(pkcs11) | |
aabc4c14 JB |
33 | Obsoletes: opencrytoki-module-aeptok |
34 | Obsoletes: opencrytoki-module-crtok | |
35 | Obsoletes: opencrytoki-module-bcomtok | |
88be3d4b JB |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
cb394d7c JB |
38 | %define skip_post_check_so .*%{_libdir}/opencryptoki/stdll/libpkcs11_.*\.so.* |
39 | ||
88be3d4b JB |
40 | %description |
41 | The openCryptoki package implements the PKCS#11 version 2.11: | |
42 | Cryptographic Token Interface Standard (Cryptoki). | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | Pakiet openCryptoki implementuje standard PKCS#11 w wersji 2.11: | |
46 | Cryptographic Token Interface Standard (Cryptoki). | |
47 | ||
48 | %package libs | |
49 | Summary: openCryptoki library | |
197d46d2 | 50 | Summary(pl.UTF-8): Biblioteka openCryptoki |
88be3d4b | 51 | Group: Libraries |
fb843822 | 52 | Requires: filesystem >= 4.0-28 |
88be3d4b JB |
53 | |
54 | %description libs | |
55 | The openCryptoki library implements the PKCS#11 version 2.11: | |
56 | Cryptographic Token Interface Standard (Cryptoki). | |
57 | ||
a0b6c671 | 58 | %description libs -l pl.UTF-8 |
88be3d4b JB |
59 | Biblioteka openCryptoki implementuje standard PKCS#11 w wersji 2.11: |
60 | Cryptographic Token Interface Standard (Cryptoki). | |
61 | ||
62 | %package devel | |
63 | Summary: Header files for openCryptoki library | |
64 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki openCryptoki | |
65 | Group: Development/Libraries | |
66 | Requires: %{name}-libs = %{version}-%{release} | |
20a70d11 | 67 | Obsoletes: opencryptoki-static |
88be3d4b JB |
68 | |
69 | %description devel | |
70 | Header files for openCryptoki library. | |
71 | ||
72 | %description devel -l pl.UTF-8 | |
73 | Pliki nagłówkowe biblioteki openCryptoki. | |
74 | ||
fb843822 JB |
75 | %package module-ccatok |
76 | Summary: CCA cryptographics devices (secure-key) support for openCryptoki | |
77 | Summary(pl.UTF-8): Obsługa urządzeń kryptograficznych ICA (z bezpiecznym kluczem) dla openCryptoki | |
78 | Group: Libraries | |
79 | Requires: %{name} = %{version}-%{release} | |
80 | ||
81 | %description module-ccatok | |
82 | This package brings the necessary libraries and files to support CCA | |
83 | devices in the openCryptoki stack. CCA is an interface to IBM | |
84 | cryptographic hardware such as IBM 4764 or 4765 that uses the | |
85 | "co-processor" or "secure-key" path. | |
86 | ||
87 | %description module-ccatok -l pl.UTF-8 | |
88 | Ten pakiet dostarcza biblioteki i pliki potrzebne do obsługi urządzeń | |
89 | kryptograficznych CCA w stosie openCryptoki. CCA to interfejs do | |
90 | sprzętu kryptograficznego firmy IBM, takiego jak IBM 4764 lub 4765, | |
91 | wykorzystującego "koprocesor" lub ścieżkę "bezpiecznego klucza". | |
92 | ||
fb843822 JB |
93 | %package module-icatok |
94 | Summary: ICA cryptographics devices (clear-key) support for openCryptoki | |
95 | Summary(pl.UTF-8): Obsługa urządzeń kryptograficznych ICA (z jawnym kluczem) dla openCryptoki | |
96 | Group: Libraries | |
97 | Requires: %{name} = %{version}-%{release} | |
98 | ||
99 | %description module-icatok | |
100 | This package brings the necessary libraries and files to support ICA | |
101 | devices in the openCryptoki stack. ICA is an interface to IBM | |
102 | cryptographic hardware such as IBM 4764 or 4765 that uses the | |
103 | "accelerator" or "clear-key" path. | |
104 | ||
105 | %description module-icatok -l pl.UTF-8 | |
106 | Ten pakiet dostarcza biblioteki i pliki potrzebne do obsługi urządzeń | |
107 | kryptograficznych ICA w stosie openCryptoki. ICA to interfejs do | |
108 | sprzętu kryptograficznego firmy IBM, takiego jak IBM 4764 lub 4765, | |
109 | wykorzystującego "akcelerator" lub ścieżkę "jawnego klucza". | |
110 | ||
111 | %package module-icsftok | |
112 | Summary: ICSF (Integrated Cryptographic Service Facility) token support for openCryptoki | |
113 | Summary(pl.UTF-8): Obsługa tokenów ICSF (Integrated Cryptographic Service Facility) dla openCryptoki | |
114 | Group: Libraries | |
115 | Requires: %{name} = %{version}-%{release} | |
116 | ||
117 | %description module-icsftok | |
118 | This package brings the necessary libraries and files to support ICSF | |
119 | (Integrated Cryptographic Service Facility) remote tokens in the | |
120 | openCryptoki stack. | |
121 | ||
122 | %description module-icsftok -l pl.UTF-8 | |
123 | Ten pakiet dostarcza biblioteki i pliki potrzebne do obsługi zdalnych | |
124 | tokenów ICSF (Integrated Cryptographic Service Facility) w stosie | |
125 | openCryptoki. | |
126 | ||
127 | %package module-swtok | |
128 | Summary: The software token implementation for openCryptoki | |
129 | Summary(pl.UTF-8): Programowa implementacja tokenu dla openCryptoki | |
130 | Group: Libraries | |
131 | Requires: %{name} = %{version}-%{release} | |
132 | ||
133 | %description module-swtok | |
134 | This package brings the software token implementation to use | |
135 | openCryptoki without any specific cryptographic hardware. | |
136 | ||
137 | %description module-swtok -l pl.UTF-8 | |
138 | Ten pakiet dostarcza programową implementację tokenu, pozwalającą | |
139 | używać openCryptoki bez żadnego specjalnego sprzętu kryptograficznego. | |
140 | ||
141 | %package module-tpmtok | |
142 | Summary: TPM (Trusted Platform Module) device support for openCryptoki | |
143 | Summary(pl.UTF-8): Obsługa urządzenia TPM (Trusted Platform Module) dla openCryptoki | |
144 | Group: Libraries | |
145 | Requires: %{name} = %{version}-%{release} | |
146 | ||
147 | %description module-tpmtok | |
148 | This package brings the necessary libraries and files to support TPM | |
149 | (Trusted Platform Module) devices in the openCryptoki stack. | |
150 | ||
151 | %description module-tpmtok -l pl.UTF-8 | |
152 | Ten pakiet dostarcza biblioteki oraz pliki potrzebne do obsługi | |
153 | urządzeń TPM (Trusted Platform Module) w stosie openCryptoki. | |
154 | ||
155 | ||
88be3d4b | 156 | %prep |
fb843822 | 157 | %setup -q -n %{name} |
9381ad4d | 158 | %patch0 -p1 |
20a70d11 JB |
159 | %patch1 -p1 |
160 | %patch2 -p1 | |
88be3d4b JB |
161 | |
162 | %build | |
20a70d11 JB |
163 | %{__libtoolize} |
164 | %{__aclocal} | |
165 | %{__autoconf} | |
166 | %{__automake} | |
88be3d4b | 167 | %configure \ |
20a70d11 JB |
168 | %ifarch s390 s390x |
169 | --enable-ccatok \ | |
aabc4c14 | 170 | --enable-ep11tok \ |
88be3d4b | 171 | --enable-icatok \ |
20a70d11 JB |
172 | %else |
173 | --disable-ccatok \ | |
aabc4c14 | 174 | --disable-ep11tok \ |
20a70d11 JB |
175 | --disable-icatok \ |
176 | %endif | |
fb843822 JB |
177 | --enable-tpmtok \ |
178 | --with-systemd=%{systemdunitdir} | |
88be3d4b JB |
179 | |
180 | %{__make} | |
181 | ||
182 | %install | |
183 | rm -rf $RPM_BUILD_ROOT | |
184 | ||
185 | %{__make} install \ | |
186 | DESTDIR=$RPM_BUILD_ROOT \ | |
187 | initdir=/etc/rc.d/init.d | |
188 | ||
20a70d11 | 189 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/opencryptoki/stdll/*.la |
aabc4c14 JB |
190 | %ifnarch s390 s390x |
191 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{pkcscca,pkcsep11_migrate}.1 | |
192 | %endif | |
88be3d4b JB |
193 | |
194 | %clean | |
195 | rm -rf $RPM_BUILD_ROOT | |
196 | ||
fb843822 JB |
197 | %pre |
198 | %groupadd -g 110 pkcs11 | |
199 | ||
200 | %post | |
201 | /sbin/chkconfig --add pkcsslotd | |
202 | %service pkcsslotd restart | |
203 | %systemd_post pkcsslotd.service | |
204 | ||
205 | %preun | |
206 | %systemd_preun pkcsslotd.service | |
207 | if [ "$1" = "0" ]; then | |
208 | %service -q pkcsslotd stop | |
209 | /sbin/chkconfig --del pkcsslotd | |
210 | fi | |
211 | ||
212 | %postun | |
213 | %systemd_reload | |
214 | if [ "$1" = "0" ]; then | |
215 | %groupremove pkcs11 | |
216 | fi | |
217 | ||
218 | %post libs -p /sbin/ldconfig | |
219 | %postun libs -p /sbin/ldconfig | |
88be3d4b JB |
220 | |
221 | %files | |
222 | %defattr(644,root,root,755) | |
fb843822 | 223 | %doc AUTHORS COPYRIGHTS ChangeLog FAQ LICENSE README TODO doc/{README.token_data,openCryptoki-HOWTO.pdf} |
88be3d4b | 224 | %attr(755,root,root) %{_sbindir}/pkcsconf |
fb843822 | 225 | %attr(755,root,root) %{_sbindir}/pkcsicsf |
88be3d4b | 226 | %attr(755,root,root) %{_sbindir}/pkcsslotd |
88be3d4b JB |
227 | %{_libdir}/opencryptoki/methods |
228 | %{_libdir}/pkcs11/methods | |
fb843822 JB |
229 | %dir %{_sysconfdir}/opencryptoki |
230 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opencryptoki/opencryptoki.conf | |
231 | %attr(754,root,root) /etc/rc.d/init.d/pkcsslotd | |
232 | %{systemdunitdir}/pkcsslotd.service | |
233 | %dir /var/lib/opencryptoki | |
234 | %attr(770,root,pkcs11) %dir /var/lock/opencryptoki | |
9381ad4d | 235 | %{_mandir}/man1/pkcsconf.1* |
fb843822 JB |
236 | %{_mandir}/man1/pkcsicsf.1* |
237 | %{_mandir}/man5/opencryptoki.conf.5* | |
9381ad4d JB |
238 | %{_mandir}/man7/opencryptoki.7* |
239 | %{_mandir}/man8/pkcsslotd.8* | |
88be3d4b JB |
240 | |
241 | %files libs | |
242 | %defattr(644,root,root,755) | |
243 | /etc/ld.so.conf.d/opencryptoki-*.conf | |
244 | %dir %{_libdir}/opencryptoki | |
fb843822 JB |
245 | %attr(755,root,root) %{_libdir}/opencryptoki/libopencryptoki.so.*.*.* |
246 | %attr(755,root,root) %ghost %{_libdir}/opencryptoki/libopencryptoki.so.0 | |
247 | # symlinked as pkcs11 module, so it's here not in -devel | |
248 | %attr(755,root,root) %{_libdir}/opencryptoki/libopencryptoki.so | |
88be3d4b JB |
249 | %attr(755,root,root) %{_libdir}/opencryptoki/PKCS11_API.so |
250 | %dir %{_libdir}/opencryptoki/stdll | |
88be3d4b JB |
251 | %attr(755,root,root) %{_libdir}/pkcs11/libopencryptoki.so |
252 | %attr(755,root,root) %{_libdir}/pkcs11/PKCS11_API.so | |
253 | %{_libdir}/pkcs11/stdll | |
254 | ||
255 | %files devel | |
256 | %defattr(644,root,root,755) | |
257 | %{_libdir}/opencryptoki/libopencryptoki.la | |
258 | %{_includedir}/opencryptoki | |
fb843822 | 259 | |
fb843822 JB |
260 | %ifarch s390 s390x |
261 | %files module-ccatok | |
262 | %defattr(644,root,root,755) | |
aabc4c14 | 263 | %doc doc/{README-IBM_CCA_users,README.cca_stdll,README.pkcscca_migrate} |
56396f3b JB |
264 | %attr(755,root,root) %{_sbindir}/pkcscca_migrate |
265 | %attr(755,root,root) %{_sbindir}/pkcscca_migrate.sh | |
fb843822 JB |
266 | %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_cca.so* |
267 | %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_CCA.so | |
aabc4c14 JB |
268 | %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/ccatok |
269 | %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/ccatok/TOK_OBJ | |
270 | %attr(770,root,pkcs11) %dir /var/lock/opencryptoki/ccatok | |
271 | %{_mandir}/man1/pkcscca.1* | |
fb843822 JB |
272 | %endif |
273 | ||
aabc4c14 JB |
274 | %ifarch s390 s390x |
275 | %files module-ep11tok | |
fb843822 | 276 | %defattr(644,root,root,755) |
aabc4c14 JB |
277 | %doc doc/README.ep11_stdll |
278 | %attr(755,root,root) %{_sbindir}/pkcsep11_migrate | |
279 | %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_ep11.so* | |
280 | %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_EP11.so | |
281 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opencryptoki/ep11tok.conf | |
282 | %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/ep11tok | |
283 | %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/ep11tok/TOK_OBJ | |
284 | %attr(770,root,pkcs11) %dir /var/lock/opencryptoki/ep11tok | |
285 | %{_mandir}/man1/pkcsep11_migrate.1* | |
fb843822 JB |
286 | %endif |
287 | ||
288 | %ifarch s390 s390x | |
289 | %files module-icatok | |
290 | %defattr(644,root,root,755) | |
291 | %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_ica.so* | |
292 | %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_ICA.so | |
aabc4c14 JB |
293 | %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/lite |
294 | %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/lite/TOK_OBJ | |
295 | %attr(770,root,pkcs11) %dir /var/lock/opencryptoki/lite | |
fb843822 JB |
296 | %endif |
297 | ||
298 | %files module-icsftok | |
299 | %defattr(644,root,root,755) | |
300 | %doc doc/README.icsf_stdll | |
301 | %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_icsf.so* | |
302 | %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_ICSF.so | |
303 | %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/icsf | |
304 | %attr(770,root,pkcs11) %dir /var/lock/opencryptoki/icsf | |
305 | ||
306 | %files module-swtok | |
307 | %defattr(644,root,root,755) | |
308 | %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_sw.so* | |
309 | %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_SW.so | |
310 | %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/swtok | |
311 | %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/swtok/TOK_OBJ | |
312 | %attr(770,root,pkcs11) %dir /var/lock/opencryptoki/swtok | |
313 | ||
314 | %files module-tpmtok | |
315 | %defattr(644,root,root,755) | |
316 | %doc doc/README.tpm_stdll | |
317 | %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_tpm.so* | |
318 | %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_TPM.so | |
319 | %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/tpm | |
320 | %attr(770,root,pkcs11) %dir /var/lock/opencryptoki/tpm |