forked from cms-sw/cmsdist
/
rivet.spec
34 lines (30 loc) · 1 KB
/
rivet.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
### RPM external rivet 1.8.2
Source: http://www.hepforge.org/archive/rivet/Rivet-%{realversion}.tar.gz
Requires: hepmc boost fastjet swig gsl
Requires: python
Patch0: rivet-1.4.0
Patch1: rivet-1.8.2-fix-isnan
Patch2: rivet-1.8.2-fix-duplicate-symbols
Patch3: rivet-1.8.2-disable-doc
%if "%{?cms_cxx:set}" != "set"
%define cms_cxx g++
%endif
%if "%{?cms_cxxflags:set}" != "set"
%define cms_cxxflags -O2 -std=c++0x
%endif
%prep
%setup -n Rivet-%{realversion}
%patch0 -p0
%patch1 -p1
%patch2 -p1
%patch3 -p1
./configure --disable-silent-rules --prefix=%i --with-boost=${BOOST_ROOT} --with-hepmc=$HEPMC_ROOT \
--with-fastjet=$FASTJET_ROOT --with-gsl=$GSL_ROOT --disable-doxygen --disable-pdfmanual --with-pic \
CXX="$(which %cms_cxx)" CXXFLAGS="%cms_cxxflags"
# The following hack insures that the bins with the library linked explicitly
# rather than indirectly, as required by the gold linker
perl -p -i -e "s|LIBS = $|LIBS = -lHepMC|g" bin/Makefile
%build
make %makeprocesses
%install
make install