1 |
< |
### RPM external thepeg 1.2.0 |
2 |
< |
Source: http://www.thep.lu.se/~leif/ThePEG/ThePEG-%{realversion}.tgz |
1 |
> |
### RPM external thepeg 1.6.1 |
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.6.1-break-termcap-dependence |
8 |
> |
Patch1: thepeg-1.6.1-units |
9 |
> |
Patch2: thepeg-1.6.1-use-dylibs-macosx |
10 |
> |
Patch3: thepeg-1.6.1-lhapdf-env |
11 |
> |
Patch4: thepeg-1.6.1-gcc46 |
12 |
|
Requires: lhapdf |
13 |
|
Requires: gsl |
14 |
+ |
Requires: zlib |
15 |
+ |
# FIXME: hepmc? |
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 |
< |
perl -p -i -e 's|-lLHAPDF|-llhapdf -llhapdf_dummy|' configure |
24 |
< |
perl -p -i -e 's|libLHAPDF|liblhapdf|' configure |
25 |
< |
./configure --with-LHAPDF=$LHAPDF_ROOT/lib --without-javagui --prefix=%i --with-gsl=$GSL_ROOT |
22 |
> |
%setup -q -n %{n}/%{realversion} |
23 |
> |
%patch0 -p2 |
24 |
> |
%patch1 -p2 |
25 |
> |
%if "%(echo %cmsos | grep osx >/dev/null && echo true)" == "true" |
26 |
> |
%patch2 -p1 |
27 |
> |
%endif |
28 |
> |
%patch3 -p2 |
29 |
> |
%patch4 -p2 |
30 |
|
|
31 |
|
%build |
32 |
+ |
# configure does not handle linking against archive LHAPDF |
33 |
+ |
# notice that we should probably build an archive library |
34 |
+ |
# also for this library, but we do not care for the moment. |
35 |
+ |
perl -p -i -e 's|LHAPDF[.]dylib|LHAPDF.a|' configure |
36 |
+ |
FC=`which gfortran` |
37 |
+ |
./configure --enable-shared --disable-static \ |
38 |
+ |
--with-LHAPDF=$LHAPDF_ROOT/lib \ |
39 |
+ |
--without-javagui --prefix=%i --with-gsl=$GSL_ROOT \ |
40 |
+ |
--disable-readline \ |
41 |
+ |
FC=$FC \ |
42 |
+ |
LIBS="`$FC --print-file-name=libgfortranbegin.a` `$FC --print-file-name=libgfortran.a` -L$ZLIB_ROOT -lz" |
43 |
|
make |
44 |
|
|
45 |
|
%install |
47 |
|
make install |
48 |
|
rm %i/share/ThePEG/Doc/fixinterfaces.pl |
49 |
|
|
20 |
– |
# SCRAM ToolBox toolfile |
21 |
– |
mkdir -p %i/etc/scram.d |
22 |
– |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
23 |
– |
<doc type=BuildSystem::ToolDoc version=1.0> |
24 |
– |
<Tool name=tauola version=%v> |
25 |
– |
<Client> |
26 |
– |
<Environment name=THEPEG_BASE default="%i"></Environment> |
27 |
– |
<Environment name=LIBDIR default="$THEPEG_BASE/lib"></Environment> |
28 |
– |
<Environment name=INCLUDE default="$THEPEG_BASE/include"></Environment> |
29 |
– |
</Client> |
30 |
– |
<lib name=thepeg> |
31 |
– |
<use name=lhapdf> |
32 |
– |
<use name=gsl> |
33 |
– |
</Tool> |
34 |
– |
EOF_TOOLFILE |
35 |
– |
|
50 |
|
%post |
51 |
< |
%{relocateConfig}etc/scram.d/%n |
51 |
> |
%{relocateConfig}lib/ThePEG/*.la |