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

  ViewVC Help
Powered by ViewVC 1.1.30