1 |
< |
### RPM external pythia8 070 |
2 |
< |
Requires: gcc-wrapper |
1 |
> |
### RPM external pythia8 130 |
2 |
> |
## BUILDIF case $(uname):$(uname -m) in Linux:i*86 ) true ;; Linux:x86_64 ) true ;; Linux:ppc64 ) false ;; Darwin:* ) false ;; * ) false ;; esac |
3 |
> |
|
4 |
|
Requires: hepmc |
5 |
|
Requires: clhep |
6 |
|
Requires: pythia6 |
7 |
< |
%define gccwrapperarch slc4_ia32_gcc345 |
8 |
< |
%define realversion %(echo %v | cut -d- -f1 ) |
9 |
< |
Source: http://service-spi.web.cern.ch/service-spi/external/MCGenerators/distribution/%{n}-%{realversion}-src.tgz |
7 |
> |
Requires: lhapdf |
8 |
> |
|
9 |
> |
Source: http://cern.ch/service-spi/external/MCGenerators/distribution/%{n}-%{realversion}-src.tgz |
10 |
|
%prep |
11 |
|
%setup -q -n %{n}/%{realversion} |
12 |
< |
echo "./configure PYTHIA6LOCATION=${PYTHIA6_ROOT} PYTHIA6VERSION=${PYTHIA6_VERSION} HEPMCLOCATION=${HEPMC_ROOT} HEPMCVERSION=${HEPMC_VERSION} CLHEPLOCATION=${CLHEP_ROOT} CLHEPVERSION=${CLHEP_VERSION}" |
13 |
< |
./configure PYTHIA6LOCATION=${PYTHIA6_ROOT} PYTHIA6VERSION=${PYTHIA6_VERSION} HEPMCLOCATION=${HEPMC_ROOT} HEPMCVERSION=${HEPMC_VERSION} CLHEPLOCATION=${CLHEP_ROOT} CLHEPVERSION=${CLHEP_VERSION} |
12 |
> |
|
13 |
> |
export PYTHIA6LOCATION=${PYTHIA6_ROOT} |
14 |
> |
export PYTHIA6VERSION=${PYTHIA6_VERSION} |
15 |
> |
export HEPMCLOCATION=${HEPMC_ROOT} |
16 |
> |
export HEPMCVERSION=${HEPMC_VERSION} |
17 |
> |
export CLHEPLOCATION=${CLHEP_ROOT} |
18 |
> |
export CLHEPVERSION=${CLHEP_VERSION} |
19 |
> |
./configure --enable-shared --with-hepmc=${HEPMC_ROOT} |
20 |
|
|
21 |
|
%build |
15 |
– |
%if "%{cmsplatf}" == "%{gccwrapperarch}" |
16 |
– |
echo "Using gcc wrapper for %cmsplatf" |
17 |
– |
source $GCC_WRAPPER_ROOT/etc/profile.d/init.sh |
18 |
– |
%endif |
22 |
|
make |
23 |
|
|
24 |
|
%install |
25 |
< |
tar -c lib include | tar -x -C %i |
25 |
> |
tar -c lib include xmldoc | tar -x -C %i |
26 |
> |
|
27 |
> |
# SCRAM ToolBox toolfile |
28 |
> |
mkdir -p %i/etc/scram.d |
29 |
> |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n.xml |
30 |
> |
<tool name="pythia8" version="%v"> |
31 |
> |
<lib name="pythia8"/> |
32 |
> |
<lib name="hepmcinterface"/> |
33 |
> |
<client> |
34 |
> |
<environment name="PYTHIA8_BASE" default="%i"/> |
35 |
> |
<environment name="LIBDIR" default="$PYTHIA8_BASE/lib"/> |
36 |
> |
<environment name="INCLUDE" default="$PYTHIA8_BASE/include"/> |
37 |
> |
</client> |
38 |
> |
<runtime name="PYTHIA8DATA" value="$PYTHIA8_BASE/xmldoc"/> |
39 |
> |
<use name="cxxcompiler"/> |
40 |
> |
<use name="hepmc"/> |
41 |
> |
<use name="pythia6"/> |
42 |
> |
<use name="clhep"/> |
43 |
> |
<use name="lhapdf"/> |
44 |
> |
</tool> |
45 |
> |
EOF_TOOLFILE |
46 |
|
|
47 |
+ |
%post |
48 |
+ |
%{relocateConfig}etc/scram.d/%n.xml |