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