/
evtgen.spec
54 lines (40 loc) · 1.21 KB
/
evtgen.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
### RPM external evtgen 1.3.0
Requires: hepmc
Requires: pythia8
Requires: tauolapp
Requires: photospp
Source: http://service-spi.web.cern.ch/service-spi/external/MCGenerators/distribution/evtgen/evtgen-1.3.0-src.tgz
%if "%{?cms_cxx:set}" != "set"
%define cms_cxx c++
%endif
%if "%{?cms_cxxflags:set}" != "set"
%define cms_cxxflags -std=c++0x -g -O2
%endif
%define keep_archives true
%prep
%setup -q -n evtgen/%{realversion}
case %cmsplatf in
osx*)
;;
esac
export HEPMCLOCATION=${HEPMC_ROOT}
export HEPMCVERSION=${HEPMC_VERSION}
export PYTHIA8_LOCATION=${PYTHIA8_ROOT}
export TAUOLAPP_LOCATION=${TAUOLAPP_ROOT}
export PHOTOSPP_LOCATION=${PHOTOSPP_ROOT}
./configure --prefix=%{i} --hepmcdir=$HEPMC_ROOT --pythiadir=$PYTHIA8_ROOT --tauoladir=$TAUOLAPP_ROOT --photosdir=$PHOTOSPP_ROOT CXXFLAGS="%cms_cxxflags"
#remove obsolete pythia8 library
sed -ibak 's/PYTHIALIBLIST = -lpythia8 -llhapdfdummy/PYTHIALIBLIST = -lpythia8/g' config.mk
# One more fix-up for OSX (in addition to the patch above)
case %cmsplatf in
osx*)
perl -p -i -e "s|-shared|-dynamiclib -undefined dynamic_lookup|" make.inc
;;
esac
%build
make
%install
make install
find %i/lib/archive -name "*.a" -exec mv {} %i/lib \;
rm -rf %i/lib/archive
ls %{i}/lib/