1 |
< |
### RPM external thepeg 1.2.0 |
2 |
< |
Source: http://www.thep.lu.se/~leif/ThePEG/ThePEG-%{realversion}.tgz |
3 |
< |
Patch0: thepeg-1.2.0-LHAPDF |
1 |
> |
### RPM external thepeg 1.7.0 |
2 |
> |
## INITENV +PATH LD_LIBRARY_PATH %i/lib/ThePEG |
3 |
> |
## INITENV +PATH DYLD_LIBRARY_PATH %i/lib/ThePEG |
4 |
> |
#Source: http://www.thep.lu.se/~leif/ThePEG/ThePEG-%{realversion}.tgz |
5 |
> |
#Source: http://projects.hepforge.org/herwig/files/ThePEG-%{realversion}.tar.gz |
6 |
> |
Source: http://service-spi.web.cern.ch/service-spi/external/MCGenerators/distribution/thepeg-%{realversion}-src.tgz |
7 |
> |
Patch0: thepeg-1.7.0-break-termcap-dependence |
8 |
> |
Patch1: thepeg-1.7.0-use-dylibs-macosx |
9 |
> |
Patch2: thepeg-1.6.1-lhapdf-env |
10 |
> |
Patch3: thepeg-1.6.1-gcc46 |
11 |
> |
Patch4: thepeg-1.7.0-configure |
12 |
|
Requires: lhapdf |
13 |
|
Requires: gsl |
14 |
+ |
Requires: hepmc |
15 |
+ |
Requires: zlib |
16 |
+ |
# FIXME: rivet? |
17 |
+ |
%if "%(echo %cmsos | grep osx >/dev/null && echo true)" == "true" |
18 |
+ |
Requires: gfortran-macosx |
19 |
+ |
%endif |
20 |
|
|
21 |
|
%prep |
22 |
< |
%setup -q -n ThePEG-%{realversion} |
23 |
< |
%patch0 -p0 |
24 |
< |
perl -p -i -e 's|-lLHAPDF|-llhapdf -llhapdf_dummy|' configure |
25 |
< |
perl -p -i -e 's|libLHAPDF|liblhapdf|' configure |
26 |
< |
./configure --with-LHAPDF=$LHAPDF_ROOT/lib --without-javagui --prefix=%i --with-gsl=$GSL_ROOT |
22 |
> |
%setup -q -n %{n}/%{realversion} |
23 |
> |
%patch0 -p2 |
24 |
> |
case %cmsos in |
25 |
> |
osx*) |
26 |
> |
%patch1 -p1 |
27 |
> |
;; |
28 |
> |
esac |
29 |
> |
%patch2 -p2 |
30 |
> |
%patch3 -p2 |
31 |
> |
%patch4 -p1 |
32 |
|
|
33 |
|
%build |
34 |
+ |
# Build as static only on new architectures. |
35 |
+ |
case %cmsplatf in |
36 |
+ |
slc5*_*_gcc4[01234]*) |
37 |
+ |
CXX="`which c++`" |
38 |
+ |
CC="`which gcc`" |
39 |
+ |
PLATF_CONF_OPTS="--enable-shared --disable-static" |
40 |
+ |
LIBGFORTRAN=`gfortran --print-file-name=libgfortran.so` |
41 |
+ |
;; |
42 |
+ |
*) perl -p -i -e 's|libLHAPDF[.]so|libLHAPDF.a|g' configure |
43 |
+ |
CXX="`which c++` -fPIC" |
44 |
+ |
CC="`which gcc` -fPIC" |
45 |
+ |
PLATF_CONF_OPTS="--enable-shared --disable-static" |
46 |
+ |
LIBGFORTRAN="`gfortran --print-file-name=libgfortran.so`" |
47 |
+ |
;; |
48 |
+ |
esac |
49 |
+ |
|
50 |
+ |
case %cmsplatf in |
51 |
+ |
osx*) |
52 |
+ |
LIBGFORTRAN="`gfortran --print-file-name=libgfortran.a`" |
53 |
+ |
;; |
54 |
+ |
esac |
55 |
+ |
|
56 |
+ |
./configure $PLATF_CONF_OPTS \ |
57 |
+ |
--with-LHAPDF=$LHAPDF_ROOT \ |
58 |
+ |
--with-hepmc=$HEPMC_ROOT \ |
59 |
+ |
--with-gsl=$GSL_ROOT --with-zlib=$ZLIB_ROOT \ |
60 |
+ |
--without-javagui --prefix=%i \ |
61 |
+ |
--disable-readline CXX="$CXX" CC="$CC" \ |
62 |
+ |
LIBS="-L$LHAPDF_ROOT/lib -lLHAPDF $LIBGFORTRAN -lz" |
63 |
|
make |
64 |
|
|
65 |
|
%install |
66 |
|
|
67 |
|
make install |
68 |
|
rm %i/share/ThePEG/Doc/fixinterfaces.pl |
69 |
< |
|
70 |
< |
# SCRAM ToolBox toolfile |
71 |
< |
mkdir -p %i/etc/scram.d |
72 |
< |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
25 |
< |
<doc type=BuildSystem::ToolDoc version=1.0> |
26 |
< |
<Tool name=thepeg version=%v> |
27 |
< |
<Client> |
28 |
< |
<Environment name=THEPEG_BASE default="%i"></Environment> |
29 |
< |
<Environment name=LIBDIR default="$THEPEG_BASE/lib/ThePEG"></Environment> |
30 |
< |
<Environment name=INCLUDE default="$THEPEG_BASE/include"></Environment> |
31 |
< |
</Client> |
32 |
< |
<lib name=ThePEG> |
33 |
< |
<use name=lhapdf> |
34 |
< |
<use name=gsl> |
35 |
< |
</Tool> |
36 |
< |
EOF_TOOLFILE |
69 |
> |
cd %i/lib/ThePEG |
70 |
> |
for item in LesHouches.so ; do |
71 |
> |
[ -e lib$item ] || ln -s $item lib$item |
72 |
> |
done |
73 |
|
|
74 |
|
%post |
75 |
< |
%{relocateConfig}etc/scram.d/%n |
40 |
< |
%{relocateConfig}lib/ThePEG/ACDCSampler.la |
41 |
< |
%{relocateConfig}lib/ThePEG/BreitWignerMass.la |
42 |
< |
%{relocateConfig}lib/ThePEG/ColourPairDecayer.la |
43 |
< |
%{relocateConfig}lib/ThePEG/DalitzDecayer.la |
44 |
< |
%{relocateConfig}lib/ThePEG/FixedCMSLuminosity.la |
45 |
< |
%{relocateConfig}lib/ThePEG/GaussianPtGenerator.la |
46 |
< |
%{relocateConfig}lib/ThePEG/GRV94L.la |
47 |
< |
%{relocateConfig}lib/ThePEG/GRV94M.la |
48 |
< |
%{relocateConfig}lib/ThePEG/GRVBase.la |
49 |
< |
%{relocateConfig}lib/ThePEG/KTClus.la |
50 |
< |
%{relocateConfig}lib/ThePEG/LeptonLeptonPDF.la |
51 |
< |
%{relocateConfig}lib/ThePEG/LeptonLeptonRemnant.la |
52 |
< |
%{relocateConfig}lib/ThePEG/LesHouches.la |
53 |
< |
%{relocateConfig}lib/ThePEG/libThePEG.la |
54 |
< |
%{relocateConfig}lib/ThePEG/LWHFactory.la |
55 |
< |
%{relocateConfig}lib/ThePEG/MadGraphReader.la |
56 |
< |
%{relocateConfig}lib/ThePEG/MEee2gZ2qq.la |
57 |
< |
%{relocateConfig}lib/ThePEG/MENCDIS.la |
58 |
< |
%{relocateConfig}lib/ThePEG/MEQCD.la |
59 |
< |
%{relocateConfig}lib/ThePEG/MultiEventGenerator.la |
60 |
< |
%{relocateConfig}lib/ThePEG/O1AlphaS.la |
61 |
< |
%{relocateConfig}lib/ThePEG/OmegaPhi3PiDecayer.la |
62 |
< |
%{relocateConfig}lib/ThePEG/Onium3GDecayer.la |
63 |
< |
%{relocateConfig}lib/ThePEG/QuarksToHadronsDecayer.la |
64 |
< |
%{relocateConfig}lib/ThePEG/ReweightConstant.la |
65 |
< |
%{relocateConfig}lib/ThePEG/ReweightMinPT.la |
66 |
< |
%{relocateConfig}lib/ThePEG/SimpleAlphaEM.la |
67 |
< |
%{relocateConfig}lib/ThePEG/SimpleDISCut.la |
68 |
< |
%{relocateConfig}lib/ThePEG/SimpleFlavour.la |
69 |
< |
%{relocateConfig}lib/ThePEG/SimpleKTCut.la |
70 |
< |
%{relocateConfig}lib/ThePEG/SimpleZGenerator.la |
71 |
< |
%{relocateConfig}lib/ThePEG/StandardCKM.la |
72 |
< |
%{relocateConfig}lib/ThePEG/Tau2HadronsDecayer.la |
73 |
< |
%{relocateConfig}lib/ThePEG/TestLHAPDF.la |
74 |
< |
%{relocateConfig}lib/ThePEG/ThePEGStrategy.la |
75 |
< |
%{relocateConfig}lib/ThePEG/V2LeptonsCut.la |
76 |
< |
%{relocateConfig}lib/ThePEG/V2PPDecayer.la |
77 |
< |
%{relocateConfig}lib/ThePEG/WeakToHadronsDecayer.la |
78 |
< |
%{relocateConfig}lib/ThePEG/XSecCheck.la |
75 |
> |
%{relocateConfig}lib/ThePEG/*.la |
76 |
|
|