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