forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clhep.spec
56 lines (45 loc) · 1.23 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
47
48
49
50
51
52
53
54
55
56
### RPM external clhep 2.1.3.1
Source: http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/distributions/%n-%realversion.tgz
Patch0: clhep-2.1.1.0-no-virtual-inline
BuildRequires: cmake
%if "%{?cms_cxx:set}" != "set"
%define cms_cxx g++
%endif
%if "%{?cms_cxxflags:set}" != "set"
%define cms_cxxflags -std=c++0x
%endif
%prep
%setup -n %realversion/CLHEP
case %cmsplatf in
osx*|*gcc4[789]*)
%patch0 -p2
;;
esac
%build
mkdir ../build
cd ../build
cmake ../CLHEP \
-DCMAKE_CXX_COMPILER="%cms_cxx" \
-DCMAKE_CXX_FLAGS="%{cms_cxxflags}" \
-DCMAKE_INSTALL_PREFIX:PATH="%i" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
make VERBOSE=1
%install
cd ../build
make install
case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
rm %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