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