]> git.pld-linux.org Git - packages/openssl.git/blame_incremental - openssl.spec
- rel 4
[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.0
20Release: 4
21License: Apache-like
22Group: Libraries
23Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
24# Source0-md5: 89eaa86e25b2845f920ec00ae4c864ed
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 tools
102Summary: OpenSSL command line tool and utilities
103Summary(pl.UTF-8): Zestaw narzędzi i skryptów
104Group: Applications/Communications
105Requires: %{name} = %{version}-%{release}
106Requires: which
107
108%description tools
109The OpenSSL Toolkit cmdline tool openssl and utility scripts.
110
111%description tools -l pl.UTF-8
112Zestaw narzędzi i skryptów wywoływanych z linii poleceń.
113
114%package tools-perl
115Summary: OpenSSL utilities written in Perl
116Summary(pl.UTF-8): Narzędzia OpenSSL napisane w perlu
117Group: Applications/Communications
118Requires: %{name} = %{version}-%{release}
119
120%description tools-perl
121OpenSSL Toolkit tools written in Perl.
122
123%description tools-perl -l pl.UTF-8
124Narzędzia OpenSSL napisane w perlu.
125
126%package devel
127Summary: Development part of OpenSSL Toolkit libraries
128Summary(de.UTF-8): Secure Sockets Layer Kommunikationslibrary: statische libraries+header
129Summary(es.UTF-8): Bibliotecas y archivos de inclusión para desarrollo OpenSSL
130Summary(fr.UTF-8): Librairies statiques, headers et utilitaires pour communication SSL
131Summary(pl.UTF-8): Część bibiloteki OpenSSL przeznaczona dla programistów
132Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para desenvolvimento OpenSSL
133Summary(ru.UTF-8): Библиотеки, хедеры и утилиты для Secure Sockets Layer
134Summary(uk.UTF-8): Бібліотеки, хедери та утиліти для Secure Sockets Layer
135Group: Development/Libraries
136Requires: %{name} = %{version}-%{release}
137Obsoletes: libopenssl0-devel
138
139%description devel
140Development part of OpenSSL library.
141
142%description devel -l es.UTF-8
143Bibliotecas y archivos de inclusión para desarrollo OpenSSL
144
145%description devel -l pl.UTF-8
146Część biblioteki OpenSSL przeznaczona dla programistów.
147
148%description devel -l pt_BR.UTF-8
149Uma biblioteca C que fornece vários algoritmos e protocolos
150criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas e
151arquivos de inclusão para desenvolvimento.
152
153%description devel -l ru.UTF-8
154Программа openssl для работы с сертификатами и разделяемые библиотеки,
155которые реализуют множетсво криптографических алгоритмов, включая DES,
156RC4, RSA и SSL. Включает библиотеки и хедеры для разработки приложений
157с использованием SSL.
158
159%description devel -l uk.UTF-8
160Програма openssl для роботи з сертифікатами та бібліотеки спільного
161користування, що реалізують велику кількість криптографічних
162алгоритмів, включаючи DES, RC4, RSA та SSL. Містить бібліотеки та
163хедери для розробки програм з використанням SSL.
164
165%package static
166Summary: Static OpenSSL libraries
167Summary(pl.UTF-8): Statyczne wersje bibliotek z OpenSSL
168Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com openssl
169Summary(ru.UTF-8): Статические библиотеки разработчика для OpenSSL
170Summary(uk.UTF-8): Статичні бібліотеки програміста для OpenSSL
171Group: Development/Libraries
172Requires: %{name}-devel = %{version}-%{release}
173
174%description static
175Static OpenSSL Toolkit libraries.
176
177%description static -l pl.UTF-8
178Statyczne wersje bibliotek z OpenSSL.
179
180%description static -l pt_BR.UTF-8
181Bibliotecas estáticas para desenvolvimento com openssl.
182
183%description static -l ru.UTF-8
184Программа openssl для работы с сертификатами и разделяемые библиотеки,
185которые реализуют множетсво криптографических алгоритмов, включая DES,
186RC4, RSA и SSL. Включает статические библиотеки для разработки
187приложений с использованием OpenSSL.
188
189%description static -l uk.UTF-8
190Програма openssl для роботи з сертифікатами та бібліотеки спільного
191користування, що реалізують велику кількість криптографічних
192алгоритмів, включаючи DES, RC4, RSA та SSL. Містить статичні
193бібліотеки для розробки програм з використанням SSL.
194
195%prep
196%setup -q
197%patch0 -p1
198%patch1 -p1
199%patch2 -p1
200%patch3 -p1
201%patch4 -p1
202%patch5 -p1
203%patch6 -p1
204%patch7 -p1
205
206%{__perl} -pi -e 's#%{_prefix}/local/bin/perl#%{__perl}#g' \
207 `grep -l -r "%{_prefix}/local/bin/perl" *`
208
209sed -i -e 's|\$prefix/\$libdir/engines|/%{_lib}/engines|g' Configure
210
211%build
212touch Makefile.*
213
214%{__perl} util/perlpath.pl %{__perl}
215
216OPTFLAGS="%{rpmcflags} %{?with_purify:-DPURIFY}" \
217./Configure \
218%if "%{pld_release}" == "ti"
219 --openssldir=%{_var}/lib/%{name} \
220%else
221 --openssldir=%{_sysconfdir}/%{name} \
222%endif
223 --libdir=%{_lib} \
224 shared threads \
225 enable-tlsext \
226 enable-seed \
227 enable-rfc3779 \
228 enable-cms \
229 enable-idea \
230 enable-mdc2 \
231 enable-md2 \
232 enable-rc5 \
233%ifarch %{ix86}
234%ifarch i386
235 386 linux-elf
236# ^- allow running on 80386 (default code uses bswapl available on i486+)
237%else
238 linux-elf
239%endif
240%endif
241%ifarch alpha
242 linux-alpha+bwx-gcc
243%endif
244%ifarch %{x8664}
245 linux-x86_64
246%endif
247%ifarch ia64
248 linux-ia64
249%endif
250%ifarch ppc
251 linux-ppc
252%endif
253%ifarch ppc64
254 linux-ppc64
255%endif
256%ifarch sparc
257 linux-sparcv8
258%endif
259%ifarch sparcv9
260 linux-sparcv9
261%endif
262%ifarch sparc64
263 linux64-sparcv9
264%endif
265
266%{__make} -j1 all rehash %{?with_tests:tests} \
267 CC="%{__cc}" \
268 ASFLAG='$(CFLAG) -Wa,--noexecstack' \
269 INSTALLTOP=%{_prefix}
270
271# Rename POD sources of man pages. "openssl_" prefix is added to each
272# manpage to avoid potential conflicts with other packages.
273
274for dir in doc/{apps,ssl,crypto}; do
275 cd $dir || exit 1;
276 %{__perl} -pi -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
277
278 for pod in !(openssl*).pod; do
279 mv -f $pod openssl_$pod;
280 done
281 cd ../..
282done
283
284%install
285rm -rf $RPM_BUILD_ROOT
286install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_libdir}/%{name}} \
287 $RPM_BUILD_ROOT{%{_mandir}/{pl/man1,man{1,3,5,7}},%{_datadir}/ssl} \
288 $RPM_BUILD_ROOT/%{_lib}/engines \
289 $RPM_BUILD_ROOT%{_pkgconfigdir}
290
291%{__make} install \
292 INSTALLTOP=%{_prefix} \
293 INSTALL_PREFIX=$RPM_BUILD_ROOT \
294 MANDIR=%{_mandir}
295
296mv -f $RPM_BUILD_ROOT%{_libdir}/engines/* $RPM_BUILD_ROOT/%{_lib}/engines
297mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
298ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcrypto.*.*) $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
299ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libssl.*.*) $RPM_BUILD_ROOT%{_libdir}/libssl.so
300
301%if "%{pld_release}" == "ti"
302ln -sf %{_var}/lib/%{name}/%{name}.cnf \
303 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/openssl.cnf
304ln -sf %{_var}/lib/%{name}/certs \
305 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/certs
306ln -sf %{_var}/lib/%{name}/private \
307 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/private
308mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
309rm -rf $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc
310%else
311mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
312rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc
313%endif
314
315# not installed as individual utilities (see openssl dgst instead)
316%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{md2,md4,md5,mdc2,ripemd160,sha,sha1}.1
317
318cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/pl/man1/openssl.1
319install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/ssl-certificate
320install -p %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/c_rehash.sh
321
322%clean
323rm -rf $RPM_BUILD_ROOT
324
325%post -p /sbin/ldconfig
326%postun -p /sbin/ldconfig
327
328%if "%{pld_release}" == "ti"
329%triggerin -- %{name}-tools < 0.9.8i-2
330if [ -L /var/lib/openssl/openssl.cnf ] ; then
331 echo "Saving old configuration as /var/lib/openssl/openssl.cnf.rpmsave"
332 rm /var/lib/openssl/openssl.cnf
333 mv %{_sysconfdir}/%{name}/openssl.cnf /var/lib/openssl/openssl.cnf.rpmsave 2>/dev/null || :
334fi
335%else
336%triggerpostun -- %{name} < 0.9.8i-2
337if [ -d /var/lib/openssl/certs ] ; then
338 mv /var/lib/openssl/certs/* %{_sysconfdir}/%{name}/certs 2>/dev/null || :
339fi
340if [ -d /var/lib/openssl/private ] ; then
341 mv /var/lib/openssl/private/* %{_sysconfdir}/%{name}/private 2>/dev/null || :
342fi
343if [ -d /var/lib/openssl ] ; then
344 for f in /var/lib/openssl/* ; do
345 [ -f "$f" ] && mv "$f" %{_sysconfdir}/%{name} 2>/dev/null || :
346 done
347fi
348%endif
349
350%files
351%defattr(644,root,root,755)
352%doc CHANGES CHANGES.SSLeay LICENSE NEWS README doc/*.txt
353%doc doc/openssl_button.gif doc/openssl_button.html
354%attr(755,root,root) /%{_lib}/libcrypto.so.*.*.*
355%attr(755,root,root) /%{_lib}/libssl.so.*.*.*
356%dir /%{_lib}/engines
357%attr(755,root,root) /%{_lib}/engines/*.so
358%if "%{pld_release}" == "ti"
359%dir %{_var}/lib/%{name}
360%dir %{_var}/lib/%{name}/certs
361%dir %{_var}/lib/%{name}/private
362%dir %{_sysconfdir}/%{name}
363%attr(755,root,root) %{_sysconfdir}/%{name}/certs
364%attr(755,root,root) %{_sysconfdir}/%{name}/private
365%else
366%dir %{_sysconfdir}/%{name}
367%dir %{_sysconfdir}/%{name}/certs
368%dir %{_sysconfdir}/%{name}/private
369%endif
370%dir %{_datadir}/ssl
371
372%files tools
373%defattr(644,root,root,755)
374%if "%{pld_release}" == "ti"
375%{_sysconfdir}/%{name}/openssl.cnf
376%config(noreplace) %verify(not md5 mtime size) %{_var}/lib/%{name}/openssl.cnf
377%else
378%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/openssl.cnf
379%endif
380%attr(755,root,root) %{_bindir}/c_rehash.sh
381%attr(755,root,root) %{_bindir}/openssl
382%attr(754,root,root) %{_bindir}/ssl-certificate
383
384%dir %{_libdir}/%{name}
385%attr(755,root,root) %{_libdir}/%{name}/CA.sh
386%attr(755,root,root) %{_libdir}/%{name}/c_hash
387%attr(755,root,root) %{_libdir}/%{name}/c_info
388%attr(755,root,root) %{_libdir}/%{name}/c_issuer
389%attr(755,root,root) %{_libdir}/%{name}/c_name
390%attr(755,root,root) %{_libdir}/%{name}/tsget
391
392%{_mandir}/man1/openssl.1*
393%{_mandir}/man1/openssl_asn1parse.1*
394%{_mandir}/man1/openssl_ca.1*
395%{_mandir}/man1/openssl_ciphers.1*
396%{_mandir}/man1/openssl_cms.1*
397%{_mandir}/man1/openssl_crl.1*
398%{_mandir}/man1/openssl_crl2pkcs7.1*
399%{_mandir}/man1/openssl_dgst.1*
400%{_mandir}/man1/openssl_dhparam.1*
401%{_mandir}/man1/openssl_dsa.1*
402%{_mandir}/man1/openssl_dsaparam.1*
403%{_mandir}/man1/openssl_ec.1*
404%{_mandir}/man1/openssl_ecparam.1*
405%{_mandir}/man1/openssl_enc.1*
406%{_mandir}/man1/openssl_errstr.1*
407%{_mandir}/man1/openssl_gendsa.1*
408%{_mandir}/man1/openssl_genpkey.1*
409%{_mandir}/man1/openssl_genrsa.1*
410%{_mandir}/man1/openssl_nseq.1*
411%{_mandir}/man1/openssl_ocsp.1*
412%{_mandir}/man1/openssl_passwd.1*
413%{_mandir}/man1/openssl_pkcs12.1*
414%{_mandir}/man1/openssl_pkcs7.1*
415%{_mandir}/man1/openssl_pkcs8.1*
416%{_mandir}/man1/openssl_pkey.1*
417%{_mandir}/man1/openssl_pkeyparam.1*
418%{_mandir}/man1/openssl_pkeyutl.1*
419%{_mandir}/man1/openssl_rand.1*
420%{_mandir}/man1/openssl_req.1*
421%{_mandir}/man1/openssl_rsa.1*
422%{_mandir}/man1/openssl_rsautl.1*
423%{_mandir}/man1/openssl_s_client.1*
424%{_mandir}/man1/openssl_s_server.1*
425%{_mandir}/man1/openssl_s_time.1*
426%{_mandir}/man1/openssl_sess_id.1*
427%{_mandir}/man1/openssl_smime.1*
428%{_mandir}/man1/openssl_speed.1*
429%{_mandir}/man1/openssl_spkac.1*
430%{_mandir}/man1/openssl_ts.1*
431%{_mandir}/man1/openssl_tsget.1*
432%{_mandir}/man1/openssl_verify.1*
433%{_mandir}/man1/openssl_version.1*
434%{_mandir}/man1/openssl_x509.1*
435%{_mandir}/man5/openssl_config.5*
436%{_mandir}/man5/openssl_x509v3_config.5*
437%lang(pl) %{_mandir}/pl/man1/openssl.1*
438
439%files tools-perl
440%defattr(644,root,root,755)
441%attr(755,root,root) %{_bindir}/c_rehash
442%attr(755,root,root) %{_libdir}/%{name}/CA.pl
443%{_mandir}/man1/openssl_CA.pl.1*
444
445%files devel
446%defattr(644,root,root,755)
447%attr(755,root,root) %{_libdir}/libcrypto.so
448%attr(755,root,root) %{_libdir}/libssl.so
449%{_includedir}/%{name}
450%{_pkgconfigdir}/libcrypto.pc
451%{_pkgconfigdir}/libssl.pc
452%{_pkgconfigdir}/openssl.pc
453%{_mandir}/man3/openssl*.3*
454%{_mandir}/man7/openssl_des_modes.7*
455
456%files static
457%defattr(644,root,root,755)
458%{_libdir}/lib*.a
This page took 0.039159 seconds and 4 git commands to generate.