/[packages]/updates/8/openssl/current/SPECS/openssl.spec
ViewVC logotype

Annotation of /updates/8/openssl/current/SPECS/openssl.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 633458 - (hide annotations) (download)
Thu Jun 5 14:04:28 2014 UTC (9 years, 10 months ago) by luigiwalser
Original Path: cauldron/openssl/current/SPECS/openssl.spec
File size: 10199 byte(s)
- 1.0.1h
- remove upstreamed patches
- update manfix patch from fedora

1 guillomovitch 257018 %define maj 1.0.0
2 blino 733 %define engines_name %mklibname openssl-engines %{maj}
3     %define libname %mklibname openssl %{maj}
4     %define develname %mklibname openssl -d
5     %define staticname %mklibname openssl -s -d
6    
7     %define conflict1 %mklibname openssl 0.9.7
8     %define conflict2 %mklibname openssl 0.9.8
9    
10     # Number of threads to spawn when testing some threading fixes.
11     #define thread_test_threads %{?threads:%{threads}}%{!?threads:1}
12    
13 guillomovitch 494272 %define with_krb5 0
14 blino 733
15     Summary: Secure Sockets Layer communications libs & utils
16     Name: openssl
17 luigiwalser 633458 Version: 1.0.1h
18     Release: %mkrel 1
19 blino 733 License: BSD-like
20     Group: System/Libraries
21     URL: http://www.openssl.org/
22 fwang 394893 Source0: http://www.openssl.org/source/%{name}-%{version}.tar.gz
23     Source1: http://www.openssl.org/source/%{name}-%{version}.tar.gz.asc
24 blino 733 Source2: Makefile.certificate
25     Source3: make-dummy-cert
26     Source4: openssl-thread-test.c
27     # (gb) 0.9.7b-4mdk: Handle RPM_OPT_FLAGS in Configure
28 guillomovitch 256937 Patch2: openssl-1.0.1c-optflags.patch
29 blino 733 # (oe) support Brazilian Government OTHERNAME X509v3 field (#14158)
30     # http://www.iti.gov.br/resolucoes/RESOLU__O_13_DE_26_04_2002.PDF
31     Patch6: openssl-0.9.8-beta6-icpbrasil.diff
32 guillomovitch 256937 # http://qa.mandriva.com/show_bug.cgi?id=32621
33 luigiwalser 565222 Patch15: openssl-0.9.8e-crt.patch
34 guillomovitch 256937
35     # fedora patches
36 guillomovitch 191618 Patch7: openssl-1.0.0f-defaults.patch
37 blino 733 Patch12: openssl-0.9.6-x509.patch
38 guillomovitch 256937 Patch13: openssl-0.9.8j-version-add-engines.patch
39     Patch16: openssl-1.0.0-beta5-enginesdir.patch
40 guillomovitch 256938 Patch17: openssl-1.0.1-pkgconfig-krb5.patch
41 luigiwalser 633458 Patch18: openssl-1.0.1h-manfix.patch
42 guillomovitch 256937
43 blino 733 # MIPS and ARM support
44 guillomovitch 256937 Patch300: openssl-1.0.1c-mips.patch
45     Patch301: openssl-1.0.1c-arm.patch
46 blino 733 Requires: %{libname} = %{version}-%{release}
47     Requires: rootcerts
48 guillomovitch 337573 %if %with_krb5
49 guillomovitch 256938 BuildRequires: krb5-devel
50 guillomovitch 337573 %endif
51 blino 733 BuildRequires: multiarch-utils >= 1.0.3
52     BuildRequires: chrpath
53     BuildRequires: zlib-devel
54     # (tv) for test suite:
55     BuildRequires: bc
56    
57     %description
58     The openssl certificate management tool and the shared libraries that provide
59     various encryption and decription algorithms and protocols, including DES, RC4,
60     RSA and SSL.
61    
62     %package -n %{engines_name}
63     Summary: Engines for openssl
64     Group: System/Libraries
65     Obsoletes: openssl-engines < 1.0.0a-5
66     Provides: openssl-engines = %{version}-%{release}
67    
68     %description -n %{engines_name}
69     This package provides engines for openssl.
70    
71     %package -n %{libname}
72     Summary: Secure Sockets Layer communications libs
73     Group: System/Libraries
74     Requires: %{engines_name} >= %{version}-%{release}
75     Provides: %{libname} = %{version}-%{release}
76    
77     %description -n %{libname}
78     The libraries files are needed for various cryptographic algorithms
79     and protocols, including DES, RC4, RSA and SSL.
80    
81     %package -n %{develname}
82     Summary: Secure Sockets Layer communications libs & headers & utils
83     Group: Development/Other
84     Requires: %{libname} = %{version}-%{release}
85     Provides: libopenssl-devel
86     Provides: openssl-devel = %{version}-%{release}
87     Obsoletes: openssl-devel
88     # temporary opsolete, will be a conflict later. a compat package
89     # with openssl-0.9.7 devel libs will be provided soon
90     Obsoletes: %{conflict1}-devel
91     Obsoletes: %{conflict2}-devel
92     Obsoletes: %{mklibname openssl 1.0.0}-devel
93     Provides: %{name}-devel = %{version}-%{release}
94    
95     %description -n %{develname}
96     The libraries and include files needed to compile apps with support
97     for various cryptographic algorithms and protocols, including DES, RC4, RSA
98     and SSL.
99    
100     %package -n %{staticname}
101     Summary: Secure Sockets Layer communications static libs
102     Group: Development/Other
103     Requires: %{develname} = %{version}-%{release}
104     Provides: libopenssl-static-devel
105     Provides: openssl-static-devel = %{version}-%{release}
106     # temporary opsolete, will be a conflict later. a compat package
107     # with openssl-0.9.7 static-devel libs will be provided soon
108     Obsoletes: %{conflict1}-static-devel
109     Obsoletes: %{conflict2}-static-devel
110     Obsoletes: %{mklibname openssl 1.0.0}-static-devel
111     Provides: %{name}-static-devel = %{version}-%{release}
112    
113     %description -n %{staticname}
114     The static libraries needed to compile apps with support for various
115     cryptographic algorithms and protocols, including DES, RC4, RSA and SSL.
116    
117     %prep
118    
119     %setup -q -n %{name}-%{version}
120     %patch2 -p1 -b .optflags
121     %patch6 -p0 -b .icpbrasil
122     %patch7 -p1 -b .defaults
123     %patch12 -p1 -b .x509
124     %patch13 -p1 -b .version-add-engines
125     %patch15 -p1 -b .crt
126 guillomovitch 256937 %patch16 -p1 -b .engines
127 guillomovitch 256938 %patch17 -p1 -b .krb5
128 sander85 432014 %patch18 -p1 -b .manfix
129 blino 733
130     %patch300 -p1 -b .mips
131     %patch301 -p1 -b .arm
132    
133     perl -pi -e "s,^(OPENSSL_LIBNAME=).+$,\1%{_lib}," Makefile.org engines/Makefile
134    
135     cp %{SOURCE2} Makefile.certificate
136     cp %{SOURCE3} make-dummy-cert
137     cp %{SOURCE4} openssl-thread-test.c
138    
139     %build
140     %serverbuild
141    
142     # Figure out which flags we want to use.
143     # default
144     sslarch=%{_os}-%{_arch}
145     %ifarch %ix86
146     sslarch=linux-elf
147     if ! echo %{_target} | grep -q i[56]86 ; then
148     sslflags="no-asm"
149     fi
150     %endif
151     %ifarch sparcv9
152     sslarch=linux-sparcv9
153     %endif
154     %ifarch alpha
155     sslarch=linux-alpha-gcc
156     %endif
157     %ifarch s390
158     sslarch="linux-generic32 -DB_ENDIAN -DNO_ASM"
159     %endif
160     %ifarch s390x
161     sslarch="linux-generic64 -DB_ENDIAN -DNO_ASM"
162     %endif
163    
164     # ia64, x86_64, ppc, ppc64 are OK by default
165     # Configure the build tree. Override OpenSSL defaults with known-good defaults
166     # usable on all platforms. The Configure script already knows to use -fPIC and
167     # RPM_OPT_FLAGS, so we can skip specifiying them here.
168     ./Configure \
169 guillomovitch 256937 --prefix=%{_prefix} \
170 blino 733 --openssldir=%{_sysconfdir}/pki/tls ${sslflags} \
171 guillomovitch 256937 --libdir=%{_lib}/ \
172 guillomovitch 337573 %if %with_krb5
173 guillomovitch 256938 --with-krb5-flavor=MIT --with-krb5-dir=%{_prefix} \
174 guillomovitch 337573 %endif
175 guillomovitch 327008 --enginesdir=%{_libdir}/openssl/%{version}/engines \
176 guillomovitch 256937 zlib no-idea no-rc5 enable-camellia shared enable-tlsext ${sslarch}
177 blino 733
178     # Add -Wa,--noexecstack here so that libcrypto's assembler modules will be
179     # marked as not requiring an executable stack.
180     RPM_OPT_FLAGS="%{optflags} -Wa,--noexecstack"
181     make depend
182     make all build-shared
183    
184     # Generate hashes for the included certs.
185     make rehash build-shared
186    
187     %check
188     # Verify that what was compiled actually works.
189     export LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
190    
191     make -C test apps tests
192    
193     gcc -o openssl-thread-test \
194     %{?_with_krb5:`krb5-config --cflags`} \
195     -I./include \
196     %{optflags} \
197     openssl-thread-test.c \
198     -L. -lssl -lcrypto \
199     %{?_with_krb5:`krb5-config --libs`} \
200     -lpthread -lz -ldl
201    
202     ./openssl-thread-test --threads %{thread_test_threads}
203    
204     %install
205     rm -fr %{buildroot}
206    
207     %makeinstall \
208     INSTALL_PREFIX=%{buildroot} \
209     MANDIR=%{_mandir} \
210     build-shared
211    
212 guillomovitch 327008 install -d -m 755 %{buildroot}%{_libdir}/openssl/%{version}
213     mv %{buildroot}%{_libdir}/engines %{buildroot}%{_libdir}/openssl/%{version}
214 blino 733
215     # make the rootcerts dir
216     install -d %{buildroot}%{_sysconfdir}/pki/tls/rootcerts
217    
218     # Install a makefile for generating keys and self-signed certs, and a script
219     # for generating them on the fly.
220     install -d %{buildroot}%{_sysconfdir}/pki/tls/certs
221     install -m0644 Makefile.certificate %{buildroot}%{_sysconfdir}/pki/tls/certs/Makefile
222     install -m0755 make-dummy-cert %{buildroot}%{_sysconfdir}/pki/tls/certs/make-dummy-cert
223    
224     # Pick a CA script.
225     mv %{buildroot}%{_sysconfdir}/pki/tls/misc/CA.sh %{buildroot}%{_sysconfdir}/pki/tls/misc/CA
226    
227     install -d %{buildroot}%{_sysconfdir}/pki/CA
228     install -d %{buildroot}%{_sysconfdir}/pki/CA/private
229    
230     # openssl was named ssleay in "ancient" times.
231     ln -snf openssl %{buildroot}%{_bindir}/ssleay
232    
233     # The man pages rand.3 and passwd.1 conflict with other packages
234     # Rename them to ssl-* and also make a symlink from openssl-* to ssl-*
235     mv %{buildroot}%{_mandir}/man1/passwd.1 %{buildroot}%{_mandir}/man1/ssl-passwd.1
236 oden 330865 ln -sf ssl-passwd.1%{_extension} %{buildroot}%{_mandir}/man1/openssl-passwd.1%{_extension}
237 blino 733
238     for i in rand err; do
239     mv %{buildroot}%{_mandir}/man3/$i.3 %{buildroot}%{_mandir}/man3/ssl-$i.3
240 oden 330865 ln -snf ssl-$i.3%{_extension} %{buildroot}%{_mandir}/man3/openssl-$i.3%{_extension}
241 blino 733 done
242    
243     rm -rf {main,devel}-doc-info
244     mkdir -p {main,devel}-doc-info
245 guillomovitch 191621 cat > main-doc-info/README.mga <<EOF
246 blino 733 Warning:
247     The man page of passwd, passwd.1, has been renamed to ssl-passwd.1
248     to avoid a conflict with passwd.1 man page from the package passwd.
249     EOF
250    
251 guillomovitch 191621 cat > devel-doc-info/README.mga <<EOF
252 blino 733 Warning:
253     The man page of rand, rand.3, has been renamed to ssl-rand.3
254     to avoid a conflict with rand.3 from the package man-pages
255     The man page of err, err.3, has been renamed to ssl-err.3
256     to avoid a conflict with err.3 from the package man-pages
257     EOF
258    
259     chmod 755 %{buildroot}%{_libdir}/pkgconfig
260    
261     %multiarch_includes %{buildroot}%{_includedir}/openssl/opensslconf.h
262    
263     # strip cannot touch these unless 755
264 guillomovitch 327008 chmod 755 %{buildroot}%{_libdir}/openssl/%{version}/engines/*.so*
265 blino 733 chmod 755 %{buildroot}%{_libdir}/*.so*
266     chmod 755 %{buildroot}%{_bindir}/*
267    
268     # nuke a mistake
269     rm -f %{buildroot}%{_mandir}/man3/.3
270    
271     # nuke rpath
272     chrpath -d %{buildroot}%{_bindir}/openssl
273    
274     # Fix libdir.
275     pushd %{buildroot}%{_libdir}/pkgconfig
276     for i in *.pc ; do
277     sed 's,^libdir=${exec_prefix}/lib$,libdir=${exec_prefix}/%{_lib},g' \
278     $i >$i.tmp && \
279     cat $i.tmp >$i && \
280     rm -f $i.tmp
281     done
282     popd
283    
284     # adjust ssldir
285     perl -pi -e "s|^CATOP=.*|CATOP=%{_sysconfdir}/pki/tls|g" %{buildroot}%{_sysconfdir}/pki/tls/misc/CA
286     perl -pi -e "s|^\\\$CATOP\=\".*|\\\$CATOP\=\"%{_sysconfdir}/pki/tls\";|g" %{buildroot}%{_sysconfdir}/pki/tls/misc/CA.pl
287     perl -pi -e "s|\./demoCA|%{_sysconfdir}/pki/tls|g" %{buildroot}%{_sysconfdir}/pki/tls/openssl.cnf
288    
289     %files
290     %doc FAQ INSTALL LICENSE NEWS PROBLEMS main-doc-info/README*
291 guillomovitch 256937 %doc README README.ASN1 README.ENGINE
292 blino 733 %dir %{_sysconfdir}/pki
293     %dir %{_sysconfdir}/pki/CA
294     %dir %{_sysconfdir}/pki/CA/private
295     %dir %{_sysconfdir}/pki/tls
296     %dir %{_sysconfdir}/pki/tls/certs
297     %dir %{_sysconfdir}/pki/tls/misc
298     %dir %{_sysconfdir}/pki/tls/private
299     %dir %{_sysconfdir}/pki/tls/rootcerts
300 guillomovitch 191620 %config(noreplace) %{_sysconfdir}/pki/tls/openssl.cnf
301     %{_sysconfdir}/pki/tls/certs/make-dummy-cert
302     %{_sysconfdir}/pki/tls/certs/Makefile
303     %{_sysconfdir}/pki/tls/misc/*
304     %{_bindir}/*
305     %{_mandir}/man[157]/*
306 blino 733
307     %files -n %{libname}
308     %doc FAQ INSTALL LICENSE NEWS PROBLEMS README*
309 fwang 257304 %{_libdir}/lib*.so.%{maj}
310 blino 733
311     %files -n %{engines_name}
312 guillomovitch 311668 %{_libdir}/openssl
313 blino 733
314     %files -n %{develname}
315     %doc CHANGES doc/* devel-doc-info/README*
316 guillomovitch 191620 %dir %{_includedir}/openssl
317 blino 733 %multiarch %{multiarch_includedir}/openssl/opensslconf.h
318 guillomovitch 191620 %{_includedir}/openssl/*
319     %{_libdir}/lib*.so
320     %{_mandir}/man3/*
321     %{_libdir}/pkgconfig/*
322 blino 733
323     %files -n %{staticname}
324 fwang 395433 %{_libdir}/lib*.a

  ViewVC Help
Powered by ViewVC 1.1.30