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