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