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