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