forked from cms-sw/cmsdist
/
hepmc.spec
47 lines (40 loc) · 1.1 KB
/
hepmc.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
### RPM external hepmc 2.06.07
Source: http://lcgapp.cern.ch/project/simu/HepMC/download/HepMC-%realversion.tar.gz
Patch0: hepmc-2.03.06-reflex
Patch1: hepmc-2.06.07-WeightContainer-fix-size_type
Requires: autotools
%define keep_archives true
%define drop_files %i/share
%if "%(case %cmsplatf in (osx*_*_gcc421) echo true ;; (*) echo false ;; esac)" == "true"
Requires: gfortran-macosx
%endif
%if "%{?cms_cxx:set}" != "set"
%define cms_cxx c++
%endif
%if "%{?cms_cxxflags:set}" != "set"
%define cms_cxxflags -O2 -std=c++0x
%endif
%prep
%setup -q -n HepMC-%{realversion}
%patch0 -p0
%patch1 -p1
case %cmsplatf in
slc5_*_gcc4[01234]*)
F77="`which gfortran`"
CXX="`which %cms_cxx`"
PLATF_CONFIG_OPTS=""
;;
*)
F77="`which gfortran` -fPIC"
CXX="`which %cms_cxx` -fPIC"
PLATF_CONFIG_OPTS="--enable-static --disable-shared"
;;
esac
perl -p -i -e 's|glibtoolize|libtoolize|g' ./bootstrap
./bootstrap
./configure $PLATF_CONFIG_OPTS --prefix=%{i} --with-momentum=GEV --with-length=MM F77="$F77" CXX="$CXX" CXXFLAGS="%cms_cxxflags"
%build
make %makeprocesses
%install
make install
rm -rf %i/lib/*.la