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