forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cepgen.spec
40 lines (30 loc) · 921 Bytes
/
cepgen.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
### RPM external cepgen 1.1.0
Source: https://github.com/cepgen/cepgen/archive/refs/tags/%{realversion}.tar.gz
BuildRequires: cmake ninja
Requires: gsl OpenBLAS hepmc hepmc3 lhapdf pythia6 root bz2lib zlib xz
%prep
%setup -n %{n}-%{realversion}
%build
rm -rf ../build
mkdir ../build
cd ../build
export GSL_DIR=${GSL_ROOT}
export OPENBLAS_DIR=${OPENBLAS_ROOT}
export HEPMC_DIR=${HEPMC_ROOT}
export HEPMC3_DIR=${HEPMC3_ROOT}
export LHAPDF_PATH=${LHAPDF_ROOT}
export PYTHIA6_DIR=${PYTHIA6_ROOT}
export ROOTSYS=${ROOT_ROOT}
cmake ../%{n}-%{realversion} \
-G Ninja \
-DCMAKE_INSTALL_PREFIX:PATH="%i" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${BZ2LIB_ROOT};${ZLIB_ROOT};${XZ_ROOT}"
ninja -v %{makeprocesses}
%install
cd ../build
ninja %{makeprocesses} install
case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
rm -f %i/lib/libCepGen*-[A-Z]*-%realversion.$so
%post
%{relocateConfig}bin/cepgen