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