]> git.pld-linux.org Git - packages/opencryptoki.git/blob - opencryptoki.spec
728c22f63e4617343afd3157617363b4ccd2157a
[packages/opencryptoki.git] / opencryptoki.spec
1 #
2 # Conditional build:
3 %bcond_without  aep     # AEP Crypto Accelerator support
4 %bcond_without  bcom    # Broadcom Crypto Accelerator support
5 %bcond_with     corrent # Corrent Crypto Accelerator support [BR: libsocketarmor/typhoon.h; probably no longer available]
6 %bcond_with     pkcscca # CCA token key migration tool [BR: xcryptolinz, s390x arch]
7 #
8 Summary:        An Implementation of PKCS#11 (Cryptoki) v2.11
9 Summary(pl.UTF-8):      Implementacja PKCS#11 (Cryptoki) v2.11
10 Name:           opencryptoki
11 Version:        3.0
12 Release:        1
13 License:        CPL v0.5
14 Group:          Applications/System
15 Source0:        http://downloads.sourceforge.net/opencryptoki/%{name}-v%{version}.tar.gz
16 # Source0-md5:  ec4e2a196c8a336d400d3b17288260af
17 Patch0:         %{name}-ica.patch
18 Patch1:         %{name}-sh.patch
19 Patch2:         %{name}-bcom.patch
20 Patch3:         %{name}-aep.patch
21 Patch4:         %{name}-format.patch
22 Patch5:         %{name}-noroot.patch
23 Patch6:         %{name}-notonlysystemd.patch
24 URL:            http://opencryptoki.sourceforge.net/
25 %{?with_aep:BuildRequires:      aep1000-devel}
26 BuildRequires:  autoconf
27 BuildRequires:  automake >= 1.6
28 %{?with_bcom:BuildRequires:     bcm5820-devel}
29 %ifarch s390 s390x
30 BuildRequires:  libica-devel >= 2.0
31 %endif
32 BuildRequires:  libtool >= 2:2
33 BuildRequires:  openldap-devel
34 BuildRequires:  openssl-devel
35 BuildRequires:  rpmbuild(macros) >= 1.647
36 BuildRequires:  trousers-devel >= 0.2.9
37 %if %{with pkcscca}
38 # from http://www-03.ibm.com/security/cryptocards/pcixcc/ordersoftware.shtml :
39 # http://www-03.ibm.com/security/cryptocards/dwnlds/xcryptolinzGA-3.28-rc08.s390x.rpm
40 BuildRequires:  xcryptolinzGA
41 %endif
42 Requires(post,preun):   /sbin/chkconfig
43 Requires(post,preun,postun):    systemd-units >= 38
44 Requires(postun):       /usr/sbin/groupdel
45 Requires(pre):  /usr/bin/getgid
46 Requires(pre):  /usr/sbin/groupadd
47 Requires:       %{name}-libs = %{version}-%{release}
48 Requires:       rc-scripts
49 Requires:       systemd-units >= 38
50 Provides:       group(pkcs11)
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %define         skip_post_check_so      .*%{_libdir}/opencryptoki/stdll/libpkcs11_.*\.so.*
54
55 %description
56 The openCryptoki package implements the PKCS#11 version 2.11:
57 Cryptographic Token Interface Standard (Cryptoki).
58
59 %description -l pl.UTF-8
60 Pakiet openCryptoki implementuje standard PKCS#11 w wersji 2.11:
61 Cryptographic Token Interface Standard (Cryptoki).
62
63 %package libs
64 Summary:        openCryptoki library
65 Summary(pl.UTF-8):      Biblioteka openCryptoki
66 Group:          Libraries
67 Requires:       filesystem >= 4.0-28
68
69 %description libs
70 The openCryptoki library implements the PKCS#11 version 2.11:
71 Cryptographic Token Interface Standard (Cryptoki).
72
73 %description libs -l pl.UTF-8
74 Biblioteka openCryptoki implementuje standard PKCS#11 w wersji 2.11:
75 Cryptographic Token Interface Standard (Cryptoki).
76
77 %package devel
78 Summary:        Header files for openCryptoki library
79 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki openCryptoki
80 Group:          Development/Libraries
81 Requires:       %{name}-libs = %{version}-%{release}
82 Obsoletes:      opencryptoki-static
83
84 %description devel
85 Header files for openCryptoki library.
86
87 %description devel -l pl.UTF-8
88 Pliki nagłówkowe biblioteki openCryptoki.
89
90 %package module-aeptok
91 Summary:        AEP Crypto Accelerator support for openCryptoki
92 Summary(pl.UTF-8):      Obsługa urządzeń AEP Crypto Accelerator dla openCryptoki
93 Group:          Libraries
94 Requires:       %{name} = %{version}-%{release}
95
96 %description module-aeptok
97 This package brings the necessary libraries and files to support AEP
98 Crypto Accelerator devices in the openCryptoki stack.
99
100 %description module-aeptok -l pl.UTF-8
101 Ten pakiet dostarcza biblioteki i pliki potrzebne do obsługi urządzeń
102 kryptograficznych AEP Crypto Accelerator w stosie openCryptoki.
103
104 %package module-bcomtok
105 Summary:        Broadcom Crypto Accelerator support for openCryptoki
106 Summary(pl.UTF-8):      Obsługa urządzeń Broadcom Crypto Accelerator dla openCryptoki
107 Group:          Libraries
108 Requires:       %{name} = %{version}-%{release}
109
110 %description module-bcomtok
111 This package brings the necessary libraries and files to support
112 Broadcom Crypto Accelerator devices in the openCryptoki stack.
113
114 %description module-bcomtok -l pl.UTF-8
115 Ten pakiet dostarcza biblioteki i pliki potrzebne do obsługi urządzeń
116 kryptograficznych Broadcom Crypto Accelerator w stosie openCryptoki.
117
118 %package module-ccatok
119 Summary:        CCA cryptographics devices (secure-key) support for openCryptoki
120 Summary(pl.UTF-8):      Obsługa urządzeń kryptograficznych ICA (z bezpiecznym kluczem) dla openCryptoki
121 Group:          Libraries
122 Requires:       %{name} = %{version}-%{release}
123
124 %description module-ccatok
125 This package brings the necessary libraries and files to support CCA
126 devices in the openCryptoki stack. CCA is an interface to IBM
127 cryptographic hardware such as IBM 4764 or 4765 that uses the
128 "co-processor" or "secure-key" path.
129
130 %description module-ccatok -l pl.UTF-8
131 Ten pakiet dostarcza biblioteki i pliki potrzebne do obsługi urządzeń
132 kryptograficznych CCA w stosie openCryptoki. CCA to interfejs do
133 sprzętu kryptograficznego firmy IBM, takiego jak IBM 4764 lub 4765,
134 wykorzystującego "koprocesor" lub ścieżkę "bezpiecznego klucza".
135
136 %package module-crtok
137 Summary:        Corrent Crypto Accelerator support for openCryptoki
138 Summary(pl.UTF-8):      Obsługa urządzeń Corrent Crypto Accelerator dla openCryptoki
139 Group:          Libraries
140 Requires:       %{name} = %{version}-%{release}
141
142 %description module-crtok
143 This package brings the necessary libraries and files to support
144 Corrent Crypto Accelerator devices in the openCryptoki stack.
145
146 %description module-crtok -l pl.UTF-8
147 Ten pakiet dostarcza biblioteki i pliki potrzebne do obsługi urządzeń
148 kryptograficznych Corrent Crypto Accelerator w stosie openCryptoki.
149
150 %package module-icatok
151 Summary:        ICA cryptographics devices (clear-key) support for openCryptoki
152 Summary(pl.UTF-8):      Obsługa urządzeń kryptograficznych ICA (z jawnym kluczem) dla openCryptoki
153 Group:          Libraries
154 Requires:       %{name} = %{version}-%{release}
155
156 %description module-icatok
157 This package brings the necessary libraries and files to support ICA
158 devices in the openCryptoki stack. ICA is an interface to IBM
159 cryptographic hardware such as IBM 4764 or 4765 that uses the
160 "accelerator" or "clear-key" path.
161
162 %description module-icatok -l pl.UTF-8
163 Ten pakiet dostarcza biblioteki i pliki potrzebne do obsługi urządzeń
164 kryptograficznych ICA w stosie openCryptoki. ICA to interfejs do
165 sprzętu kryptograficznego firmy IBM, takiego jak IBM 4764 lub 4765,
166 wykorzystującego "akcelerator" lub ścieżkę "jawnego klucza".
167
168 %package module-icsftok
169 Summary:        ICSF (Integrated Cryptographic Service Facility) token support for openCryptoki
170 Summary(pl.UTF-8):      Obsługa tokenów ICSF (Integrated Cryptographic Service Facility) dla openCryptoki
171 Group:          Libraries
172 Requires:       %{name} = %{version}-%{release}
173
174 %description module-icsftok
175 This package brings the necessary libraries and files to support ICSF
176 (Integrated Cryptographic Service Facility) remote tokens in the
177 openCryptoki stack.
178
179 %description module-icsftok -l pl.UTF-8
180 Ten pakiet dostarcza biblioteki i pliki potrzebne do obsługi zdalnych
181 tokenów ICSF (Integrated Cryptographic Service Facility) w stosie
182 openCryptoki.
183
184 %package module-swtok
185 Summary:        The software token implementation for openCryptoki
186 Summary(pl.UTF-8):      Programowa implementacja tokenu dla openCryptoki
187 Group:          Libraries
188 Requires:       %{name} = %{version}-%{release}
189
190 %description module-swtok
191 This package brings the software token implementation to use
192 openCryptoki without any specific cryptographic hardware.
193
194 %description module-swtok -l pl.UTF-8
195 Ten pakiet dostarcza programową implementację tokenu, pozwalającą
196 używać openCryptoki bez żadnego specjalnego sprzętu kryptograficznego.
197
198 %package module-tpmtok
199 Summary:        TPM (Trusted Platform Module) device support for openCryptoki
200 Summary(pl.UTF-8):      Obsługa urządzenia TPM (Trusted Platform Module) dla openCryptoki
201 Group:          Libraries
202 Requires:       %{name} = %{version}-%{release}
203
204 %description module-tpmtok
205 This package brings the necessary libraries and files to support TPM
206 (Trusted Platform Module) devices in the openCryptoki stack.
207
208 %description module-tpmtok -l pl.UTF-8
209 Ten pakiet dostarcza biblioteki oraz pliki potrzebne do obsługi
210 urządzeń TPM (Trusted Platform Module) w stosie openCryptoki.
211
212
213 %prep
214 %setup -q -n %{name}
215 %patch0 -p1
216 %patch1 -p1
217 %patch2 -p1
218 %patch3 -p1
219 %patch4 -p1
220 %patch5 -p1
221 %patch6 -p1
222
223 %build
224 %{__libtoolize}
225 %{__aclocal}
226 %{__autoconf}
227 %{__automake}
228 %configure \
229         %{!?with_aep:--disable-aeptok} \
230         %{!?with_bcom:--disable-bcomtok} \
231         %{!?with_corrent:--disable-crtok} \
232 %ifarch s390 s390x
233         --enable-ccatok \
234         --enable-icatok \
235 %else
236         --disable-ccatok \
237         --disable-icatok \
238 %endif
239         %{!?with_pkcsccs:--disable-pkcscca-migrate} \
240         --enable-tpmtok \
241         --with-systemd=%{systemdunitdir}
242 # icctok (PCICC) not supported on Linux (only AIX, Windows, OS/2)
243
244 %{__make}
245
246 %install
247 rm -rf $RPM_BUILD_ROOT
248
249 %{__make} install \
250         DESTDIR=$RPM_BUILD_ROOT \
251         initdir=/etc/rc.d/init.d
252
253 %{__rm} $RPM_BUILD_ROOT%{_libdir}/opencryptoki/stdll/*.la
254
255 %clean
256 rm -rf $RPM_BUILD_ROOT
257
258 %pre
259 %groupadd -g 110 pkcs11
260
261 %post
262 /sbin/chkconfig --add pkcsslotd
263 %service pkcsslotd restart
264 %systemd_post pkcsslotd.service
265
266 %preun
267 %systemd_preun pkcsslotd.service
268 if [ "$1" = "0" ]; then
269         %service -q pkcsslotd stop
270         /sbin/chkconfig --del pkcsslotd
271 fi
272
273 %postun
274 %systemd_reload
275 if [ "$1" = "0" ]; then
276         %groupremove pkcs11
277 fi
278
279 %post   libs -p /sbin/ldconfig
280 %postun libs -p /sbin/ldconfig
281
282 %files
283 %defattr(644,root,root,755)
284 %doc AUTHORS COPYRIGHTS ChangeLog FAQ LICENSE README TODO doc/{README.token_data,openCryptoki-HOWTO.pdf}
285 %attr(755,root,root) %{_sbindir}/pkcsconf
286 %attr(755,root,root) %{_sbindir}/pkcsicsf
287 %attr(755,root,root) %{_sbindir}/pkcsslotd
288 %{_libdir}/opencryptoki/methods
289 %{_libdir}/pkcs11/methods
290 %dir %{_sysconfdir}/opencryptoki
291 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opencryptoki/opencryptoki.conf
292 %attr(754,root,root) /etc/rc.d/init.d/pkcsslotd
293 %{systemdunitdir}/pkcsslotd.service
294 %dir /var/lib/opencryptoki
295 %attr(770,root,pkcs11) %dir /var/lock/opencryptoki
296 %{_mandir}/man1/pkcsconf.1*
297 %{_mandir}/man1/pkcsicsf.1*
298 %{_mandir}/man5/opencryptoki.conf.5*
299 %{_mandir}/man7/opencryptoki.7*
300 %{_mandir}/man8/pkcsslotd.8*
301
302 %files libs
303 %defattr(644,root,root,755)
304 /etc/ld.so.conf.d/opencryptoki-*.conf
305 %dir %{_libdir}/opencryptoki
306 %attr(755,root,root) %{_libdir}/opencryptoki/libopencryptoki.so.*.*.*
307 %attr(755,root,root) %ghost %{_libdir}/opencryptoki/libopencryptoki.so.0
308 # symlinked as pkcs11 module, so it's here not in -devel
309 %attr(755,root,root) %{_libdir}/opencryptoki/libopencryptoki.so
310 %attr(755,root,root) %{_libdir}/opencryptoki/PKCS11_API.so
311 %dir %{_libdir}/opencryptoki/stdll
312 %attr(755,root,root) %{_libdir}/pkcs11/libopencryptoki.so
313 %attr(755,root,root) %{_libdir}/pkcs11/PKCS11_API.so
314 %{_libdir}/pkcs11/stdll
315
316 %files devel
317 %defattr(644,root,root,755)
318 %{_libdir}/opencryptoki/libopencryptoki.la
319 %{_includedir}/opencryptoki
320
321 %if %{with aep}
322 %files module-aeptok
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_aep.so*
325 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_AEP.so
326 %endif
327
328 %if %{with bcom}
329 %files module-bcomtok
330 %defattr(644,root,root,755)
331 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_bc.so*
332 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_BC.so
333 %endif
334
335 %ifarch s390 s390x
336 %files module-ccatok
337 %defattr(644,root,root,755)
338 %doc doc/{README-IBM_CCA_users,README.cca_stdll} %{?with_pkcscca:doc/README.pkcscca_migrate}
339 %if %{with pkcscca}
340 %attr(755,root,root) %{_sbindir}/pkcscca_migrate
341 %attr(755,root,root) %{_sbindir}/pkcscca_migrate.sh
342 %endif
343 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_cca.so*
344 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_CCA.so
345 %endif
346
347 %if %{with corrent}
348 %files module-crtok
349 %defattr(644,root,root,755)
350 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_cr.so*
351 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_CR.so
352 %endif
353
354 %ifarch s390 s390x
355 %files module-icatok
356 %defattr(644,root,root,755)
357 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_ica.so*
358 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_ICA.so
359 %endif
360
361 %files module-icsftok
362 %defattr(644,root,root,755)
363 %doc doc/README.icsf_stdll
364 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_icsf.so*
365 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_ICSF.so
366 %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/icsf
367 %attr(770,root,pkcs11) %dir /var/lock/opencryptoki/icsf
368
369 %files module-swtok
370 %defattr(644,root,root,755)
371 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_sw.so*
372 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_SW.so
373 %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/swtok
374 %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/swtok/TOK_OBJ
375 %attr(770,root,pkcs11) %dir /var/lock/opencryptoki/swtok
376
377 %files module-tpmtok
378 %defattr(644,root,root,755)
379 %doc doc/README.tpm_stdll
380 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/libpkcs11_tpm.so*
381 %attr(755,root,root) %{_libdir}/opencryptoki/stdll/PKCS11_TPM.so
382 %attr(770,root,pkcs11) %dir /var/lib/opencryptoki/tpm
383 %attr(770,root,pkcs11) %dir /var/lock/opencryptoki/tpm
This page took 0.041156 seconds and 2 git commands to generate.