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