-
Notifications
You must be signed in to change notification settings - Fork 183
/
clhep.spec
46 lines (38 loc) · 1.24 KB
/
clhep.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
### RPM external clhep 2.4.7.1
## INCLUDE cpp-standard
%define tag bfc29493e1b4928b1e6b0dff5f754565bcfd4795
%define branch cms/v%{realversion}
%define github_user cms-externals
Source: git+https://github.com/%github_user/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz
BuildRequires: cmake ninja
%prep
%setup -n %{n}-%{realversion}
%build
rm -rf ../build
mkdir ../build
cd ../build
cmake ../%{n}-%{realversion} \
-G Ninja \
-DCLHEP_BUILD_CXXSTD="-std=c++%{cms_cxx_standard}" \
-DCMAKE_INSTALL_PREFIX:PATH="%i" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
ninja -v %{makeprocesses}
%install
cd ../build
ninja %{makeprocesses} install
case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
rm -f %i/lib/libCLHEP-[A-Z]*-%realversion.$so
%post
%{relocateConfig}bin/Evaluator-config
%{relocateConfig}bin/Cast-config
%{relocateConfig}bin/GenericFunctions-config
%{relocateConfig}bin/Exceptions-config
%{relocateConfig}bin/RandomObjects-config
%{relocateConfig}bin/Geometry-config
%{relocateConfig}bin/Matrix-config
%{relocateConfig}bin/Random-config
%{relocateConfig}bin/RefCount-config
%{relocateConfig}bin/Units-config
%{relocateConfig}bin/Utility-config
%{relocateConfig}bin/Vector-config
%{relocateConfig}bin/clhep-config