]> git.pld-linux.org Git - packages/openssl.git/blob - openssl.spec
- enable tlsext
[packages/openssl.git] / openssl.spec
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
8 Summary:        OpenSSL Toolkit libraries for the "Secure Sockets Layer" (SSL v2/v3)
9 Summary(de.UTF-8):      Secure Sockets Layer (SSL)-Kommunikationslibrary
10 Summary(es.UTF-8):      Biblioteca C que suministra algoritmos y protocolos criptográficos
11 Summary(fr.UTF-8):      Utilitaires de communication SSL (Secure Sockets Layer)
12 Summary(pl.UTF-8):      Biblioteki OpenSSL (SSL v2/v3)
13 Summary(pt_BR.UTF-8):   Uma biblioteca C que fornece vários algoritmos e protocolos criptográficos
14 Summary(ru.UTF-8):      Библиотеки и утилиты для соединений через Secure Sockets Layer
15 Summary(uk.UTF-8):      Бібліотеки та утиліти для з'єднань через Secure Sockets Layer
16 Name:           openssl
17 Version:        0.9.8k
18 Release:        1
19 License:        Apache-like
20 Group:          Libraries
21 Source0:        ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
22 # Source0-md5:  e555c6d58d276aec7fdc53363e338ab3
23 Source2:        %{name}.1.pl
24 Source3:        %{name}-ssl-certificate.sh
25 Source4:        %{name}-c_rehash.sh
26 Patch0:         %{name}-alpha-ccc.patch
27 Patch1:         %{name}-optflags.patch
28 Patch2:         %{name}-globalCA.diff
29 Patch3:         %{name}-include.patch
30 Patch4:         %{name}-libvar.patch
31 Patch5:         %{name}-man-namespace.patch
32 Patch6:         %{name}-asflag.patch
33 Patch7:         %{name}-ca-certificates.patch
34 Patch8:         %{name}-fips_install.patch
35 URL:            http://www.openssl.org/
36 # problem with =< 1.0.0beta2
37 # Fixes should be in sourcecode
38 BuildRequires:  security(CVE-2009-1377)
39 BuildRequires:  security(CVE-2009-1378)
40 BuildRequires:  security(CVE-2009-1379)
41 ##
42 BuildRequires:  bc
43 BuildRequires:  perl-devel >= 1:5.6.1
44 BuildRequires:  rpm-perlprov >= 4.1-13
45 BuildRequires:  rpmbuild(macros) >= 1.213
46 BuildRequires:  sed >= 4.0
47 Obsoletes:      SSLeay
48 Obsoletes:      SSLeay-devel
49 Obsoletes:      SSLeay-perl
50 Obsoletes:      libopenssl0
51 Requires:       ca-certificates >= 20080809-4
52 Requires:       rpm-whiteout >= 1.7
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
56 The OpenSSL Project is a collaborative effort to develop a robust,
57 commercial-grade, full-featured, and Open Source toolkit implementing
58 the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
59 v1) protocols with full-strength cryptography world-wide. The project
60 is managed by a worldwide community of volunteers that use the
61 Internet to communicate, plan, and develop the OpenSSL tookit and its
62 related documentation.
63
64 OpenSSL is based on the excellent SSLeay library developed by Eric A.
65 Young and Tim J. Hudson. The OpenSSL toolkit is licensed under an
66 Apache-style licence, which basically means that you are free to get
67 and use it for commercial and non-commercial purposes subject to some
68 simple license conditions.
69
70 This package contains shared libraries only, install openssl-tools if
71 you want to use openssl cmdline tool.
72
73 %description -l de.UTF-8
74 Openssl enthält das OpenSSL Zertifikatsmanagementtool und shared
75 libraries, die verschiedene Verschlüsselungs- und
76 Entschlüsselungsalgorithmen und -protokolle, wie DES, RC4, RSA und SSL
77 zur Verfügung stellen.
78
79 %description -l es.UTF-8
80 Biblioteca C que suministra algoritmos y protocolos criptográficos.
81
82 %description -l fr.UTF-8
83 OpenSSL est un outiil de gestion des certificats et les librairies
84 partagees qui fournit plusieurs protocoles et algorithmes de
85 codage/decodage, incluant DES, RC4, RSA et SSL.
86
87 %description -l pl.UTF-8
88 Implementacja protokołów kryptograficznych Secure Socket Layer (SSL)
89 v2/v3 oraz Transport Layer Security (TLS v1).
90
91 %description -l pt_BR.UTF-8
92 Uma biblioteca C que fornece vários algoritmos e protocolos
93 criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas
94 compartilhadas e utilitários.
95
96 %description -l ru.UTF-8
97 Программа openssl для работы с сертификатами и разделяемые библиотеки,
98 которые реализуют множетсво криптографических алгоритмов, включая DES,
99 RC4, RSA и SSL.
100
101 %description -l uk.UTF-8
102 Програма openssl для роботи з сертифікатами та бібліотеки спільного
103 користування, що реалізують велику кількість криптографічних
104 алгоритмів, включаючи DES, RC4, RSA та SSL.
105
106 %package tools
107 Summary:        OpenSSL command line tool and utilities
108 Summary(pl.UTF-8):      Zestaw narzędzi i skryptów
109 Group:          Applications/Communications
110 Requires:       %{name} = %{version}-%{release}
111
112 %description tools
113 The OpenSSL Toolkit cmdline tool openssl and utility scripts.
114
115 %description tools -l pl.UTF-8
116 Zestaw narzędzi i skryptów wywoływanych z linii poleceń.
117
118 %package tools-perl
119 Summary:        OpenSSL utilities written in Perl
120 Summary(pl.UTF-8):      Narzędzia OpenSSL napisane w perlu
121 Group:          Applications/Communications
122 Requires:       %{name} = %{version}-%{release}
123
124 %description tools-perl
125 OpenSSL Toolkit tools written in Perl.
126
127 %description tools-perl -l pl.UTF-8
128 Narzędzia OpenSSL napisane w perlu.
129
130 %package devel
131 Summary:        Development part of OpenSSL Toolkit libraries
132 Summary(de.UTF-8):      Secure Sockets Layer Kommunikationslibrary: statische libraries+header
133 Summary(es.UTF-8):      Bibliotecas y archivos de inclusión para desarrollo OpenSSL
134 Summary(fr.UTF-8):      Librairies statiques, headers et utilitaires pour communication SSL
135 Summary(pl.UTF-8):      Część bibiloteki OpenSSL przeznaczona dla programistów
136 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento OpenSSL
137 Summary(ru.UTF-8):      Библиотеки, хедеры и утилиты для Secure Sockets Layer
138 Summary(uk.UTF-8):      Бібліотеки, хедери та утиліти для Secure Sockets Layer
139 Group:          Development/Libraries
140 Requires:       %{name} = %{version}-%{release}
141 Obsoletes:      libopenssl0-devel
142
143 %description devel
144 Development part of OpenSSL library.
145
146 %description devel -l es.UTF-8
147 Bibliotecas y archivos de inclusión para desarrollo OpenSSL
148
149 %description devel -l pl.UTF-8
150 Część biblioteki OpenSSL przeznaczona dla programistów.
151
152 %description devel -l pt_BR.UTF-8
153 Uma biblioteca C que fornece vários algoritmos e protocolos
154 criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas e
155 arquivos de inclusão para desenvolvimento.
156
157 %description devel -l ru.UTF-8
158 Программа openssl для работы с сертификатами и разделяемые библиотеки,
159 которые реализуют множетсво криптографических алгоритмов, включая DES,
160 RC4, 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
170 Summary:        Static OpenSSL libraries
171 Summary(pl.UTF-8):      Statyczne wersje bibliotek z OpenSSL
172 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para desenvolvimento com openssl
173 Summary(ru.UTF-8):      Статические библиотеки разработчика для OpenSSL
174 Summary(uk.UTF-8):      Статичні бібліотеки програміста для OpenSSL
175 Group:          Development/Libraries
176 Requires:       %{name}-devel = %{version}-%{release}
177
178 %description static
179 Static OpenSSL Toolkit libraries.
180
181 %description static -l pl.UTF-8
182 Statyczne wersje bibliotek z OpenSSL.
183
184 %description static -l pt_BR.UTF-8
185 Bibliotecas estáticas para desenvolvimento com openssl.
186
187 %description static -l ru.UTF-8
188 Программа openssl для работы с сертификатами и разделяемые библиотеки,
189 которые реализуют множетсво криптографических алгоритмов, включая DES,
190 RC4, 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
214 sed -i -e 's|$prefix/lib/engines|%{_libdir}/engines|g' Configure
215
216 %build
217 touch Makefile.*
218
219 %{__perl} util/perlpath.pl %{__perl}
220
221 OPTFLAGS="%{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
272 for 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 ../..
280 done
281
282 %install
283 rm -rf $RPM_BUILD_ROOT
284 install -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
293 install libcrypto.a libssl.a $RPM_BUILD_ROOT%{_libdir}
294 install lib*.so.*.* $RPM_BUILD_ROOT%{_libdir}
295 ln -sf libcrypto.so.*.* $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
296 ln -sf libssl.so.*.* $RPM_BUILD_ROOT%{_libdir}/libssl.so
297
298 %if "%{pld_release}" == "ti"
299 ln -sf %{_var}/lib/%{name}/%{name}.cnf \
300         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/openssl.cnf
301 ln -sf %{_var}/lib/%{name}/certs \
302         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/certs
303 ln -sf %{_var}/lib/%{name}/private \
304         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/private
305 mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
306 rm -rf $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc
307 %else
308 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
309 rm -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
315 install %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/pl/man1/openssl.1
316 install %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/ssl-certificate
317 install %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/c_rehash.sh
318
319 %clean
320 rm -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
327 if [ -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 || :
331 fi
332 %else
333 %triggerpostun -- %{name} < 0.9.8i-2
334 if [ -d /var/lib/openssl/certs ] ; then
335         mv /var/lib/openssl/certs/* %{_sysconfdir}/%{name}/certs 2>/dev/null || :
336 fi
337 if [ -d /var/lib/openssl/private ] ; then
338         mv /var/lib/openssl/private/* %{_sysconfdir}/%{name}/private 2>/dev/null || :
339 fi
340 if [ -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
344 fi
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.056343 seconds and 3 git commands to generate.