1 |
< |
### RPM external clhep 1.9.2.2 |
2 |
< |
Source: http://proj-clhep.web.cern.ch/proj-clhep/%n-%v.tgz |
1 |
> |
### RPM external clhep 2.0.4.2 |
2 |
> |
Source: http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/distributions/%n-%realversion.tgz |
3 |
|
|
4 |
|
%prep |
5 |
< |
%setup -n %v/CLHEP |
5 |
> |
%setup -n %realversion/CLHEP |
6 |
|
|
7 |
|
%build |
8 |
+ |
if [ $(uname) = Darwin ]; then |
9 |
+ |
export MACOSX_DEPLOYMENT_TARGET="10.4" |
10 |
+ |
fi |
11 |
|
CXX=g++ ./configure --prefix=%i |
12 |
|
make |
13 |
|
|
35 |
|
#for f in *.cc; do |
36 |
|
# g++ -c -O2 -ansi -Wall -fPIC -I../.. $flags $f |
37 |
|
#done |
38 |
< |
#g++ $shared -o libCLHEP-g++.%v.$so *.o |
38 |
> |
#g++ $shared -o libCLHEP-g++.%realversion.$so *.o |
39 |
|
|
40 |
|
%install |
41 |
|
case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac |
42 |
|
make install |
43 |
|
#cd shared-tmp |
44 |
< |
#cp libCLHEP-g++.%v.$so %i/lib |
45 |
< |
#ln -s libCLHEP-g++.%v.$so %i/lib/libCLHEP.$so |
46 |
< |
#n -s libCLHEP-g++.%v.a %i/lib/libCLHEP.a |
47 |
< |
# |
44 |
> |
#cp libCLHEP-g++.%realversion.$so %i/lib |
45 |
> |
#ln -s libCLHEP-g++.%realversion.$so %i/lib/libCLHEP.$so |
46 |
> |
#n -s libCLHEP-g++.%realversion.a %i/lib/libCLHEP.a |
47 |
> |
#remove the .a files |
48 |
> |
rm %i/lib/*.a |
49 |
> |
# remove the separate libs: |
50 |
> |
rm %i/lib/libCLHEP-[A-Z]*-%realversion.$so |
51 |
> |
|
52 |
> |
# SCRAM ToolBox toolfile |
53 |
> |
mkdir -p %i/etc/scram.d |
54 |
> |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n.xml |
55 |
> |
<tool name="clhep" version="%v"> |
56 |
> |
<info url="http://wwwinfo.cern.ch/asd/lhc++/clhep"/> |
57 |
> |
<lib name="CLHEP-%realversion"/> |
58 |
> |
<client> |
59 |
> |
<environment name="CLHEP_BASE" default="%i"/> |
60 |
> |
<environment name="LIBDIR" default="$CLHEP_BASE/lib"/> |
61 |
> |
<environment name="INCLUDE" default="$CLHEP_BASE/include"/> |
62 |
> |
</client> |
63 |
> |
<runtime name="CLHEP_PARAM_PATH" value="$CLHEP_BASE"/> |
64 |
> |
<runtime name="LD_LIBRARY_PATH" value="$CLHEP_BASE/lib" type="path"/> |
65 |
> |
<runtime name="CMSSW_FWLITE_INCLUDE_PATH" value="$CLHEP_BASE/include" type="path"/> |
66 |
> |
</tool> |
67 |
> |
EOF_TOOLFILE |
68 |
> |
|
69 |
> |
cat << \EOF_TOOLFILE >%i/etc/scram.d/clhepheader.xml |
70 |
> |
<tool name="clhepheader" version="%v"> |
71 |
> |
<info url="http://wwwinfo.cern.ch/asd/lhc++/clhep"/> |
72 |
> |
<client> |
73 |
> |
<environment name="CLHEPHEADER_BASE" default="%i"/> |
74 |
> |
<environment name="INCLUDE" default="$CLHEPHEADER_BASE/include"/> |
75 |
> |
</client> |
76 |
> |
</tool> |
77 |
> |
EOF_TOOLFILE |
78 |
> |
|
79 |
> |
%post |
80 |
> |
%{relocateConfig}bin/Evaluator-config |
81 |
> |
%{relocateConfig}bin/Cast-config |
82 |
> |
%{relocateConfig}bin/GenericFunctions-config |
83 |
> |
%{relocateConfig}bin/Exceptions-config |
84 |
> |
%{relocateConfig}bin/RandomObjects-config |
85 |
> |
%{relocateConfig}bin/Geometry-config |
86 |
> |
%{relocateConfig}bin/Matrix-config |
87 |
> |
%{relocateConfig}bin/Random-config |
88 |
> |
%{relocateConfig}bin/RefCount-config |
89 |
> |
%{relocateConfig}bin/Units-config |
90 |
> |
%{relocateConfig}bin/Vector-config |
91 |
> |
%{relocateConfig}bin/clhep-config |
92 |
> |
%{relocateConfig}etc/scram.d/%n.xml |
93 |
> |
%{relocateConfig}etc/scram.d/clhepheader.xml |