forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevtgen.spec
65 lines (49 loc) · 1.44 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
54
55
56
57
58
59
60
61
62
63
64
65
### RPM external evtgen 2.0.0
%define tag bcb7af4d35bf66a01c08fa4f8fffb623b7e24c59
%define branch cms/%realversion
%define github_user cms-externals
Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz
BuildRequires: cmake
Requires: cmake
Requires: hepmc
Requires: pythia8
Requires: tauolapp
Requires: photospp
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40267
# libgfortranbegin.a is finally removed and was obsolete since GCC 4.5
#Patch0: evtgen-1.6.0-configure-new-gcc
Patch0: evtgen-2.0.0
%define keep_archives true
%prep
%setup -q -n %{n}-%{realversion}
%patch0 -p1
%build
rm -rf ../build
mkdir ../build
cd ../build
case %cmsplatf in
osx*)
;;
esac
cmake -DCMAKE_INSTALL_PREFIX:PATH=%{i} ../%{n}-%{realversion} \
-DEVTGEN_HEPMC3:BOOL=OFF -DHEPMC2_ROOT_DIR:PATH=$HEPMC_ROOT \
-DEVTGEN_PYTHIA:BOOL=ON -DPYTHIA8_ROOT_DIR:PATH=$PYTHIA8_ROOT \
-DEVTGEN_PHOTOS:BOOL=ON -DPHOTOSPP_ROOT_DIR:PATH=$PHOTOSPP_ROOT \
-DEVTGEN_TAUOLA:BOOL=ON -DTAUOLAPP_ROOT_DIR:PATH=$TAUOLAPP_ROOT
# 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
make
%install
cd ../build
make install
mkdir -p %i/lib
find %i/lib64 -name "*.*" -exec mv {} %i/lib \;
rm -rf %i/lib64
ls %{i}/lib
cd ..
%post
%relocateConfigAll share/EvtGen/cmake *.cmake