]> git.pld-linux.org Git - packages/openssl.git/blob - openssl.spec
- adding es/fr/pt_BR/ru/uk (and eventually de) Group translations
[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(es):      Desarrollo/Bibliotecas
101 Group(fr):      Development/Librairies
102 Group(pl):      Programowanie/Biblioteki
103 Group(pt_BR):   Desenvolvimento/Bibliotecas
104 Group(ru):      òÁÚÒÁÂÏÔËÁ/âÉÂÌÉÏÔÅËÉ
105 Group(uk):      òÏÚÒÏÂËÁ/â¦Â̦ÏÔÅËÉ
106 Requires:       %{name} = %{version}
107 Obsoletes:      libopenssl0-devel
108
109 %description devel
110 Development part of OpenSSL library.
111
112 %description devel -l pl
113 Czê¶æ bibiloteki OpenSSL przeznaczona dla programistów.
114
115 %package devel-embed
116 Summary:        Development part of OpenSSL Toolkit embedded libraries
117 Summary(pl):    Czê¶æ bibiloteki OpenSSL przeznaczona dla aplikacji wbudowanych
118 Group:          Development/Libraries
119 Group(de):      Entwicklung/Libraries
120 Group(es):      Desarrollo/Bibliotecas
121 Group(fr):      Development/Librairies
122 Group(pl):      Programowanie/Biblioteki
123 Group(pt_BR):   Desenvolvimento/Bibliotecas
124 Group(ru):      òÁÚÒÁÂÏÔËÁ/âÉÂÌÉÏÔÅËÉ
125 Group(uk):      òÏÚÒÏÂËÁ/â¦Â̦ÏÔÅËÉ
126 Requires:       %{name} = %{version}
127
128 %description devel-embed
129 Development part of OpenSSL library for embedded applications.
130
131 %description -l pl devel-embed
132 Czê¶æ bibiloteki OpenSSL przeznaczona dla programistów aplikacji
133 wbudowanych.
134
135 %package static
136 Summary:        Static OpenSSL libraries
137 Summary(pl):    Statyczne wersje bibliotek z OpenSSL
138 Group:          Development/Libraries
139 Group(de):      Entwicklung/Libraries
140 Group(es):      Desarrollo/Bibliotecas
141 Group(fr):      Development/Librairies
142 Group(pl):      Programowanie/Biblioteki
143 Group(pt_BR):   Desenvolvimento/Bibliotecas
144 Group(ru):      òÁÚÒÁÂÏÔËÁ/âÉÂÌÉÏÔÅËÉ
145 Group(uk):      òÏÚÒÏÂËÁ/â¦Â̦ÏÔÅËÉ
146 Requires:       %{name}-devel = %{version}
147
148 %description static
149 Static OpenSSL Toolkit libraries.
150
151 %description static -l pl
152 Statyczne wersje bibliotek z OpenSSL.
153
154 %prep
155 %setup -q 
156 %patch0 -p1
157 %patch1 -p1
158 %patch2 -p1
159 %patch3 -p1
160
161 %build
162 for f in ` grep -r "/usr/local/bin/perl" . | cut -d":" -f1`; do
163         perl -pi -e 's#/usr/local/bin/perl#%{_bindir}/perl#g' $f
164 done
165
166 touch Makefile.*
167
168 perl util/perlpath.pl %{_bindir}/perl
169
170 OPTFLAGS="%{rpmcflags}"
171 export OPTFLAGS
172 %ifarch i386 i486
173 ./Configure --openssldir=%{_var}/lib/%{name} linux-elf shared 386
174 %endif
175 %ifarch i586 i686 athlon
176 ./Configure --openssldir=%{_var}/lib/%{name} linux-elf shared
177 %endif
178 %ifarch ppc
179 ./Configure --openssldir=%{_var}/lib/%{name} linux-ppc shared
180 %endif
181 %ifarch alpha
182 ./Configure --openssldir=%{_var}/lib/%{name} threads linux-alpha+bwx-gcc shared
183 %endif
184 %ifarch sparc
185 ./Configure --openssldir=%{_var}/lib/%{name} threads linux-sparcv8 shared
186 %endif
187
188 %if %{!?_without_embed:1}%{?_without_embed:0}
189 %{__make} CC=%{embed_cc}
190 %{__make} rehash CC=%{embed_cc}
191 for f in RSAglue crypto ssl ; do
192         mv -f lib$f.a lib$f.a-embed
193 done
194 %{__make} clean
195 %endif
196
197 %{__make}
198 %{__make} rehash
199
200 # Conv PODs to man pages. "openssl_" prefix is added to each manpage 
201 # to avoid potential conflicts with others packages.
202 center="OpenSSL 0.9.6"
203 rel="OpenSSL 0.9.6"
204
205 cd doc/apps || exit 1 
206 perl -pi -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
207
208 for pod in *.pod; do 
209     if [ $pod != "openssl.pod" ]; then
210         mv -f $pod openssl_$pod;
211         pod=openssl_$pod;
212     fi
213
214     sec=1
215     if [ $pod = "openssl_config.pod" ]; then
216         sec=5
217     fi
218
219     manpage=`basename $pod .pod`.$sec;      
220     pod2man --section="$sec" --release="$rel" --center="$center" \
221             $pod > $manpage;
222     echo "$manpage";
223 done
224 cd ..
225
226 sec=3
227 for dir in ssl crypto; do 
228         cd $dir || exit 1;
229         if [ $dir = "ssl" ]; then
230                 rel="OpenSSL SSL/TLS library"
231         elif [ $dir = "crypto" ]; then 
232                 rel="OpenSSL cryptographic library"
233         fi
234         
235         perl -p -i -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
236         
237         for pod in *.pod; do 
238             sec=`[ "$pod" = "des_modes.pod" ] && echo 7 || echo 3`;     
239             mv -f $pod openssl_$pod;
240             pod=openssl_$pod;
241             manpage=`basename $pod .pod`.$sec;
242             pod2man --section="$sec" --release="$rel" --center=" " $pod > $manpage;
243             echo "$manpage";
244         done
245         cd ..
246 done
247
248 #cd perl
249 #perl Makefile.PL
250 #make
251
252 %install
253 rm -rf $RPM_BUILD_ROOT
254 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_libdir}/%{name}} \
255            $RPM_BUILD_ROOT%{_mandir}/man{1,3,5,7}
256
257 %{__make} install \
258         INSTALLTOP=%{_prefix} \
259         INSTALL_PREFIX=$RPM_BUILD_ROOT
260
261 install libRSAglue.a libcrypto.a libssl.a       $RPM_BUILD_ROOT%{_libdir}
262 install lib*.so.*.*     $RPM_BUILD_ROOT%{_libdir}
263 ln -sf libcrypto.so.*.* $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
264 ln -sf libssl.so.*.* $RPM_BUILD_ROOT%{_libdir}/libssl.so
265
266 mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/openssl.cnf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
267 ln -s %{_sysconfdir}/%{name}/openssl.cnf \
268         $RPM_BUILD_ROOT%{_var}/lib/%{name}/%{name}.cnf
269
270 mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc/*  $RPM_BUILD_ROOT%{_libdir}/%{name}
271 rm -rf $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc
272
273 mv -f $RPM_BUILD_ROOT%{_bindir}/c_rehash $RPM_BUILD_ROOT%{_libdir}/%{name}
274
275 find $RPM_BUILD_ROOT%{_mandir} -type f | xargs rm -f
276 install doc/apps/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
277 install doc/apps/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
278 install doc/ssl/*.3 doc/crypto/*.3 $RPM_BUILD_ROOT%{_mandir}/man3
279 install doc/crypto/*.7 $RPM_BUILD_ROOT%{_mandir}/man7
280
281 %if %{!?_without_embed:1}%{?_without_embed:0}
282 install -d $RPM_BUILD_ROOT%{uclibc_prefix}/{include,lib}
283 for f in RSAglue crypto ssl ; do
284         install lib$f.a-embed $RPM_BUILD_ROOT%{uclibc_prefix}/lib/lib$f.a
285 done
286 cp -a $RPM_BUILD_ROOT%{_includedir}/%{name} \
287         $RPM_BUILD_ROOT%{uclibc_prefix}/include
288 %endif
289
290 gzip -9nf CHANGES CHANGES.SSLeay LICENSE NEWS README doc/*.txt
291
292 %post   -p /sbin/ldconfig
293 %postun -p /sbin/ldconfig
294
295 %clean
296 rm -rf $RPM_BUILD_ROOT
297
298 %files
299 %defattr(644,root,root,755)
300 %attr(755,root,root) %{_libdir}/lib*.so.*.*
301 %doc {CHANGES,CHANGES.SSLeay,LICENSE,NEWS,README}.gz
302 %doc doc/*.txt.gz doc/openssl_button.gif doc/openssl_button.html
303
304 %files tools
305 %defattr(644,root,root,755)
306 %dir %{_sysconfdir}/%{name}
307 %dir %{_var}/lib/%{name}
308 %dir %{_var}/lib/%{name}/private
309 %dir %{_var}/lib/%{name}/certs
310 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/%{name}/openssl.cnf
311 %verify(not md5 size mtime) %config(noreplace) %{_var}/lib/%{name}/openssl.cnf
312
313 %attr(755,root,root) %{_bindir}/%{name}
314 %dir %{_libdir}/%{name}
315 %attr(755,root,root) %{_libdir}/%{name}/CA.sh
316 %attr(755,root,root) %{_libdir}/%{name}/c_hash
317 %attr(755,root,root) %{_libdir}/%{name}/c_info
318 %attr(755,root,root) %{_libdir}/%{name}/c_issuer
319 %attr(755,root,root) %{_libdir}/%{name}/c_name
320
321 %{_mandir}/man1/openssl.1*
322 %{_mandir}/man1/openssl_asn1parse.1*
323 %{_mandir}/man1/openssl_ca.1*
324 %{_mandir}/man1/openssl_ciphers.1*
325 %{_mandir}/man1/openssl_crl.1*
326 %{_mandir}/man1/openssl_crl2pkcs7.1*
327 %{_mandir}/man1/openssl_dgst.1*
328 %{_mandir}/man1/openssl_dhparam.1*
329 %{_mandir}/man1/openssl_dsa.1*
330 %{_mandir}/man1/openssl_dsaparam.1*
331 %{_mandir}/man1/openssl_enc.1*
332 %{_mandir}/man1/openssl_gendsa.1*
333 %{_mandir}/man1/openssl_genrsa.1*
334 %{_mandir}/man1/openssl_nseq.1*
335 %{_mandir}/man1/openssl_passwd.1*
336 %{_mandir}/man1/openssl_pkcs12.1*
337 %{_mandir}/man1/openssl_pkcs7.1*
338 %{_mandir}/man1/openssl_pkcs8.1*
339 %{_mandir}/man1/openssl_rand.1*
340 %{_mandir}/man1/openssl_req.1*
341 %{_mandir}/man1/openssl_rsa.1*
342 %{_mandir}/man1/openssl_s_client.1*
343 %{_mandir}/man1/openssl_s_server.1*
344 %{_mandir}/man1/openssl_sess_id.1*
345 %{_mandir}/man1/openssl_smime.1*
346 %{_mandir}/man1/openssl_speed.1*
347 %{_mandir}/man1/openssl_spkac.1*
348 %{_mandir}/man1/openssl_verify.1*
349 %{_mandir}/man1/openssl_version.1*
350 %{_mandir}/man1/openssl_x509.1*
351 %{_mandir}/man5/*.5*
352
353 %files tools-perl
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_libdir}/%{name}/CA.pl
356 %attr(755,root,root) %{_libdir}/%{name}/der_chop
357 %attr(755,root,root) %{_libdir}/%{name}/c_rehash
358 %{_mandir}/man1/openssl_CA.pl.1*
359
360 %files devel
361 %defattr(644,root,root,755)
362 %attr(755,root,root) %{_libdir}/lib*.so
363 %{_includedir}/%{name}
364 %{_mandir}/man3/*.3*
365
366 %if %{!?_without_embed:1}%{?_without_embed:0}
367 %files devel-embed
368 %defattr(644,root,root,755)
369 %{uclibc_prefix}/lib/*
370 %{uclibc_prefix}/include/%{name}
371 %endif
372
373 %files static
374 %defattr(644,root,root,755)
375 %{_libdir}/lib*.a
This page took 0.067867 seconds and 4 git commands to generate.