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