]> git.pld-linux.org Git - packages/openssl.git/blob - openssl.spec
- tsget is perl script
[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.0d
20 Release:        3
21 License:        Apache-like
22 Group:          Libraries
23 Source0:        ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
24 # Source0-md5:  40b6ea380cc8a5bf9734c2f8bf7e701e
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 Summary(pl.UTF-8):      Opcjonalne silniki kryptograficzne dla OpenSSL-a
104 Group:          Libraries
105 Requires:       %{name} = %{version}-%{release}
106
107 %description engines
108 With OpenSSL 0.9.6, a new component was added to support alternative
109 cryptography implementations, most commonly for interfacing with
110 external crypto devices (eg. accelerator cards). This component is
111 called ENGINE.
112
113 There are currently built-in ENGINE implementations for the following
114 crypto devices:
115
116 - CryptoSwift
117 - Compaq Atalla
118 - nCipher CHIL
119 - Nuron
120 - Broadcom uBSec
121
122 In addition, dynamic binding to external ENGINE implementations is now
123 provided by a special ENGINE called "dynamic". 
124
125 %description engines -l pl.UTF-8
126 Począwszy od OpenSSL-a 0.9.6 został dodany nowy komponent, mający
127 wspierać alternatywne implementacje kryptografii, przeważnie
128 współpracujące z zewnętrznymi urządzeniami kryptograficznymi (np.
129 kartami akceleratorów). Komponent ten jest nazywany SILNIKIEM
130 (ang. ENGINE).
131
132 Obecnie istnieją wbudowane implementacje silników dla następujących
133 urządzeń kryptograficznych:
134 - CryptoSwift
135 - Compaq Atalla
136 - nCipher CHIL
137 - Nuron
138 - Broadcom uBSec
139
140 Ponadto zapewnione jest dynamiczne wiązanie dla zewnętrznych
141 implementacji silników poprzez specjalny silnik o nazwie "dynamic".
142
143 %package tools
144 Summary:        OpenSSL command line tool and utilities
145 Summary(pl.UTF-8):      Zestaw narzędzi i skryptów
146 Group:          Applications/Communications
147 Requires:       %{name} = %{version}-%{release}
148 Requires:       which
149
150 %description tools
151 The OpenSSL Toolkit cmdline tool openssl and utility scripts.
152
153 %description tools -l pl.UTF-8
154 Zestaw narzędzi i skryptów wywoływanych z linii poleceń.
155
156 %package tools-perl
157 Summary:        OpenSSL utilities written in Perl
158 Summary(pl.UTF-8):      Narzędzia OpenSSL napisane w perlu
159 Group:          Applications/Communications
160 Requires:       %{name} = %{version}-%{release}
161
162 %description tools-perl
163 OpenSSL Toolkit tools written in Perl.
164
165 %description tools-perl -l pl.UTF-8
166 Narzędzia OpenSSL napisane w perlu.
167
168 %package devel
169 Summary:        Development part of OpenSSL Toolkit libraries
170 Summary(de.UTF-8):      Secure Sockets Layer Kommunikationslibrary: statische libraries+header
171 Summary(es.UTF-8):      Bibliotecas y archivos de inclusión para desarrollo OpenSSL
172 Summary(fr.UTF-8):      Librairies statiques, headers et utilitaires pour communication SSL
173 Summary(pl.UTF-8):      Część bibiloteki OpenSSL przeznaczona dla programistów
174 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento OpenSSL
175 Summary(ru.UTF-8):      Библиотеки, хедеры и утилиты для Secure Sockets Layer
176 Summary(uk.UTF-8):      Бібліотеки, хедери та утиліти для Secure Sockets Layer
177 Group:          Development/Libraries
178 Requires:       %{name} = %{version}-%{release}
179 Obsoletes:      libopenssl0-devel
180
181 %description devel
182 Development part of OpenSSL library.
183
184 %description devel -l es.UTF-8
185 Bibliotecas y archivos de inclusión para desarrollo OpenSSL
186
187 %description devel -l pl.UTF-8
188 Część biblioteki OpenSSL przeznaczona dla programistów.
189
190 %description devel -l pt_BR.UTF-8
191 Uma biblioteca C que fornece vários algoritmos e protocolos
192 criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas e
193 arquivos de inclusão para desenvolvimento.
194
195 %description devel -l ru.UTF-8
196 Программа openssl для работы с сертификатами и разделяемые библиотеки,
197 которые реализуют множетсво криптографических алгоритмов, включая DES,
198 RC4, 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
208 Summary:        Static OpenSSL libraries
209 Summary(pl.UTF-8):      Statyczne wersje bibliotek z OpenSSL
210 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para desenvolvimento com openssl
211 Summary(ru.UTF-8):      Статические библиотеки разработчика для OpenSSL
212 Summary(uk.UTF-8):      Статичні бібліотеки програміста для OpenSSL
213 Group:          Development/Libraries
214 Requires:       %{name}-devel = %{version}-%{release}
215
216 %description static
217 Static OpenSSL Toolkit libraries.
218
219 %description static -l pl.UTF-8
220 Statyczne wersje bibliotek z OpenSSL.
221
222 %description static -l pt_BR.UTF-8
223 Bibliotecas estáticas para desenvolvimento com openssl.
224
225 %description static -l ru.UTF-8
226 Программа openssl для работы с сертификатами и разделяемые библиотеки,
227 которые реализуют множетсво криптографических алгоритмов, включая DES,
228 RC4, 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
248 %{__perl} -pi -e 's#%{_prefix}/local/bin/perl#%{__perl}#g' \
249         `grep -l -r "%{_prefix}/local/bin/perl" *`
250
251 sed -i -e 's|\$prefix/\$libdir/engines|/%{_lib}/engines|g' Configure
252
253 %build
254 touch Makefile.*
255
256 %{__perl} util/perlpath.pl %{__perl}
257
258 OPTFLAGS="%{rpmcflags} %{rpmcppflags} %{?with_purify:-DPURIFY}" \
259 ./Configure \
260 %if "%{pld_release}" == "ti"
261         --openssldir=%{_var}/lib/%{name} \
262 %else
263         --openssldir=%{_sysconfdir}/%{name} \
264 %endif
265         --libdir=%{_lib} \
266         shared \
267         threads \
268         zlib \
269         enable-tlsext \
270         enable-seed \
271         enable-rfc3779 \
272         enable-camelia \
273         enable-cms \
274         enable-idea \
275         enable-mdc2 \
276         enable-md2 \
277         enable-rc5 \
278 %ifarch %{ix86}
279 %ifarch i386
280         386 linux-elf
281 # ^- allow running on 80386 (default code uses bswapl available on i486+)
282 %else
283         linux-elf
284 %endif
285 %endif
286 %ifarch alpha
287         linux-alpha+bwx-gcc
288 %endif
289 %ifarch %{x8664}
290         linux-x86_64
291 %endif
292 %ifarch ia64
293         linux-ia64
294 %endif
295 %ifarch ppc
296         linux-ppc
297 %endif
298 %ifarch ppc64
299         linux-ppc64
300 %endif
301 %ifarch sparc
302         linux-sparcv8
303 %endif
304 %ifarch sparcv9
305         linux-sparcv9
306 %endif
307 %ifarch sparc64
308         linux64-sparcv9
309 %endif
310 %ifarch armv4 armv5 armv5t armv5te armv5tel
311         linux-armv4
312 %endif
313
314 %{__make} -j1 all rehash %{?with_tests:tests} \
315         CC="%{__cc}" \
316         ASFLAG='$(CFLAG) -Wa,--noexecstack' \
317         INSTALLTOP=%{_prefix}
318
319 # Rename POD sources of man pages. "openssl_" prefix is added to each
320 # manpage to avoid potential conflicts with other packages.
321
322 for dir in doc/{apps,ssl,crypto}; do
323         cd $dir || exit 1;
324         %{__perl} -pi -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
325
326         for pod in !(openssl*).pod; do
327                 mv -f $pod openssl_$pod;
328         done
329         cd ../..
330 done
331
332 %install
333 rm -rf $RPM_BUILD_ROOT
334 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_libdir}/%{name}} \
335         $RPM_BUILD_ROOT{%{_mandir}/{pl/man1,man{1,3,5,7}},%{_datadir}/ssl} \
336         $RPM_BUILD_ROOT/%{_lib}/engines \
337         $RPM_BUILD_ROOT%{_pkgconfigdir}
338
339 %{__make} install \
340         INSTALLTOP=%{_prefix} \
341         INSTALL_PREFIX=$RPM_BUILD_ROOT \
342         MANDIR=%{_mandir}
343
344 mv -f $RPM_BUILD_ROOT%{_libdir}/engines/* $RPM_BUILD_ROOT/%{_lib}/engines
345 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
346 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcrypto.*.*) $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
347 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libssl.*.*) $RPM_BUILD_ROOT%{_libdir}/libssl.so
348
349 %if "%{pld_release}" == "ti"
350 ln -sf %{_var}/lib/%{name}/%{name}.cnf \
351         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/openssl.cnf
352 ln -sf %{_var}/lib/%{name}/certs \
353         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/certs
354 ln -sf %{_var}/lib/%{name}/private \
355         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/private
356 mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
357 rm -rf $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc
358 %else
359 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
360 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc
361 %endif
362
363 # not installed as individual utilities (see openssl dgst instead)
364 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{md2,md4,md5,mdc2,ripemd160,sha,sha1}.1
365
366 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/pl/man1/openssl.1
367 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/ssl-certificate
368 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/c_rehash.sh
369
370 %clean
371 rm -rf $RPM_BUILD_ROOT
372
373 %post   -p /sbin/ldconfig
374 %postun -p /sbin/ldconfig
375
376 %triggerpostun -- %{name}-tools < 1.0.0-5
377 # the hashing format has changed in 1.0.0
378 [ ! -x %{_sbindir}/update-ca-certificates ] || %{_sbindir}/update-ca-certificates --fresh || :
379
380 %if "%{pld_release}" == "ti"
381 %triggerin -- %{name}-tools < 0.9.8i-2
382 if [ -L /var/lib/openssl/openssl.cnf ] ; then
383         echo "Saving old configuration as /var/lib/openssl/openssl.cnf.rpmsave"
384         rm /var/lib/openssl/openssl.cnf
385         mv %{_sysconfdir}/%{name}/openssl.cnf /var/lib/openssl/openssl.cnf.rpmsave 2>/dev/null || :
386 fi
387 %else
388 %triggerpostun -- %{name} < 0.9.8i-2
389 if [ -d /var/lib/openssl/certs ] ; then
390         mv /var/lib/openssl/certs/* %{_sysconfdir}/%{name}/certs 2>/dev/null || :
391 fi
392 if [ -d /var/lib/openssl/private ] ; then
393         mv /var/lib/openssl/private/* %{_sysconfdir}/%{name}/private 2>/dev/null || :
394 fi
395 if [ -d /var/lib/openssl ] ; then
396         for f in /var/lib/openssl/* ; do
397                 [ -f "$f" ] && mv "$f" %{_sysconfdir}/%{name} 2>/dev/null || :
398         done
399 fi
400 %endif
401
402 %files
403 %defattr(644,root,root,755)
404 %doc CHANGES CHANGES.SSLeay LICENSE NEWS README doc/*.txt
405 %doc doc/openssl_button.gif doc/openssl_button.html
406 %attr(755,root,root) /%{_lib}/libcrypto.so.*.*.*
407 %attr(755,root,root) /%{_lib}/libssl.so.*.*.*
408 %if "%{pld_release}" == "ti"
409 %dir %{_var}/lib/%{name}
410 %dir %{_var}/lib/%{name}/certs
411 %dir %{_var}/lib/%{name}/private
412 %dir %{_sysconfdir}/%{name}
413 %attr(755,root,root) %{_sysconfdir}/%{name}/certs
414 %attr(755,root,root) %{_sysconfdir}/%{name}/private
415 %else
416 %dir %{_sysconfdir}/%{name}
417 %dir %{_sysconfdir}/%{name}/certs
418 %dir %{_sysconfdir}/%{name}/private
419 %endif
420 %dir %{_datadir}/ssl
421
422 %files engines
423 %dir /%{_lib}/engines
424 %attr(755,root,root) /%{_lib}/engines/*.so
425
426 %files tools
427 %defattr(644,root,root,755)
428 %if "%{pld_release}" == "ti"
429 %{_sysconfdir}/%{name}/openssl.cnf
430 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/%{name}/openssl.cnf
431 %else
432 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/openssl.cnf
433 %endif
434 %attr(755,root,root) %{_bindir}/c_rehash.sh
435 %attr(755,root,root) %{_bindir}/openssl
436 %attr(754,root,root) %{_bindir}/ssl-certificate
437
438 %dir %{_libdir}/%{name}
439 %attr(755,root,root) %{_libdir}/%{name}/CA.sh
440 %attr(755,root,root) %{_libdir}/%{name}/c_hash
441 %attr(755,root,root) %{_libdir}/%{name}/c_info
442 %attr(755,root,root) %{_libdir}/%{name}/c_issuer
443 %attr(755,root,root) %{_libdir}/%{name}/c_name
444
445 %{_mandir}/man1/openssl.1*
446 %{_mandir}/man1/openssl_asn1parse.1*
447 %{_mandir}/man1/openssl_ca.1*
448 %{_mandir}/man1/openssl_ciphers.1*
449 %{_mandir}/man1/openssl_cms.1*
450 %{_mandir}/man1/openssl_crl.1*
451 %{_mandir}/man1/openssl_crl2pkcs7.1*
452 %{_mandir}/man1/openssl_dgst.1*
453 %{_mandir}/man1/openssl_dhparam.1*
454 %{_mandir}/man1/openssl_dsa.1*
455 %{_mandir}/man1/openssl_dsaparam.1*
456 %{_mandir}/man1/openssl_ec.1*
457 %{_mandir}/man1/openssl_ecparam.1*
458 %{_mandir}/man1/openssl_enc.1*
459 %{_mandir}/man1/openssl_errstr.1*
460 %{_mandir}/man1/openssl_gendsa.1*
461 %{_mandir}/man1/openssl_genpkey.1*
462 %{_mandir}/man1/openssl_genrsa.1*
463 %{_mandir}/man1/openssl_nseq.1*
464 %{_mandir}/man1/openssl_ocsp.1*
465 %{_mandir}/man1/openssl_passwd.1*
466 %{_mandir}/man1/openssl_pkcs12.1*
467 %{_mandir}/man1/openssl_pkcs7.1*
468 %{_mandir}/man1/openssl_pkcs8.1*
469 %{_mandir}/man1/openssl_pkey.1*
470 %{_mandir}/man1/openssl_pkeyparam.1*
471 %{_mandir}/man1/openssl_pkeyutl.1*
472 %{_mandir}/man1/openssl_rand.1*
473 %{_mandir}/man1/openssl_req.1*
474 %{_mandir}/man1/openssl_rsa.1*
475 %{_mandir}/man1/openssl_rsautl.1*
476 %{_mandir}/man1/openssl_s_client.1*
477 %{_mandir}/man1/openssl_s_server.1*
478 %{_mandir}/man1/openssl_s_time.1*
479 %{_mandir}/man1/openssl_sess_id.1*
480 %{_mandir}/man1/openssl_smime.1*
481 %{_mandir}/man1/openssl_speed.1*
482 %{_mandir}/man1/openssl_spkac.1*
483 %{_mandir}/man1/openssl_ts.1*
484 %{_mandir}/man1/openssl_tsget.1*
485 %{_mandir}/man1/openssl_verify.1*
486 %{_mandir}/man1/openssl_version.1*
487 %{_mandir}/man1/openssl_x509.1*
488 %{_mandir}/man5/openssl_config.5*
489 %{_mandir}/man5/openssl_x509v3_config.5*
490 %lang(pl) %{_mandir}/pl/man1/openssl.1*
491
492 %files tools-perl
493 %defattr(644,root,root,755)
494 %attr(755,root,root) %{_bindir}/c_rehash
495 %attr(755,root,root) %{_libdir}/%{name}/CA.pl
496 %attr(755,root,root) %{_libdir}/%{name}/tsget
497 %{_mandir}/man1/openssl_CA.pl.1*
498
499 %files devel
500 %defattr(644,root,root,755)
501 %attr(755,root,root) %{_libdir}/libcrypto.so
502 %attr(755,root,root) %{_libdir}/libssl.so
503 %{_includedir}/%{name}
504 %{_pkgconfigdir}/libcrypto.pc
505 %{_pkgconfigdir}/libssl.pc
506 %{_pkgconfigdir}/openssl.pc
507 %{_mandir}/man3/openssl*.3*
508 %{_mandir}/man7/openssl_des_modes.7*
509
510 %files static
511 %defattr(644,root,root,755)
512 %{_libdir}/lib*.a
This page took 0.073918 seconds and 3 git commands to generate.