1 |
< |
### RPM external openssl 0.9.7d |
2 |
< |
Source: http://www.openssl.org/source/%n-%v.tar.gz |
1 |
> |
### RPM external openssl 0.9.8e |
2 |
> |
Source: http://cmsrep.cern.ch/cmssw/openssl-sources/%n-fips-%realversion-usa.tar.bz2 |
3 |
> |
Patch0: openssl-0.9.8e-rh-0.9.8e-12.el5_4.6 |
4 |
> |
Patch1: openssl-x86-64-gcc420 |
5 |
> |
|
6 |
> |
%prep |
7 |
> |
%setup -n %n-fips-%{realversion} |
8 |
> |
%patch0 -p1 |
9 |
> |
%patch1 -p1 |
10 |
|
|
11 |
|
%build |
12 |
< |
./config --prefix=%i shared |
12 |
> |
# Looks like rpmbuild passes its own sets of flags via the |
13 |
> |
# RPM_OPT_FLAGS environment variable and those flags include |
14 |
> |
# -m64 (probably since rpmbuild processor detection is not |
15 |
> |
# fooled by linux32). A quick fix is to just set the variable |
16 |
> |
# to "" but we should probably understand how rpm determines |
17 |
> |
# those flags and use them for our own good. |
18 |
> |
export RPM_OPT_FLAGS="-O2 -fPIC -g -pipe -Wall -Wa,--noexecstack -fno-strict-aliasing -Wp,-DOPENSSL_USE_NEW_FUNCTIONS -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic" |
19 |
> |
|
20 |
> |
case %cmsplatf in |
21 |
> |
osx*) |
22 |
> |
perl -p -i -e 's|-compatibility_version.*|-compatibility_version \${SHLIB_MAJOR}.\${SHLIB_MINOR} \\|' Makefile.ssl |
23 |
> |
cfg_args="-DOPENSSL_USE_NEW_FUNCTIONS" |
24 |
> |
;; |
25 |
> |
esac |
26 |
> |
|
27 |
> |
./config --prefix=%i $cfg_args enable-seed enable-tlsext enable-rfc3779 no-asm \ |
28 |
> |
no-idea no-mdc2 no-rc5 no-ec no-ecdh no-ecdsa shared |
29 |
> |
|
30 |
|
make |
31 |
+ |
%install |
32 |
+ |
export RPM_OPT_FLAGS="-O2 -fPIC -g -pipe -Wall -Wa,--noexecstack -fno-strict-aliasing -Wp,-DOPENSSL_USE_NEW_FUNCTIONS -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic" |
33 |
+ |
make install |
34 |
+ |
rm -rf %{i}/lib/pkgconfig |
35 |
+ |
|
36 |
+ |
# MacOSX is case insensitive and the man page structure has case sensitive logic |
37 |
+ |
case %cmsplatf in |
38 |
+ |
osx* ) |
39 |
+ |
rm -rf %{i}/ssl/man |
40 |
+ |
;; |
41 |
+ |
esac |
42 |
+ |
perl -p -i -e "s|^#!.*perl|#!/usr/bin/env perl|" %{i}/ssl/misc/CA.pl %{i}/ssl/misc/der_chop %{i}/bin/c_rehash |
43 |
+ |
# |
44 |
+ |
# SCRAM ToolBox toolfile |
45 |
+ |
mkdir -p %i/etc/scram.d |
46 |
+ |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
47 |
+ |
<doc type=BuildSystem::ToolDoc version=1.0> |
48 |
+ |
<Tool name=%n version=%v> |
49 |
+ |
<lib name=ssl> |
50 |
+ |
<lib name=crypto> |
51 |
+ |
<client> |
52 |
+ |
<Environment name=OPENSSL_BASE default="%i"></Environment> |
53 |
+ |
<Environment name=INCLUDE default="$OPENSSL_BASE/include"></Environment> |
54 |
+ |
<Environment name=LIBDIR default="$OPENSSL_BASE/lib"></Environment> |
55 |
+ |
</client> |
56 |
+ |
</Tool> |
57 |
+ |
EOF_TOOLFILE |
58 |
+ |
%post |
59 |
+ |
%{relocateConfig}etc/scram.d/%n |