]> git.pld-linux.org Git - packages/openssl.git/blob - openssl.spec
- s/\.gz/\*/ in %files for mana pages,
[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.5a
7 Release:        3
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:  symlinks
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
38 if 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:          Utilities
54 Group(pl):      Narzêdzia
55 Group(fr):      Utilitaires
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:          Utilities
64 Group(pl):      Narzêdzia
65 Group(fr):      Utilitaires
66 Requires:       %{name} = %{version}
67
68 %description tools-perl
69 OpenSSL Toolkit tools written in Perl.
70
71 %package devel
72 Summary:        Development part of OpenSSL Toolkit libraries
73 Summary(de):    Secure Sockets Layer Kommunikationslibrary: statische libraries+header
74 Summary(fr):    Librairies statiques, headers et utilitaires pour communication SSL
75 Summary(pl):    Czê¶æ bibiloteki OpenSSL przeznaczona dla programistów
76 Group:          Development/Libraries
77 Group(pl):      Programowanie/Biblioteki
78 Group(fr):      Development/Librairies
79 Requires:       %{name} = %{version}
80
81 %description devel
82 Development part of OpenSSL library.
83
84 %description devel -l pl
85 Czê¶æ bibiloteki OpenSSL przeznaczona dla programistów.
86
87 %package static
88 Summary:        Static OpenSSL libraries
89 Summary(pl):    Statyczne wersje bibliotek z OpenSSL
90 Group:          Development/Libraries
91 Group(pl):      Programowanie/Biblioteki
92 Group(fr):      Development/Librairies
93 Requires:       %{name}-devel = %{version}
94
95 %description static
96 Static OpenSSL Toolkit libraries.
97
98 %description static -l pl
99 Statyczne wersje bibliotek z OpenSSL.
100
101 %prep
102 %setup -q 
103 %patch -p1
104
105 %build
106 for i in Configure Makefile.org ; do
107         perl -pi -e 's#-m486##g' $i
108         perl -pi -e 's#-O3 -fomit-frame-pointer#%{optflags}#g' $i
109 done
110
111 perl util/perlpath.pl %{_bindir}
112
113 ./config --openssldir=%{_var}/lib/%{name}
114
115 %{__make} OPT_FLAGS="$RPM_OPT_FLAGS" linux-shared
116 %{__make} INSTALLTOP=%{_prefix} OPT_FLAGS="$RPM_OPT_FLAGS"
117 %{__make} rehash
118
119 # Conv PODs to man pages. "openssl_" prefix is added to each manpage 
120 # to avoid potential conflicts with others packages.
121 center="OpenSSL 0.9.5a"
122 rel="OpenSSL 0.9.5a"
123
124 cd doc/apps || exit 1 
125 perl -pi -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
126
127 for pod in *.pod; do 
128     if [ $pod != "openssl.pod" ]; then
129         mv $pod openssl_$pod;
130         pod=openssl_$pod;
131     fi
132
133     sec=1
134     if [ $pod = "openssl_config.pod" ]; then
135         sec=5
136     fi
137
138     manpage=`basename $pod .pod`.$sec;      
139     pod2man --section="$sec" --release="$rel" --center="$center" \
140             $pod > $manpage;
141     echo "$manpage";
142 done
143 cd ..
144
145 sec=3
146 for dir in ssl crypto; do 
147         cd $dir || exit 1;
148         if [ $dir = "ssl" ]; then
149                 rel="OpenSSL SSL/TLS library"
150         elif [ $dir = "crypto" ]; then 
151                 rel="OpenSSL cryptographic library"
152         fi
153         
154         perl -p -i -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
155         
156         for pod in *.pod; do 
157             sec=`[ "$pod" = "des_modes.pod" ] && echo 7 || echo 3`;     
158             mv $pod openssl_$pod;
159             pod=openssl_$pod;
160             manpage=`basename $pod .pod`.$sec;
161             pod2man --section="$sec" --release="$rel" --center=" " $pod > $manpage;
162             echo "$manpage";
163         done
164         cd ..
165 done
166
167 #cd perl
168 #perl Makefile.PL
169 #make
170
171 %install
172 rm -rf $RPM_BUILD_ROOT
173 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_libdir}/%{name}} \
174            $RPM_BUILD_ROOT%{_mandir}/man{1,3,5,7}
175
176 %{__make} install \
177         INSTALLTOP=%{_prefix} \
178         INSTALL_PREFIX=$RPM_BUILD_ROOT
179
180 install libRSAglue.a    $RPM_BUILD_ROOT%{_libdir}
181 install lib*.so.*.*     $RPM_BUILD_ROOT%{_libdir}
182 cp -d   lib*.so         $RPM_BUILD_ROOT%{_libdir}
183
184 #cd perl
185 #make install DESTDIR=$RPM_BUILD_ROOT
186 #cd ..
187
188 mv $RPM_BUILD_ROOT%{_var}/lib/%{name}/openssl.cnf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
189 ln -s %{_sysconfdir}/%{name}/openssl.cnf \
190         $RPM_BUILD_ROOT%{_var}/lib/%{name}/%{name}.cnf
191 symlinks -cs $RPM_BUILD_ROOT%{_var}/lib/%{name}
192
193 mv $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc/*  $RPM_BUILD_ROOT%{_libdir}/%{name}
194 rm -rf $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc
195
196 mv $RPM_BUILD_ROOT%{_bindir}/c_rehash $RPM_BUILD_ROOT%{_libdir}/%{name}
197
198 strip $RPM_BUILD_ROOT%{_bindir}/* || :
199 strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.*
200
201 find $RPM_BUILD_ROOT%{_mandir} -type f | xargs rm -f
202 install doc/apps/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
203 install doc/apps/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
204 install doc/ssl/*.3 doc/crypto/*.3 $RPM_BUILD_ROOT%{_mandir}/man3
205 install doc/crypto/*.7 $RPM_BUILD_ROOT%{_mandir}/man7
206
207 gzip -9nf {CHANGES,CHANGES.SSLeay,LICENSE,NEWS,README,doc/*.txt} \
208         $RPM_BUILD_ROOT%{_mandir}/man?/*
209
210 %post   -p /sbin/ldconfig
211 %postun -p /sbin/ldconfig
212
213 %clean
214 rm -rf $RPM_BUILD_ROOT
215
216 %files
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_libdir}/lib*.so.*.*
219 %doc {CHANGES,CHANGES.SSLeay,LICENSE,NEWS,README}.gz
220 %doc doc/*.txt.gz doc/openssl_button.gif doc/openssl_button.html
221
222 %files tools
223 %defattr(644,root,root,755)
224 %dir %{_sysconfdir}/%{name}
225 %dir %{_var}/lib/%{name}
226 %dir %{_var}/lib/%{name}/private
227 %dir %{_var}/lib/%{name}/certs
228 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/%{name}/openssl.cnf
229 %verify(not md5 size mtime) %config(noreplace) %{_var}/lib/%{name}/openssl.cnf
230
231 %attr(755,root,root) %{_bindir}/%{name}
232 %dir %{_libdir}/%{name}
233 %attr(755,root,root) %{_libdir}/%{name}/CA.sh
234 %attr(755,root,root) %{_libdir}/%{name}/c_hash
235 %attr(755,root,root) %{_libdir}/%{name}/c_rehash
236 %attr(755,root,root) %{_libdir}/%{name}/c_info
237 %attr(755,root,root) %{_libdir}/%{name}/c_issuer
238 %attr(755,root,root) %{_libdir}/%{name}/c_name
239
240 %{_mandir}/man1/openssl.1*
241 %{_mandir}/man1/openssl_asn1parse.1*
242 %{_mandir}/man1/openssl_ca.1*
243 %{_mandir}/man1/openssl_ciphers.1*
244 %{_mandir}/man1/openssl_crl.1*
245 %{_mandir}/man1/openssl_crl2pkcs7.1*
246 %{_mandir}/man1/openssl_dgst.1*
247 %{_mandir}/man1/openssl_dhparam.1*
248 %{_mandir}/man1/openssl_dsa.1*
249 %{_mandir}/man1/openssl_dsaparam.1*
250 %{_mandir}/man1/openssl_enc.1*
251 %{_mandir}/man1/openssl_gendsa.1*
252 %{_mandir}/man1/openssl_genrsa.1*
253 %{_mandir}/man1/openssl_nseq.1*
254 %{_mandir}/man1/openssl_passwd.1*
255 %{_mandir}/man1/openssl_pkcs12.1*
256 %{_mandir}/man1/openssl_pkcs7.1*
257 %{_mandir}/man1/openssl_pkcs8.1*
258 %{_mandir}/man1/openssl_rand.1*
259 %{_mandir}/man1/openssl_req.1*
260 %{_mandir}/man1/openssl_rsa.1*
261 %{_mandir}/man1/openssl_s_client.1*
262 %{_mandir}/man1/openssl_s_server.1*
263 %{_mandir}/man1/openssl_sess_id.1*
264 %{_mandir}/man1/openssl_smime.1*
265 %{_mandir}/man1/openssl_speed.1*
266 %{_mandir}/man1/openssl_spkac.1*
267 %{_mandir}/man1/openssl_verify.1*
268 %{_mandir}/man1/openssl_version.1*
269 %{_mandir}/man1/openssl_x509.1*
270 %{_mandir}/man5/*.5*
271
272 %files tools-perl
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{_libdir}/%{name}/CA.pl
275 %attr(755,root,root) %{_libdir}/%{name}/der_chop
276 %{_mandir}/man1/openssl_CA.pl.1*
277
278 %files devel
279 %defattr(644,root,root,755)
280 %attr(755,root,root) %{_libdir}/lib*.so
281 %{_includedir}/%{name}
282 %{_mandir}/man3/*.3*
283
284 %files static
285 %defattr(644,root,root,755)
286 %{_libdir}/lib*.a
This page took 0.071277 seconds and 4 git commands to generate.