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