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