forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clhep.spec
45 lines (36 loc) · 1.18 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
### RPM external clhep 2.4.0.0
%define tag 4b23da33f4607fde6f47c864871972558aa75c39
%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 \
-DCMAKE_INSTALL_PREFIX:PATH="%i" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
ninja -v %{makeprocesses} -l $(getconf _NPROCESSORS_ONLN)
%install
cd ../build
ninja 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