/[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 816018 - (hide annotations) (download)
Thu Feb 19 23:38:58 2015 UTC (9 years, 1 month ago) by luigiwalser
Original Path: cauldron/openssl/current/SPECS/openssl.spec
File size: 10350 byte(s)
- 1.0.2
- rediff patches 2,6,7,12,13,16,17,18,19
- remove bogus patch 15 (mga#15027)

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

  ViewVC Help
Powered by ViewVC 1.1.30