]> git.pld-linux.org Git - packages/openssl.git/blob - openssl.spec
- well, one ifarch for one arch is enough...
[packages/openssl.git] / openssl.spec
1 %include        /usr/lib/rpm/macros.perl
2 Summary:        OpenSSL Toolkit libraries for the "Secure Sockets Layer" (SSL v2/v3)
3 Summary(de):    Secure Sockets Layer (SSL)-Kommunikationslibrary
4 Summary(es):    Biblioteca C que suministra algoritmos y protocolos criptográficos
5 Summary(fr):    Utilitaires de communication SSL (Secure Sockets Layer)
6 Summary(pl):    Biblioteki OpenSSL (SSL v2/v3)
7 Summary(pt_BR): Uma biblioteca C que fornece vários algoritmos e protocolos criptográficos
8 Summary(ru):    âÉÂÌÉÏÔÅËÉ É ÕÔÉÌÉÔÙ ÄÌÑ ÓÏÅÄÉÎÅÎÉÊ ÞÅÒÅÚ Secure Sockets Layer
9 Summary(uk):    â¦Â̦ÏÔÅËÉ ÔÁ ÕÔÉ̦ÔÉ ÄÌÑ Ú'¤ÄÎÁÎØ ÞÅÒÅÚ Secure Sockets Layer
10 Name:           openssl
11 Version:        0.9.7c
12 Release:        3
13 License:        Apache-style License
14 Group:          Libraries
15 Source0:        ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
16 # Source0-md5:  c54fb36218adaaaba01ef733cd88c8ec
17 Source1:        %{name}-ca-bundle.crt
18 Source2:        %{name}.1.pl
19 Source3:        %{name}-ssl-certificate.sh
20 Patch0:         %{name}-alpha-ccc.patch
21 Patch1:         %{name}-optflags.patch
22 Patch2:         %{name}-globalCA.diff
23 Patch3:         %{name}-parallel_make.patch
24 Patch4:         %{name}-include.patch
25 Patch5:         %{name}-makefile.patch
26 URL:            http://www.openssl.org/
27 BuildRequires:  perl-devel >= 5.6.1
28 BuildRequires:  textutils
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Obsoletes:      SSLeay
31 Obsoletes:      SSLeay-devel
32 Obsoletes:      SSLeay-perl
33 Obsoletes:      libopenssl0
34
35 %description
36 The OpenSSL Project is a collaborative effort to develop a robust,
37 commercial-grade, full-featured, and Open Source toolkit implementing
38 the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
39 v1) protocols with full-strength cryptography world-wide. The project
40 is managed by a worldwide community of volunteers that use the
41 Internet to communicate, plan, and develop the OpenSSL tookit and its
42 related documentation.
43
44 OpenSSL is based on the excellent SSLeay library developed by Eric A.
45 Young and Tim J. Hudson. The OpenSSL toolkit is licensed under an
46 Apache-style licence, which basically means that you are free to get
47 and use it for commercial and non-commercial purposes subject to some
48 simple license conditions.
49
50 This package contains shared libraries only, install openssl-tools if
51 you want to use openssl cmdline tool.
52
53 %description -l de
54 Openssl enthält das OpenSSL Zertifikatsmanagementtool und shared
55 libraries, die verschiedene Verschlüsselungs- und
56 Entschlüsselungsalgorithmen und -protokolle, wie DES, RC4, RSA und SSL
57 zur Verfügung stellen.
58
59 %description -l es
60 Biblioteca C que suministra algoritmos y protocolos criptográficos.
61
62 %description -l fr
63 OpenSSL est un outiil de gestion des certificats et les librairies
64 partagees qui fournit plusieurs protocoles et algorithmes de
65 codage/decodage, incluant DES, RC4, RSA et SSL.
66
67 %description -l pl
68 Implementacja protoko³ów kryptograficznych Secure Socket Layer (SSL)
69 v2/v3 oraz Transport Layer Security (TLS v1).
70
71 %description -l pt_BR
72 Uma biblioteca C que fornece vários algoritmos e protocolos
73 criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas
74 compartilhadas e utilitários.
75
76 %description -l ru
77 ðÒÏÇÒÁÍÍÁ openssl ÄÌÑ ÒÁÂÏÔÙ Ó ÓÅÒÔÉÆÉËÁÔÁÍÉ É ÒÁÚÄÅÌÑÅÍÙÅ ÂÉÂÌÉÏÔÅËÉ,
78 ËÏÔÏÒÙÅ ÒÅÁÌÉÚÕÀÔ ÍÎÏÖÅÔÓ×Ï ËÒÉÐÔÏÇÒÁÆÉÞÅÓËÉÈ ÁÌÇÏÒÉÔÍÏ×, ×ËÌÀÞÁÑ DES,
79 RC4, RSA É SSL.
80
81 %description -l uk
82 ðÒÏÇÒÁÍÁ openssl ÄÌÑ ÒÏÂÏÔÉ Ú ÓÅÒÔÉƦËÁÔÁÍÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÓЦÌØÎÏÇÏ
83 ËÏÒÉÓÔÕ×ÁÎÎÑ, ÝÏ ÒÅÁ̦ÚÕÀÔØ ×ÅÌÉËՠ˦ÌØ˦ÓÔØ ËÒÉÐÔÏÇÒÁƦÞÎÉÈ
84 ÁÌÇÏÒÉÔͦ×, ×ËÌÀÞÁÀÞÉ DES, RC4, RSA ÔÁ SSL.
85
86 %package tools
87 Summary:        OpenSSL command line tool and utilities
88 Summary(pl):    Zestaw narzêdzi i skryptów
89 Group:          Applications/Communications
90 Requires:       %{name} = %{version}
91
92 %description tools
93 The OpenSSL Toolkit cmdline tool openssl and utility scripts.
94
95 %description tools -l pl
96 Zestaw narzêdzi i skryptów wywo³ywanych z linii poleceñ.
97
98 %package tools-perl
99 Summary:        OpenSSL utilities written in Perl
100 Summary(pl):    Narzêdzia OpenSSL napisane w perlu
101 Group:          Applications/Communications
102 Requires:       %{name} = %{version}
103
104 %description tools-perl
105 OpenSSL Toolkit tools written in Perl.
106
107 %description tools-perl -l pl
108 Narzêdzia OpenSSL napisane w perlu.
109
110 %package devel
111 Summary:        Development part of OpenSSL Toolkit libraries
112 Summary(de):    Secure Sockets Layer Kommunikationslibrary: statische libraries+header
113 Summary(es):    Bibliotecas y archivos de inclusión para desarrollo OpenSSL
114 Summary(fr):    Librairies statiques, headers et utilitaires pour communication SSL
115 Summary(pl):    Czê¶æ bibiloteki OpenSSL przeznaczona dla programistów
116 Summary(pt_BR): Bibliotecas e arquivos de inclusão para desenvolvimento OpenSSL
117 Summary(ru):    âÉÂÌÉÏÔÅËÉ, ÈÅÄÅÒÙ É ÕÔÉÌÉÔÙ ÄÌÑ Secure Sockets Layer
118 Summary(uk):    â¦Â̦ÏÔÅËÉ, ÈÅÄÅÒÉ ÔÁ ÕÔÉ̦ÔÉ ÄÌÑ Secure Sockets Layer
119 Group:          Development/Libraries
120 Requires:       %{name} = %{version}
121 Obsoletes:      libopenssl0-devel
122
123 %description devel
124 Development part of OpenSSL library.
125
126 %description devel -l es
127 Bibliotecas y archivos de inclusión para desarrollo OpenSSL
128
129 %description devel -l pl
130 Czê¶æ bibiloteki OpenSSL przeznaczona dla programistów.
131
132 %description devel -l pt_BR
133 Uma biblioteca C que fornece vários algoritmos e protocolos
134 criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas e
135 arquivos de inclusão para desenvolvimento.
136
137 %description devel -l ru
138 ðÒÏÇÒÁÍÍÁ openssl ÄÌÑ ÒÁÂÏÔÙ Ó ÓÅÒÔÉÆÉËÁÔÁÍÉ É ÒÁÚÄÅÌÑÅÍÙÅ ÂÉÂÌÉÏÔÅËÉ,
139 ËÏÔÏÒÙÅ ÒÅÁÌÉÚÕÀÔ ÍÎÏÖÅÔÓ×Ï ËÒÉÐÔÏÇÒÁÆÉÞÅÓËÉÈ ÁÌÇÏÒÉÔÍÏ×, ×ËÌÀÞÁÑ DES,
140 RC4, RSA É SSL. ÷ËÌÀÞÁÅÔ ÂÉÂÌÉÏÔÅËÉ É ÈÅÄÅÒÙ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ÐÒÉÌÏÖÅÎÉÊ
141 Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ SSL.
142
143 %description devel -l uk
144 ðÒÏÇÒÁÍÁ openssl ÄÌÑ ÒÏÂÏÔÉ Ú ÓÅÒÔÉƦËÁÔÁÍÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÓЦÌØÎÏÇÏ
145 ËÏÒÉÓÔÕ×ÁÎÎÑ, ÝÏ ÒÅÁ̦ÚÕÀÔØ ×ÅÌÉËՠ˦ÌØ˦ÓÔØ ËÒÉÐÔÏÇÒÁƦÞÎÉÈ
146 ÁÌÇÏÒÉÔͦ×, ×ËÌÀÞÁÀÞÉ DES, RC4, RSA ÔÁ SSL. í¦ÓÔÉÔؠ¦Â̦ÏÔÅËÉ ÔÁ
147 ÈÅÄÅÒÉ ÄÌÑ ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ Ú ×ÉËÏÒÉÓÔÁÎÎÑÍ SSL.
148
149 %package static
150 Summary:        Static OpenSSL libraries
151 Summary(pl):    Statyczne wersje bibliotek z OpenSSL
152 Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com openssl
153 Summary(ru):    óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ ÄÌÑ OpenSSL
154 Summary(uk):    óÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ ÄÌÑ OpenSSL
155 Group:          Development/Libraries
156 Requires:       %{name}-devel = %{version}
157
158 %description static
159 Static OpenSSL Toolkit libraries.
160
161 %description static -l pl
162 Statyczne wersje bibliotek z OpenSSL.
163
164 %description static -l pt_BR
165 Bibliotecas estáticas para desenvolvimento com openssl.
166
167 %description static -l ru
168 ðÒÏÇÒÁÍÍÁ openssl ÄÌÑ ÒÁÂÏÔÙ Ó ÓÅÒÔÉÆÉËÁÔÁÍÉ É ÒÁÚÄÅÌÑÅÍÙÅ ÂÉÂÌÉÏÔÅËÉ,
169 ËÏÔÏÒÙÅ ÒÅÁÌÉÚÕÀÔ ÍÎÏÖÅÔÓ×Ï ËÒÉÐÔÏÇÒÁÆÉÞÅÓËÉÈ ÁÌÇÏÒÉÔÍÏ×, ×ËÌÀÞÁÑ DES,
170 RC4, RSA É SSL. ÷ËÌÀÞÁÅÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ
171 ÐÒÉÌÏÖÅÎÉÊ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ OpenSSL.
172
173 %description static -l uk
174 ðÒÏÇÒÁÍÁ openssl ÄÌÑ ÒÏÂÏÔÉ Ú ÓÅÒÔÉƦËÁÔÁÍÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÓЦÌØÎÏÇÏ
175 ËÏÒÉÓÔÕ×ÁÎÎÑ, ÝÏ ÒÅÁ̦ÚÕÀÔØ ×ÅÌÉËՠ˦ÌØ˦ÓÔØ ËÒÉÐÔÏÇÒÁƦÞÎÉÈ
176 ÁÌÇÏÒÉÔͦ×, ×ËÌÀÞÁÀÞÉ DES, RC4, RSA ÔÁ SSL. í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ
177 ¦Â̦ÏÔÅËÉ ÄÌÑ ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ Ú ×ÉËÏÒÉÓÔÁÎÎÑÍ SSL.
178
179 %prep
180 %setup -q
181 %patch0 -p1
182 %patch1 -p1
183 %patch2 -p1
184 %patch3 -p1
185 %patch4 -p1
186 %patch5 -p1
187
188 %build
189 for f in ` grep -r "%{_prefix}/local/bin/perl" . | cut -d":" -f1`; do
190 %{__perl} -pi -e 's#%{_prefix}/local/bin/perl#%{__perl}#g' $f
191 done
192
193 touch Makefile.*
194
195 %{__perl} util/perlpath.pl %{__perl}
196
197 OPTFLAGS="%{rpmcflags}"
198 export OPTFLAGS
199 %ifarch i386 i486
200 ./Configure --openssldir=%{_var}/lib/%{name} linux-elf shared 386
201 %endif
202 %ifarch i586 i686 athlon
203 ./Configure --openssldir=%{_var}/lib/%{name} linux-elf shared
204 %endif
205 %ifarch amd64
206 ./Configure --openssldir=%{_var}/lib/%{name} linux-x86_64 shared
207 %endif
208 %ifarch ppc
209 ./Configure --openssldir=%{_var}/lib/%{name} linux-ppc shared
210 %endif
211 %ifarch alpha
212 ./Configure --openssldir=%{_var}/lib/%{name} threads linux-alpha+bwx-gcc shared
213 %endif
214 %ifarch sparc
215 ./Configure --openssldir=%{_var}/lib/%{name} threads linux-sparcv8 shared
216 %endif
217
218 %{__make} \
219         CC="%{__cc}" \
220         INSTALLTOP=%{_prefix}
221
222 %{__make} rehash \
223         CC="%{__cc}" \
224         INSTALLTOP=%{_prefix}
225
226 # Conv PODs to man pages. "openssl_" prefix is added to each manpage
227 # to avoid potential conflicts with others packages.
228 center="OpenSSL 0.9.7"
229 rel="OpenSSL 0.9.7"
230
231 cd doc/apps || exit 1
232 %{__perl} -pi -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
233
234 for pod in *.pod; do
235         if [ $pod != "openssl.pod" ]; then
236                 mv -f $pod openssl_$pod;
237                 pod=openssl_$pod;
238         fi
239
240         sec=1
241         if [ $pod = "openssl_config.pod" ]; then
242                 sec=5
243         fi
244
245         manpage=`basename $pod .pod`.$sec;
246         pod2man --section="$sec" --release="$rel" --center="$center" \
247                 $pod > $manpage;
248         echo "$manpage";
249 done
250 cd ..
251
252 sec=3
253 for dir in ssl crypto; do
254         cd $dir || exit 1;
255         if [ $dir = "ssl" ]; then
256                 rel="OpenSSL SSL/TLS library"
257         elif [ $dir = "crypto" ]; then
258                 rel="OpenSSL cryptographic library"
259         fi
260
261         %{__perl} -pi -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
262
263         for pod in *.pod; do
264                 sec=`[ "$pod" = "des_modes.pod" ] && echo 7 || echo 3`;
265                 mv -f $pod openssl_$pod;
266                 pod=openssl_$pod;
267                 manpage=`basename $pod .pod`.$sec;
268                 pod2man --section="$sec" --release="$rel" --center=" " $pod > $manpage;
269                 echo "$manpage";
270         done
271         cd ..
272 done
273
274 #cd perl
275 #%%{__perl} Makefile.PL \
276 #       INSTALLDIRS=vendor
277 #%{__make}
278
279 %install
280 rm -rf $RPM_BUILD_ROOT
281 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_libdir}/%{name}} \
282         $RPM_BUILD_ROOT{%{_mandir}/{pl/man1,man{1,3,5,7}},%{_datadir}/ssl} \
283         $RPM_BUILD_ROOT%{_pkgconfigdir}
284
285 %{__make} install \
286         INSTALLTOP=%{_prefix} \
287         INSTALL_PREFIX=$RPM_BUILD_ROOT \
288         MANDIR=%{_mandir}
289
290 if [ "%{_prefix}/lib/pkgconfig" != "%{_pkgconfigdir}" ] ; then
291         mv $RPM_BUILD_ROOT%{_prefix}/lib/pkgconfig/* \
292                 $RPM_BUILD_ROOT%{_pkgconfigdir}
293 fi
294
295 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/ssl/ca-bundle.crt
296 install libcrypto.a libssl.a $RPM_BUILD_ROOT%{_libdir}
297 install lib*.so.*.* $RPM_BUILD_ROOT%{_libdir}
298 ln -sf libcrypto.so.*.* $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
299 ln -sf libssl.so.*.* $RPM_BUILD_ROOT%{_libdir}/libssl.so
300
301 mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/openssl.cnf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
302 ln -s %{_sysconfdir}/%{name}/openssl.cnf \
303         $RPM_BUILD_ROOT%{_var}/lib/%{name}/%{name}.cnf
304
305 mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
306 rm -rf $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc
307
308 mv -f $RPM_BUILD_ROOT%{_bindir}/c_rehash $RPM_BUILD_ROOT%{_libdir}/%{name}
309
310 find $RPM_BUILD_ROOT%{_mandir} -type f | xargs rm -f
311 install doc/apps/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
312 install doc/apps/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
313 install doc/ssl/*.3 doc/crypto/*.3 $RPM_BUILD_ROOT%{_mandir}/man3
314 install doc/crypto/*.7 $RPM_BUILD_ROOT%{_mandir}/man7
315 install %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/pl/man1/openssl.1
316 install %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/ssl-certificate
317
318 %clean
319 rm -rf $RPM_BUILD_ROOT
320
321 %post   -p /sbin/ldconfig
322 %postun -p /sbin/ldconfig
323
324 %files
325 %defattr(644,root,root,755)
326 %attr(755,root,root) %{_libdir}/lib*.so.*.*
327 %doc CHANGES CHANGES.SSLeay LICENSE NEWS README doc/*.txt
328 %doc doc/openssl_button.gif doc/openssl_button.html
329
330 %files tools
331 %defattr(644,root,root,755)
332 %dir %{_sysconfdir}/%{name}
333 %dir %{_var}/lib/%{name}
334 %dir %{_var}/lib/%{name}/private
335 %dir %{_var}/lib/%{name}/certs
336
337 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/%{name}/openssl.cnf
338 %verify(not md5 size mtime) %config(noreplace) %{_var}/lib/%{name}/openssl.cnf
339 %dir %{_datadir}/ssl
340 %verify(not md5 size mtime) %config(noreplace) %{_datadir}/ssl/ca-bundle.crt
341
342 %attr(755,root,root) %{_bindir}/%{name}
343 %attr(754,root,root) %{_bindir}/ssl-certificate
344 %dir %{_libdir}/%{name}
345 %attr(755,root,root) %{_libdir}/%{name}/CA.sh
346 %attr(755,root,root) %{_libdir}/%{name}/c_hash
347 %attr(755,root,root) %{_libdir}/%{name}/c_info
348 %attr(755,root,root) %{_libdir}/%{name}/c_issuer
349 %attr(755,root,root) %{_libdir}/%{name}/c_name
350
351 %{_mandir}/man1/openssl.1*
352 %{_mandir}/man1/openssl_asn1parse.1*
353 %{_mandir}/man1/openssl_ca.1*
354 %{_mandir}/man1/openssl_ciphers.1*
355 %{_mandir}/man1/openssl_crl.1*
356 %{_mandir}/man1/openssl_crl2pkcs7.1*
357 %{_mandir}/man1/openssl_dgst.1*
358 %{_mandir}/man1/openssl_dhparam.1*
359 %{_mandir}/man1/openssl_dsa.1*
360 %{_mandir}/man1/openssl_dsaparam.1*
361 %{_mandir}/man1/openssl_enc.1*
362 %{_mandir}/man1/openssl_gendsa.1*
363 %{_mandir}/man1/openssl_genrsa.1*
364 %{_mandir}/man1/openssl_nseq.1*
365 %{_mandir}/man1/openssl_ocsp.1*
366 %{_mandir}/man1/openssl_passwd.1*
367 %{_mandir}/man1/openssl_pkcs12.1*
368 %{_mandir}/man1/openssl_pkcs7.1*
369 %{_mandir}/man1/openssl_pkcs8.1*
370 %{_mandir}/man1/openssl_rand.1*
371 %{_mandir}/man1/openssl_req.1*
372 %{_mandir}/man1/openssl_rsa.1*
373 %{_mandir}/man1/openssl_rsautl.1*
374 %{_mandir}/man1/openssl_s_client.1*
375 %{_mandir}/man1/openssl_s_server.1*
376 %{_mandir}/man1/openssl_sess_id.1*
377 %{_mandir}/man1/openssl_smime.1*
378 %{_mandir}/man1/openssl_speed.1*
379 %{_mandir}/man1/openssl_spkac.1*
380 %{_mandir}/man1/openssl_verify.1*
381 %{_mandir}/man1/openssl_version.1*
382 %{_mandir}/man1/openssl_x509.1*
383 %{_mandir}/man5/*.5*
384 %lang(pl) %{_mandir}/pl/man1/openssl.1*
385
386 %files tools-perl
387 %defattr(644,root,root,755)
388 %attr(755,root,root) %{_libdir}/%{name}/CA.pl
389 %attr(755,root,root) %{_libdir}/%{name}/der_chop
390 %attr(755,root,root) %{_libdir}/%{name}/c_rehash
391 %{_mandir}/man1/openssl_CA.pl.1*
392
393 %files devel
394 %defattr(644,root,root,755)
395 %attr(755,root,root) %{_libdir}/lib*.so
396 %{_includedir}/%{name}
397 %{_pkgconfigdir}/openssl.pc
398 %{_mandir}/man3/openssl*.3*
399 %{_mandir}/man7/*.7*
400
401 %files static
402 %defattr(644,root,root,755)
403 %{_libdir}/lib*.a
This page took 0.140222 seconds and 4 git commands to generate.