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