]> git.pld-linux.org Git - packages/openssl.git/blob - openssl.spec
- separated engines subpackage; makes it possible to install openssl 1.0.0
[packages/openssl.git] / openssl.spec
1 #
2 # TODO: consider dropping last optflags.patch hunk and return to SOMAJOR (.so.1) sonames
3 #
4 # Conditional build:
5 %bcond_without  tests   # don't perform "make tests"
6 %bcond_with     purify  # Compile openssl with \-DPURIFY, useful when one wants to
7                         # use valgrind debugger against openssl-linked programs
8
9 %include        /usr/lib/rpm/macros.perl
10 Summary:        OpenSSL Toolkit libraries for the "Secure Sockets Layer" (SSL v2/v3)
11 Summary(de.UTF-8):      Secure Sockets Layer (SSL)-Kommunikationslibrary
12 Summary(es.UTF-8):      Biblioteca C que suministra algoritmos y protocolos criptográficos
13 Summary(fr.UTF-8):      Utilitaires de communication SSL (Secure Sockets Layer)
14 Summary(pl.UTF-8):      Biblioteki OpenSSL (SSL v2/v3)
15 Summary(pt_BR.UTF-8):   Uma biblioteca C que fornece vários algoritmos e protocolos criptográficos
16 Summary(ru.UTF-8):      Библиотеки и утилиты для соединений через Secure Sockets Layer
17 Summary(uk.UTF-8):      Бібліотеки та утиліти для з'єднань через Secure Sockets Layer
18 Name:           openssl
19 Version:        1.0.0
20 Release:        7
21 License:        Apache-like
22 Group:          Libraries
23 Source0:        ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
24 # Source0-md5:  89eaa86e25b2845f920ec00ae4c864ed
25 Source2:        %{name}.1.pl
26 Source3:        %{name}-ssl-certificate.sh
27 Source4:        %{name}-c_rehash.sh
28 Patch0:         %{name}-alpha-ccc.patch
29 Patch1:         %{name}-optflags.patch
30 Patch2:         %{name}-globalCA.diff
31 Patch3:         %{name}-include.patch
32 Patch4:         %{name}-man-namespace.patch
33 Patch5:         %{name}-asflag.patch
34 Patch6:         %{name}-ca-certificates.patch
35 Patch7:         %{name}-ldflags.patch
36 URL:            http://www.openssl.org/
37 BuildRequires:  bc
38 BuildRequires:  perl-devel >= 1:5.6.1
39 BuildRequires:  rpm-perlprov >= 4.1-13
40 BuildRequires:  rpmbuild(macros) >= 1.213
41 BuildRequires:  sed >= 4.0
42 Requires:       ca-certificates >= 20080809-4
43 Requires:       rpm-whiteout >= 1.7
44 Obsoletes:      SSLeay
45 Obsoletes:      SSLeay-devel
46 Obsoletes:      SSLeay-perl
47 Obsoletes:      libopenssl0
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
51 The OpenSSL Project is a collaborative effort to develop a robust,
52 commercial-grade, full-featured, and Open Source toolkit implementing
53 the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
54 v1) protocols with full-strength cryptography world-wide. The project
55 is managed by a worldwide community of volunteers that use the
56 Internet to communicate, plan, and develop the OpenSSL tookit and its
57 related documentation.
58
59 OpenSSL is based on the excellent SSLeay library developed by Eric A.
60 Young and Tim J. Hudson. The OpenSSL toolkit is licensed under an
61 Apache-style licence, which basically means that you are free to get
62 and use it for commercial and non-commercial purposes subject to some
63 simple license conditions.
64
65 This package contains shared libraries only, install openssl-tools if
66 you want to use openssl cmdline tool.
67
68 %description -l de.UTF-8
69 Openssl enthält das OpenSSL Zertifikatsmanagementtool und shared
70 libraries, die verschiedene Verschlüsselungs- und
71 Entschlüsselungsalgorithmen und -protokolle, wie DES, RC4, RSA und SSL
72 zur Verfügung stellen.
73
74 %description -l es.UTF-8
75 Biblioteca C que suministra algoritmos y protocolos criptográficos.
76
77 %description -l fr.UTF-8
78 OpenSSL est un outiil de gestion des certificats et les librairies
79 partagees qui fournit plusieurs protocoles et algorithmes de
80 codage/decodage, incluant DES, RC4, RSA et SSL.
81
82 %description -l pl.UTF-8
83 Implementacja protokołów kryptograficznych Secure Socket Layer (SSL)
84 v2/v3 oraz Transport Layer Security (TLS v1).
85
86 %description -l pt_BR.UTF-8
87 Uma biblioteca C que fornece vários algoritmos e protocolos
88 criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas
89 compartilhadas e utilitários.
90
91 %description -l ru.UTF-8
92 Программа openssl для работы с сертификатами и разделяемые библиотеки,
93 которые реализуют множетсво криптографических алгоритмов, включая DES,
94 RC4, RSA и SSL.
95
96 %description -l uk.UTF-8
97 Програма openssl для роботи з сертифікатами та бібліотеки спільного
98 користування, що реалізують велику кількість криптографічних
99 алгоритмів, включаючи DES, RC4, RSA та SSL.
100
101 %package engines
102 Summary:        OpenSSL optional crypto engines
103 Group:          Libraries
104 Requires:       %{name} = %{version}-%{release}
105
106 %description engines
107 With OpenSSL 0.9.6, a new component was added to support alternative
108 cryptography implementations, most commonly for interfacing with external
109 crypto devices (eg. accelerator cards). This component is called ENGINE.
110
111 There are currently built-in ENGINE implementations for the following
112 crypto devices:
113
114 - CryptoSwift
115 - Compaq Atalla
116 - nCipher CHIL
117 - Nuron
118 - Broadcom uBSec
119
120 In addition, dynamic binding to external ENGINE implementations is now
121 provided by a special ENGINE called "dynamic". 
122
123 %package tools
124 Summary:        OpenSSL command line tool and utilities
125 Summary(pl.UTF-8):      Zestaw narzędzi i skryptów
126 Group:          Applications/Communications
127 Requires:       %{name} = %{version}-%{release}
128 Requires:       which
129
130 %description tools
131 The OpenSSL Toolkit cmdline tool openssl and utility scripts.
132
133 %description tools -l pl.UTF-8
134 Zestaw narzędzi i skryptów wywoływanych z linii poleceń.
135
136 %package tools-perl
137 Summary:        OpenSSL utilities written in Perl
138 Summary(pl.UTF-8):      Narzędzia OpenSSL napisane w perlu
139 Group:          Applications/Communications
140 Requires:       %{name} = %{version}-%{release}
141
142 %description tools-perl
143 OpenSSL Toolkit tools written in Perl.
144
145 %description tools-perl -l pl.UTF-8
146 Narzędzia OpenSSL napisane w perlu.
147
148 %package devel
149 Summary:        Development part of OpenSSL Toolkit libraries
150 Summary(de.UTF-8):      Secure Sockets Layer Kommunikationslibrary: statische libraries+header
151 Summary(es.UTF-8):      Bibliotecas y archivos de inclusión para desarrollo OpenSSL
152 Summary(fr.UTF-8):      Librairies statiques, headers et utilitaires pour communication SSL
153 Summary(pl.UTF-8):      Część bibiloteki OpenSSL przeznaczona dla programistów
154 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento OpenSSL
155 Summary(ru.UTF-8):      Библиотеки, хедеры и утилиты для Secure Sockets Layer
156 Summary(uk.UTF-8):      Бібліотеки, хедери та утиліти для Secure Sockets Layer
157 Group:          Development/Libraries
158 Requires:       %{name} = %{version}-%{release}
159 Obsoletes:      libopenssl0-devel
160
161 %description devel
162 Development part of OpenSSL library.
163
164 %description devel -l es.UTF-8
165 Bibliotecas y archivos de inclusión para desarrollo OpenSSL
166
167 %description devel -l pl.UTF-8
168 Część biblioteki OpenSSL przeznaczona dla programistów.
169
170 %description devel -l pt_BR.UTF-8
171 Uma biblioteca C que fornece vários algoritmos e protocolos
172 criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas e
173 arquivos de inclusão para desenvolvimento.
174
175 %description devel -l ru.UTF-8
176 Программа openssl для работы с сертификатами и разделяемые библиотеки,
177 которые реализуют множетсво криптографических алгоритмов, включая DES,
178 RC4, RSA и SSL. Включает библиотеки и хедеры для разработки приложений
179 с использованием SSL.
180
181 %description devel -l uk.UTF-8
182 Програма openssl для роботи з сертифікатами та бібліотеки спільного
183 користування, що реалізують велику кількість криптографічних
184 алгоритмів, включаючи DES, RC4, RSA та SSL. Містить бібліотеки та
185 хедери для розробки програм з використанням SSL.
186
187 %package static
188 Summary:        Static OpenSSL libraries
189 Summary(pl.UTF-8):      Statyczne wersje bibliotek z OpenSSL
190 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para desenvolvimento com openssl
191 Summary(ru.UTF-8):      Статические библиотеки разработчика для OpenSSL
192 Summary(uk.UTF-8):      Статичні бібліотеки програміста для OpenSSL
193 Group:          Development/Libraries
194 Requires:       %{name}-devel = %{version}-%{release}
195
196 %description static
197 Static OpenSSL Toolkit libraries.
198
199 %description static -l pl.UTF-8
200 Statyczne wersje bibliotek z OpenSSL.
201
202 %description static -l pt_BR.UTF-8
203 Bibliotecas estáticas para desenvolvimento com openssl.
204
205 %description static -l ru.UTF-8
206 Программа openssl для работы с сертификатами и разделяемые библиотеки,
207 которые реализуют множетсво криптографических алгоритмов, включая DES,
208 RC4, RSA и SSL. Включает статические библиотеки для разработки
209 приложений с использованием OpenSSL.
210
211 %description static -l uk.UTF-8
212 Програма openssl для роботи з сертифікатами та бібліотеки спільного
213 користування, що реалізують велику кількість криптографічних
214 алгоритмів, включаючи DES, RC4, RSA та SSL. Містить статичні
215 бібліотеки для розробки програм з використанням SSL.
216
217 %prep
218 %setup -q
219 %patch0 -p1
220 %patch1 -p1
221 %patch2 -p1
222 %patch3 -p1
223 %patch4 -p1
224 %patch5 -p1
225 %patch6 -p1
226 %patch7 -p1
227
228 %{__perl} -pi -e 's#%{_prefix}/local/bin/perl#%{__perl}#g' \
229         `grep -l -r "%{_prefix}/local/bin/perl" *`
230
231 sed -i -e 's|\$prefix/\$libdir/engines|/%{_lib}/engines|g' Configure
232
233 %build
234 touch Makefile.*
235
236 %{__perl} util/perlpath.pl %{__perl}
237
238 OPTFLAGS="%{rpmcflags} %{?with_purify:-DPURIFY}" \
239 ./Configure \
240 %if "%{pld_release}" == "ti"
241         --openssldir=%{_var}/lib/%{name} \
242 %else
243         --openssldir=%{_sysconfdir}/%{name} \
244 %endif
245         --libdir=%{_lib} \
246         shared threads \
247         enable-tlsext \
248         enable-seed \
249         enable-rfc3779 \
250         enable-cms \
251         enable-idea \
252         enable-mdc2 \
253         enable-md2 \
254         enable-rc5 \
255 %ifarch %{ix86}
256 %ifarch i386
257         386 linux-elf
258 # ^- allow running on 80386 (default code uses bswapl available on i486+)
259 %else
260         linux-elf
261 %endif
262 %endif
263 %ifarch alpha
264         linux-alpha+bwx-gcc
265 %endif
266 %ifarch %{x8664}
267         linux-x86_64
268 %endif
269 %ifarch ia64
270         linux-ia64
271 %endif
272 %ifarch ppc
273         linux-ppc
274 %endif
275 %ifarch ppc64
276         linux-ppc64
277 %endif
278 %ifarch sparc
279         linux-sparcv8
280 %endif
281 %ifarch sparcv9
282         linux-sparcv9
283 %endif
284 %ifarch sparc64
285         linux64-sparcv9
286 %endif
287
288 %{__make} -j1 all rehash %{?with_tests:tests} \
289         CC="%{__cc}" \
290         ASFLAG='$(CFLAG) -Wa,--noexecstack' \
291         INSTALLTOP=%{_prefix}
292
293 # Rename POD sources of man pages. "openssl_" prefix is added to each
294 # manpage to avoid potential conflicts with other packages.
295
296 for dir in doc/{apps,ssl,crypto}; do
297         cd $dir || exit 1;
298         %{__perl} -pi -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
299
300         for pod in !(openssl*).pod; do
301                 mv -f $pod openssl_$pod;
302         done
303         cd ../..
304 done
305
306 %install
307 rm -rf $RPM_BUILD_ROOT
308 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_libdir}/%{name}} \
309         $RPM_BUILD_ROOT{%{_mandir}/{pl/man1,man{1,3,5,7}},%{_datadir}/ssl} \
310         $RPM_BUILD_ROOT/%{_lib}/engines \
311         $RPM_BUILD_ROOT%{_pkgconfigdir}
312
313 %{__make} install \
314         INSTALLTOP=%{_prefix} \
315         INSTALL_PREFIX=$RPM_BUILD_ROOT \
316         MANDIR=%{_mandir}
317
318 mv -f $RPM_BUILD_ROOT%{_libdir}/engines/* $RPM_BUILD_ROOT/%{_lib}/engines
319 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
320 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcrypto.*.*) $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
321 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libssl.*.*) $RPM_BUILD_ROOT%{_libdir}/libssl.so
322
323 %if "%{pld_release}" == "ti"
324 ln -sf %{_var}/lib/%{name}/%{name}.cnf \
325         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/openssl.cnf
326 ln -sf %{_var}/lib/%{name}/certs \
327         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/certs
328 ln -sf %{_var}/lib/%{name}/private \
329         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/private
330 mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
331 rm -rf $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc
332 %else
333 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
334 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc
335 %endif
336
337 # not installed as individual utilities (see openssl dgst instead)
338 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{md2,md4,md5,mdc2,ripemd160,sha,sha1}.1
339
340 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/pl/man1/openssl.1
341 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/ssl-certificate
342 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/c_rehash.sh
343
344 %clean
345 rm -rf $RPM_BUILD_ROOT
346
347 %post   -p /sbin/ldconfig
348 %postun -p /sbin/ldconfig
349
350 %triggerpostun -- %{name}-tools < 1.0.0-5
351 # the hashing format has changed in 1.0.0
352 [ ! -x %{_sbindir}/update-ca-certificates ] || %{_sbindir}/update-ca-certificates --fresh || :
353
354 %if "%{pld_release}" == "ti"
355 %triggerin -- %{name}-tools < 0.9.8i-2
356 if [ -L /var/lib/openssl/openssl.cnf ] ; then
357         echo "Saving old configuration as /var/lib/openssl/openssl.cnf.rpmsave"
358         rm /var/lib/openssl/openssl.cnf
359         mv %{_sysconfdir}/%{name}/openssl.cnf /var/lib/openssl/openssl.cnf.rpmsave 2>/dev/null || :
360 fi
361 %else
362 %triggerpostun -- %{name} < 0.9.8i-2
363 if [ -d /var/lib/openssl/certs ] ; then
364         mv /var/lib/openssl/certs/* %{_sysconfdir}/%{name}/certs 2>/dev/null || :
365 fi
366 if [ -d /var/lib/openssl/private ] ; then
367         mv /var/lib/openssl/private/* %{_sysconfdir}/%{name}/private 2>/dev/null || :
368 fi
369 if [ -d /var/lib/openssl ] ; then
370         for f in /var/lib/openssl/* ; do
371                 [ -f "$f" ] && mv "$f" %{_sysconfdir}/%{name} 2>/dev/null || :
372         done
373 fi
374 %endif
375
376 %files
377 %defattr(644,root,root,755)
378 %doc CHANGES CHANGES.SSLeay LICENSE NEWS README doc/*.txt
379 %doc doc/openssl_button.gif doc/openssl_button.html
380 %attr(755,root,root) /%{_lib}/libcrypto.so.*.*.*
381 %attr(755,root,root) /%{_lib}/libssl.so.*.*.*
382 %if "%{pld_release}" == "ti"
383 %dir %{_var}/lib/%{name}
384 %dir %{_var}/lib/%{name}/certs
385 %dir %{_var}/lib/%{name}/private
386 %dir %{_sysconfdir}/%{name}
387 %attr(755,root,root) %{_sysconfdir}/%{name}/certs
388 %attr(755,root,root) %{_sysconfdir}/%{name}/private
389 %else
390 %dir %{_sysconfdir}/%{name}
391 %dir %{_sysconfdir}/%{name}/certs
392 %dir %{_sysconfdir}/%{name}/private
393 %endif
394 %dir %{_datadir}/ssl
395
396 %files engines
397 %dir /%{_lib}/engines
398 %attr(755,root,root) /%{_lib}/engines/*.so
399
400 %files tools
401 %defattr(644,root,root,755)
402 %if "%{pld_release}" == "ti"
403 %{_sysconfdir}/%{name}/openssl.cnf
404 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/%{name}/openssl.cnf
405 %else
406 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/openssl.cnf
407 %endif
408 %attr(755,root,root) %{_bindir}/c_rehash.sh
409 %attr(755,root,root) %{_bindir}/openssl
410 %attr(754,root,root) %{_bindir}/ssl-certificate
411
412 %dir %{_libdir}/%{name}
413 %attr(755,root,root) %{_libdir}/%{name}/CA.sh
414 %attr(755,root,root) %{_libdir}/%{name}/c_hash
415 %attr(755,root,root) %{_libdir}/%{name}/c_info
416 %attr(755,root,root) %{_libdir}/%{name}/c_issuer
417 %attr(755,root,root) %{_libdir}/%{name}/c_name
418 %attr(755,root,root) %{_libdir}/%{name}/tsget
419
420 %{_mandir}/man1/openssl.1*
421 %{_mandir}/man1/openssl_asn1parse.1*
422 %{_mandir}/man1/openssl_ca.1*
423 %{_mandir}/man1/openssl_ciphers.1*
424 %{_mandir}/man1/openssl_cms.1*
425 %{_mandir}/man1/openssl_crl.1*
426 %{_mandir}/man1/openssl_crl2pkcs7.1*
427 %{_mandir}/man1/openssl_dgst.1*
428 %{_mandir}/man1/openssl_dhparam.1*
429 %{_mandir}/man1/openssl_dsa.1*
430 %{_mandir}/man1/openssl_dsaparam.1*
431 %{_mandir}/man1/openssl_ec.1*
432 %{_mandir}/man1/openssl_ecparam.1*
433 %{_mandir}/man1/openssl_enc.1*
434 %{_mandir}/man1/openssl_errstr.1*
435 %{_mandir}/man1/openssl_gendsa.1*
436 %{_mandir}/man1/openssl_genpkey.1*
437 %{_mandir}/man1/openssl_genrsa.1*
438 %{_mandir}/man1/openssl_nseq.1*
439 %{_mandir}/man1/openssl_ocsp.1*
440 %{_mandir}/man1/openssl_passwd.1*
441 %{_mandir}/man1/openssl_pkcs12.1*
442 %{_mandir}/man1/openssl_pkcs7.1*
443 %{_mandir}/man1/openssl_pkcs8.1*
444 %{_mandir}/man1/openssl_pkey.1*
445 %{_mandir}/man1/openssl_pkeyparam.1*
446 %{_mandir}/man1/openssl_pkeyutl.1*
447 %{_mandir}/man1/openssl_rand.1*
448 %{_mandir}/man1/openssl_req.1*
449 %{_mandir}/man1/openssl_rsa.1*
450 %{_mandir}/man1/openssl_rsautl.1*
451 %{_mandir}/man1/openssl_s_client.1*
452 %{_mandir}/man1/openssl_s_server.1*
453 %{_mandir}/man1/openssl_s_time.1*
454 %{_mandir}/man1/openssl_sess_id.1*
455 %{_mandir}/man1/openssl_smime.1*
456 %{_mandir}/man1/openssl_speed.1*
457 %{_mandir}/man1/openssl_spkac.1*
458 %{_mandir}/man1/openssl_ts.1*
459 %{_mandir}/man1/openssl_tsget.1*
460 %{_mandir}/man1/openssl_verify.1*
461 %{_mandir}/man1/openssl_version.1*
462 %{_mandir}/man1/openssl_x509.1*
463 %{_mandir}/man5/openssl_config.5*
464 %{_mandir}/man5/openssl_x509v3_config.5*
465 %lang(pl) %{_mandir}/pl/man1/openssl.1*
466
467 %files tools-perl
468 %defattr(644,root,root,755)
469 %attr(755,root,root) %{_bindir}/c_rehash
470 %attr(755,root,root) %{_libdir}/%{name}/CA.pl
471 %{_mandir}/man1/openssl_CA.pl.1*
472
473 %files devel
474 %defattr(644,root,root,755)
475 %attr(755,root,root) %{_libdir}/libcrypto.so
476 %attr(755,root,root) %{_libdir}/libssl.so
477 %{_includedir}/%{name}
478 %{_pkgconfigdir}/libcrypto.pc
479 %{_pkgconfigdir}/libssl.pc
480 %{_pkgconfigdir}/openssl.pc
481 %{_mandir}/man3/openssl*.3*
482 %{_mandir}/man7/openssl_des_modes.7*
483
484 %files static
485 %defattr(644,root,root,755)
486 %{_libdir}/lib*.a
This page took 0.075593 seconds and 4 git commands to generate.