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