]> git.pld-linux.org Git - packages/openssl.git/blob - openssl.spec
updated to 0.9.6a
[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.6
7 Release:        6
8 Group:          Libraries
9 Group(de):      Libraries
10 Group(fr):      Librairies
11 Group(pl):      Biblioteki
12 Source0:        ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
13 Patch0:         %{name}-alpha-ccc.patch
14 Vendor:         The OpenSSL Project
15 License:        Apache-style License
16 BuildRequires:  perl
17 BuildRequires:  textutils
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 Obsoletes:      SSLeay
20 Obsoletes:      SSLeay-devel
21 Obsoletes:      SSLeay-perl
22
23 %description
24 The OpenSSL Project is a collaborative effort to develop a robust,
25 commercial-grade, full-featured, and Open Source toolkit implementing
26 the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
27 v1) protocols with full-strength cryptography world-wide. The project
28 is managed by a worldwide community of volunteers that use the
29 Internet to communicate, plan, and develop the OpenSSL tookit and its
30 related documentation.
31
32 OpenSSL is based on the excellent SSLeay library developed by Eric A.
33 Young and Tim J. Hudson. The OpenSSL toolkit is licensed under an
34 Apache-style licence, which basically means that you are free to get
35 and use it for commercial and non-commercial purposes subject to some
36 simple license conditions.
37
38 This package contains shared libraries only, install openssl-tools if
39 you want to use openssl cmdline tool.
40
41 %description -l de
42 Openssl enthält das OpenSSL Zertifikatsmanagementtool und shared
43 libraries, die verschiedene Verschlüsselungs- und
44 Entschlüsselungsalgorithmen und
45 - -protokolle, wie DES, RC4, RSA und SSL zur Verfügung stellen.
46
47 %description -l fr
48 OpenSSL est un outiil de gestion des certificats et les librairies
49 partagees qui fournit plusieurs protocoles et algorithmes de
50 codage/decodage, incluant DES, RC4, RSA et SSL.
51
52 %package tools
53 Summary:        OpenSSL command line tool and utilities
54 Group:          Applications/Communications
55 Group(de):      Applikationen/Kommunikation
56 Group(pl):      Aplikacje/Komunikacja
57 Requires:       %{name} = %{version}
58
59 %description tools
60 The OpenSSL Toolkit cmdline tool openssl and utility scripts.
61
62 %package tools-perl
63 Summary:        OpenSSL utilities written in Perl
64 Group:          Applications/Communications
65 Group(de):      Applikationen/Kommunikation
66 Group(fr):      Utilitaires
67 Group(pl):      Aplikacje/Komunikacja
68 Requires:       %{name} = %{version}
69
70 %description tools-perl
71 OpenSSL Toolkit tools written in Perl.
72
73 %package devel
74 Summary:        Development part of OpenSSL Toolkit libraries
75 Summary(de):    Secure Sockets Layer Kommunikationslibrary: statische libraries+header
76 Summary(fr):    Librairies statiques, headers et utilitaires pour communication SSL
77 Summary(pl):    Czê¶æ bibiloteki OpenSSL przeznaczona dla programistów
78 Group:          Development/Libraries
79 Group(de):      Entwicklung/Libraries
80 Group(fr):      Development/Librairies
81 Group(pl):      Programowanie/Biblioteki
82 Requires:       %{name} = %{version}
83
84 %description devel
85 Development part of OpenSSL library.
86
87 %description devel -l pl
88 Czê¶æ bibiloteki OpenSSL przeznaczona dla programistów.
89
90 %package static
91 Summary:        Static OpenSSL libraries
92 Summary(pl):    Statyczne wersje bibliotek z OpenSSL
93 Group:          Development/Libraries
94 Group(de):      Entwicklung/Libraries
95 Group(fr):      Development/Librairies
96 Group(pl):      Programowanie/Biblioteki
97 Requires:       %{name}-devel = %{version}
98
99 %description static
100 Static OpenSSL Toolkit libraries.
101
102 %description static -l pl
103 Statyczne wersje bibliotek z OpenSSL.
104
105 %prep
106 %setup -q 
107 %patch0 -p1
108
109 %build
110 for f in ` grep -r "/usr/local/bin/perl" . | cut -d":" -f1`; do
111         perl -pi -e 's#/usr/local/bin/perl#%{_bindir}/perl#g' $f
112 done
113
114 for i in Configure Makefile.org ; do
115         perl -pi -e 's#-m486##g' $i
116         perl -pi -e 's#-O3 -fomit-frame-pointer#%{optflags}#g' $i
117         perl -pi -e 's#-mcpu=ultrasparc#%{optflags}#g' $i
118 done
119 touch Makefile.*
120
121 perl util/perlpath.pl %{_bindir}/perl
122
123 %ifarch i386 i486
124 ./Configure --openssldir=%{_var}/lib/%{name} linux-elf shared 386
125 %endif
126 %ifarch i586 i686
127 ./Configure --openssldir=%{_var}/lib/%{name} linux-elf shared
128 %endif
129 %ifarch ppc
130 ./Configure --openssldir=%{_var}/lib/%{name} linux-ppc shared
131 %endif
132 %ifarch alpha
133 ./Configure --openssldir=%{_var}/lib/%{name} threads linux-alpha+bwx-gcc
134 %endif
135
136 %{__make} OPT_FLAGS="%{rpmcflags} -DSSL_ALLOW_DH"
137 %{__make} INSTALLTOP=%{_prefix} \
138         OPT_FLAGS="%{rpmcflags}"
139 %ifarch alpha
140 %{__make} linux-shared
141 %endif
142 %{__make} rehash
143
144 # Conv PODs to man pages. "openssl_" prefix is added to each manpage 
145 # to avoid potential conflicts with others packages.
146 center="OpenSSL 0.9.6"
147 rel="OpenSSL 0.9.6"
148
149 cd doc/apps || exit 1 
150 perl -pi -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
151
152 for pod in *.pod; do 
153     if [ $pod != "openssl.pod" ]; then
154         mv -f $pod openssl_$pod;
155         pod=openssl_$pod;
156     fi
157
158     sec=1
159     if [ $pod = "openssl_config.pod" ]; then
160         sec=5
161     fi
162
163     manpage=`basename $pod .pod`.$sec;      
164     pod2man --section="$sec" --release="$rel" --center="$center" \
165             $pod > $manpage;
166     echo "$manpage";
167 done
168 cd ..
169
170 sec=3
171 for dir in ssl crypto; do 
172         cd $dir || exit 1;
173         if [ $dir = "ssl" ]; then
174                 rel="OpenSSL SSL/TLS library"
175         elif [ $dir = "crypto" ]; then 
176                 rel="OpenSSL cryptographic library"
177         fi
178         
179         perl -p -i -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
180         
181         for pod in *.pod; do 
182             sec=`[ "$pod" = "des_modes.pod" ] && echo 7 || echo 3`;     
183             mv -f $pod openssl_$pod;
184             pod=openssl_$pod;
185             manpage=`basename $pod .pod`.$sec;
186             pod2man --section="$sec" --release="$rel" --center=" " $pod > $manpage;
187             echo "$manpage";
188         done
189         cd ..
190 done
191
192 #cd perl
193 #perl Makefile.PL
194 #make
195
196 %install
197 rm -rf $RPM_BUILD_ROOT
198 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_libdir}/%{name}} \
199            $RPM_BUILD_ROOT%{_mandir}/man{1,3,5,7}
200
201 %{__make} install \
202         INSTALLTOP=%{_prefix} \
203         INSTALL_PREFIX=$RPM_BUILD_ROOT
204
205 install libRSAglue.a libcrypto.a libssl.a       $RPM_BUILD_ROOT%{_libdir}
206 install lib*.so.*.*     $RPM_BUILD_ROOT%{_libdir}
207 ln -sf libcrypto.so.*.* $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
208 ln -sf libssl.so.*.* $RPM_BUILD_ROOT%{_libdir}/libssl.so
209
210 #cd perl
211 #make install DESTDIR=$RPM_BUILD_ROOT
212 #cd ..
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.053887 seconds and 4 git commands to generate.