1 |
< |
### RPM external p5-xml-parser 2.34 |
1 |
> |
### RPM external p5-xml-parser 2.34-CMS19 |
2 |
|
## INITENV +PATH PERL5LIB %i/lib/site_perl/%perlversion |
3 |
< |
%define perlversion %(perl -e 'printf "%%vd", $^V') |
4 |
< |
%define perlarch %(perl -MConfig -e 'print $Config{archname}') |
3 |
> |
%define perl /usr/bin/env perl |
4 |
> |
%if "%(echo %cmsplatf | cut -f1 -d_ | sed -e 's|\([A-Za-z]*\)[0-9]*|\1|')" == "osx" |
5 |
> |
%define perl /usr/bin/perl |
6 |
> |
%endif |
7 |
> |
|
8 |
> |
%define perlversion %(%perl -e 'printf "%%vd", $^V') |
9 |
> |
%define perlarch %(%perl -MConfig -e 'print $Config{archname}') |
10 |
|
%define downloadn XML-Parser |
11 |
< |
Requires: expat |
12 |
< |
Source: http://mirror.switch.ch/ftp/mirror/CPAN/authors/id/M/MS/MSERGEANT/%{downloadn}-%{v}.tar.gz |
11 |
> |
%define expatversion 2.0.0 |
12 |
> |
Source0: http://mirror.switch.ch/ftp/mirror/CPAN/authors/id/M/MS/MSERGEANT/%{downloadn}-%{realversion}.tar.gz |
13 |
> |
Source1: http://dl.sourceforge.net/sourceforge/expat/expat-%expatversion.tar.gz |
14 |
> |
Provides: libc.so.6()(64bit) |
15 |
> |
Provides: libc.so.6(GLIBC_2.2.5)(64bit) |
16 |
> |
|
17 |
|
%prep |
18 |
< |
%setup -n %downloadn-%v |
18 |
> |
%setup -T -b 0 -n %{downloadn}-%{realversion} |
19 |
> |
%setup -D -T -b 1 -n expat-%expatversion |
20 |
|
%build |
21 |
< |
which perl |
22 |
< |
perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion \ |
23 |
< |
EXPATLIBPATH=$EXPAT_ROOT/lib \ |
24 |
< |
EXPATINCPATH=$EXPAT_ROOT/include |
21 |
> |
# We statically compile expat so that the perl module itself, |
22 |
> |
# and hence scram, do not depend on the expat rpm. |
23 |
> |
# This way we can change the expat version in CMSSW/externals |
24 |
> |
# without having to rebuild scram. |
25 |
> |
which gcc |
26 |
> |
rm -rf %_builddir/tmp |
27 |
> |
cd ../expat-%expatversion |
28 |
> |
mkdir -p %_builddir/tmp |
29 |
> |
./configure --prefix=%_builddir/tmp --disable-shared --enable-static --with-pic |
30 |
> |
make clean |
31 |
> |
make |
32 |
> |
make install |
33 |
> |
cd ../%{downloadn}-%{realversion} |
34 |
> |
|
35 |
> |
%perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion \ |
36 |
> |
EXPATLIBPATH=%_builddir/tmp/lib \ |
37 |
> |
EXPATINCPATH=%_builddir/tmp/include |
38 |
|
make |
39 |
< |
case $(uname)-$(uname -m) in |
40 |
< |
Linux*) |
41 |
< |
make test |
39 |
> |
|
40 |
> |
# If we are building on a machine which has a system compiler which |
41 |
> |
# can produce 64 bit binaries, than we also compile a 64 bit version |
42 |
> |
# of the module, so that scram can work also on 64bit platforms disguised |
43 |
> |
# as 32 bit via linux32. |
44 |
> |
case %{cmsos} in |
45 |
> |
slc4_ia32) |
46 |
> |
if ldd /usr/bin/gcc | grep -q /lib64/ |
47 |
> |
then |
48 |
> |
make install |
49 |
> |
mv %i/lib/site_perl/%perlversion/x86_64-linux-thread-multi %i/lib/site_perl/%perlversion/i386-linux-thread-multi |
50 |
> |
make clean |
51 |
> |
|
52 |
> |
export PATH=/usr/bin/:$PATH |
53 |
> |
export GCC_EXEC_PREFIX=/usr/lib/gcc/ |
54 |
> |
cd ../expat-%expatversion |
55 |
> |
CXX="/usr/bin/c++ -fPIC" CC="/usr/bin/gcc -fPIC" setarch x86_64 ./configure --prefix=%_builddir/tmp --bindir=%_builddir/tmp/bin/64 --libdir=%_builddir/tmp/lib64 --disable-shared --enable-static |
56 |
> |
echo "Building 64bit version" |
57 |
> |
setarch x86_64 make clean |
58 |
> |
setarch x86_64 make |
59 |
> |
setarch x86_64 make install |
60 |
> |
cd ../%{downloadn}-%{realversion} |
61 |
> |
%perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion \ |
62 |
> |
EXPATLIBPATH=%_builddir/tmp/lib64 \ |
63 |
> |
EXPATINCPATH=%_builddir/tmp/include |
64 |
> |
make |
65 |
> |
make install |
66 |
> |
else |
67 |
> |
make install |
68 |
> |
fi;; |
69 |
> |
*) |
70 |
> |
make install |
71 |
> |
;; |
72 |
|
esac |
73 |
+ |
|
74 |
|
%install |
21 |
– |
make install |
22 |
– |
# |