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