-
Notifications
You must be signed in to change notification settings - Fork 183
/
cepgen.spec
42 lines (32 loc) · 1.01 KB
/
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
41
42
### RPM external cepgen 1.2.5
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 python3
%prep
%setup -n %{n}-%{realversion}
sed -i -e 's|add_subdirectory(BoostWrapper)||' CepGenAddOns/CMakeLists.txt
%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 \
-DBoost_NO_SYSTEM_PATHS=ON \
-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