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