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