]> git.pld-linux.org Git - packages/openssl.git/blob - openssl.spec
remove crypt(3) from libcrypto
[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:        4
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
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 %package tools
59 Summary:        OpenSSL command line tool and utilities
60 Group:          Applications/Communications
61 Group(de):      Applikationen/Kommunikation
62 Group(pl):      Aplikacje/Komunikacja
63 Requires:       %{name} = %{version}
64
65 %description tools
66 The OpenSSL Toolkit cmdline tool openssl and utility scripts.
67
68 %package tools-perl
69 Summary:        OpenSSL utilities written in Perl
70 Group:          Applications/Communications
71 Group(de):      Applikationen/Kommunikation
72 Group(fr):      Utilitaires
73 Group(pl):      Aplikacje/Komunikacja
74 Requires:       %{name} = %{version}
75
76 %description tools-perl
77 OpenSSL Toolkit tools written in Perl.
78
79 %package devel
80 Summary:        Development part of OpenSSL Toolkit libraries
81 Summary(de):    Secure Sockets Layer Kommunikationslibrary: statische libraries+header
82 Summary(fr):    Librairies statiques, headers et utilitaires pour communication SSL
83 Summary(pl):    Czê¶æ bibiloteki OpenSSL przeznaczona dla programistów
84 Group:          Development/Libraries
85 Group(de):      Entwicklung/Libraries
86 Group(fr):      Development/Librairies
87 Group(pl):      Programowanie/Biblioteki
88 Requires:       %{name} = %{version}
89
90 %description devel
91 Development part of OpenSSL library.
92
93 %description devel -l pl
94 Czê¶æ bibiloteki OpenSSL przeznaczona dla programistów.
95
96 %package static
97 Summary:        Static OpenSSL libraries
98 Summary(pl):    Statyczne wersje bibliotek z OpenSSL
99 Group:          Development/Libraries
100 Group(de):      Entwicklung/Libraries
101 Group(fr):      Development/Librairies
102 Group(pl):      Programowanie/Biblioteki
103 Requires:       %{name}-devel = %{version}
104
105 %description static
106 Static OpenSSL Toolkit libraries.
107
108 %description static -l pl
109 Statyczne wersje bibliotek z OpenSSL.
110
111 %prep
112 %setup -q 
113 %patch0 -p1
114 %patch1 -p1
115 %patch2 -p1
116 %patch3 -p1
117
118 %build
119 for f in ` grep -r "/usr/local/bin/perl" . | cut -d":" -f1`; do
120         perl -pi -e 's#/usr/local/bin/perl#%{_bindir}/perl#g' $f
121 done
122
123 touch Makefile.*
124
125 perl util/perlpath.pl %{_bindir}/perl
126
127 OPTFLAGS="%{rpmcflags}"
128 export OPTFLAGS
129 %ifarch i386 i486
130 ./Configure --openssldir=%{_var}/lib/%{name} linux-elf shared 386
131 %endif
132 %ifarch i586 i686
133 ./Configure --openssldir=%{_var}/lib/%{name} linux-elf shared
134 %endif
135 %ifarch ppc
136 ./Configure --openssldir=%{_var}/lib/%{name} linux-ppc shared
137 %endif
138 %ifarch alpha
139 ./Configure --openssldir=%{_var}/lib/%{name} threads linux-alpha+bwx-gcc shared
140 %endif
141 %ifarch sparc
142 ./Configure --openssldir=%{_var}/lib/%{name} threads linux-sparcv8 shared
143 %endif
144
145 %{__make}
146 %{__make} rehash
147
148 # Conv PODs to man pages. "openssl_" prefix is added to each manpage 
149 # to avoid potential conflicts with others packages.
150 center="OpenSSL 0.9.6"
151 rel="OpenSSL 0.9.6"
152
153 cd doc/apps || exit 1 
154 perl -pi -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
155
156 for pod in *.pod; do 
157     if [ $pod != "openssl.pod" ]; then
158         mv -f $pod openssl_$pod;
159         pod=openssl_$pod;
160     fi
161
162     sec=1
163     if [ $pod = "openssl_config.pod" ]; then
164         sec=5
165     fi
166
167     manpage=`basename $pod .pod`.$sec;      
168     pod2man --section="$sec" --release="$rel" --center="$center" \
169             $pod > $manpage;
170     echo "$manpage";
171 done
172 cd ..
173
174 sec=3
175 for dir in ssl crypto; do 
176         cd $dir || exit 1;
177         if [ $dir = "ssl" ]; then
178                 rel="OpenSSL SSL/TLS library"
179         elif [ $dir = "crypto" ]; then 
180                 rel="OpenSSL cryptographic library"
181         fi
182         
183         perl -p -i -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
184         
185         for pod in *.pod; do 
186             sec=`[ "$pod" = "des_modes.pod" ] && echo 7 || echo 3`;     
187             mv -f $pod openssl_$pod;
188             pod=openssl_$pod;
189             manpage=`basename $pod .pod`.$sec;
190             pod2man --section="$sec" --release="$rel" --center=" " $pod > $manpage;
191             echo "$manpage";
192         done
193         cd ..
194 done
195
196 #cd perl
197 #perl Makefile.PL
198 #make
199
200 %install
201 rm -rf $RPM_BUILD_ROOT
202 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_libdir}/%{name}} \
203            $RPM_BUILD_ROOT%{_mandir}/man{1,3,5,7}
204
205 %{__make} install \
206         INSTALLTOP=%{_prefix} \
207         INSTALL_PREFIX=$RPM_BUILD_ROOT
208
209 install libRSAglue.a libcrypto.a libssl.a       $RPM_BUILD_ROOT%{_libdir}
210 install lib*.so.*.*     $RPM_BUILD_ROOT%{_libdir}
211 ln -sf libcrypto.so.*.* $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
212 ln -sf libssl.so.*.* $RPM_BUILD_ROOT%{_libdir}/libssl.so
213
214 mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/openssl.cnf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
215 ln -s %{_sysconfdir}/%{name}/openssl.cnf \
216         $RPM_BUILD_ROOT%{_var}/lib/%{name}/%{name}.cnf
217
218 mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc/*  $RPM_BUILD_ROOT%{_libdir}/%{name}
219 rm -rf $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc
220
221 mv -f $RPM_BUILD_ROOT%{_bindir}/c_rehash $RPM_BUILD_ROOT%{_libdir}/%{name}
222
223 find $RPM_BUILD_ROOT%{_mandir} -type f | xargs rm -f
224 install doc/apps/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
225 install doc/apps/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
226 install doc/ssl/*.3 doc/crypto/*.3 $RPM_BUILD_ROOT%{_mandir}/man3
227 install doc/crypto/*.7 $RPM_BUILD_ROOT%{_mandir}/man7
228
229 gzip -9nf CHANGES CHANGES.SSLeay LICENSE NEWS README doc/*.txt
230
231 %post   -p /sbin/ldconfig
232 %postun -p /sbin/ldconfig
233
234 %clean
235 rm -rf $RPM_BUILD_ROOT
236
237 %files
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_libdir}/lib*.so.*.*
240 %doc {CHANGES,CHANGES.SSLeay,LICENSE,NEWS,README}.gz
241 %doc doc/*.txt.gz doc/openssl_button.gif doc/openssl_button.html
242
243 %files tools
244 %defattr(644,root,root,755)
245 %dir %{_sysconfdir}/%{name}
246 %dir %{_var}/lib/%{name}
247 %dir %{_var}/lib/%{name}/private
248 %dir %{_var}/lib/%{name}/certs
249 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/%{name}/openssl.cnf
250 %verify(not md5 size mtime) %config(noreplace) %{_var}/lib/%{name}/openssl.cnf
251
252 %attr(755,root,root) %{_bindir}/%{name}
253 %dir %{_libdir}/%{name}
254 %attr(755,root,root) %{_libdir}/%{name}/CA.sh
255 %attr(755,root,root) %{_libdir}/%{name}/c_hash
256 %attr(755,root,root) %{_libdir}/%{name}/c_info
257 %attr(755,root,root) %{_libdir}/%{name}/c_issuer
258 %attr(755,root,root) %{_libdir}/%{name}/c_name
259
260 %{_mandir}/man1/openssl.1*
261 %{_mandir}/man1/openssl_asn1parse.1*
262 %{_mandir}/man1/openssl_ca.1*
263 %{_mandir}/man1/openssl_ciphers.1*
264 %{_mandir}/man1/openssl_crl.1*
265 %{_mandir}/man1/openssl_crl2pkcs7.1*
266 %{_mandir}/man1/openssl_dgst.1*
267 %{_mandir}/man1/openssl_dhparam.1*
268 %{_mandir}/man1/openssl_dsa.1*
269 %{_mandir}/man1/openssl_dsaparam.1*
270 %{_mandir}/man1/openssl_enc.1*
271 %{_mandir}/man1/openssl_gendsa.1*
272 %{_mandir}/man1/openssl_genrsa.1*
273 %{_mandir}/man1/openssl_nseq.1*
274 %{_mandir}/man1/openssl_passwd.1*
275 %{_mandir}/man1/openssl_pkcs12.1*
276 %{_mandir}/man1/openssl_pkcs7.1*
277 %{_mandir}/man1/openssl_pkcs8.1*
278 %{_mandir}/man1/openssl_rand.1*
279 %{_mandir}/man1/openssl_req.1*
280 %{_mandir}/man1/openssl_rsa.1*
281 %{_mandir}/man1/openssl_s_client.1*
282 %{_mandir}/man1/openssl_s_server.1*
283 %{_mandir}/man1/openssl_sess_id.1*
284 %{_mandir}/man1/openssl_smime.1*
285 %{_mandir}/man1/openssl_speed.1*
286 %{_mandir}/man1/openssl_spkac.1*
287 %{_mandir}/man1/openssl_verify.1*
288 %{_mandir}/man1/openssl_version.1*
289 %{_mandir}/man1/openssl_x509.1*
290 %{_mandir}/man5/*.5*
291
292 %files tools-perl
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_libdir}/%{name}/CA.pl
295 %attr(755,root,root) %{_libdir}/%{name}/der_chop
296 %attr(755,root,root) %{_libdir}/%{name}/c_rehash
297 %{_mandir}/man1/openssl_CA.pl.1*
298
299 %files devel
300 %defattr(644,root,root,755)
301 %attr(755,root,root) %{_libdir}/lib*.so
302 %{_includedir}/%{name}
303 %{_mandir}/man3/*.3*
304
305 %files static
306 %defattr(644,root,root,755)
307 %{_libdir}/lib*.a
This page took 0.05136 seconds and 4 git commands to generate.