1 |
< |
### RPM external geant4 9.4 |
1 |
> |
### RPM external geant4 9.4.p03 |
2 |
|
%define downloadv %(echo %v | cut -d- -f1) |
3 |
|
|
4 |
|
Requires: clhep |
5 |
|
|
6 |
< |
%define photonEvaporationVersion 2.0 |
7 |
< |
%define g4NDLVersion 3.13 |
8 |
< |
%define g4ElasticScatteringVersion 1.1 |
9 |
< |
%define g4EMLOWVersion 6.2 |
10 |
< |
%define radioactiveDecayVersion 3.2 |
11 |
< |
%define g4NeutronXS 1.0 |
12 |
< |
|
13 |
< |
#Source0: http://cmsrep.cern.ch/cmssw/junk/geant4/%n.%downloadv.tgz |
14 |
< |
Source1: http://geant4.cern.ch/support/source/%n.%downloadv.tgz |
15 |
< |
Source1: http://geant4.cern.ch/support/source/G4NDL.%{g4NDLVersion}.tar.gz |
16 |
< |
Source2: http://geant4.cern.ch/support/source/G4EMLOW.%{g4EMLOWVersion}.tar.gz |
17 |
< |
Source3: http://geant4.cern.ch/support/source/PhotonEvaporation.%{photonEvaporationVersion}.tar.gz |
18 |
< |
Source4: http://geant4.cern.ch/support/source/G4RadioactiveDecay.%{radioactiveDecayVersion}.tar.gz |
19 |
< |
Source5: http://geant4.cern.ch/support/source/G4ELASTIC.%{g4ElasticScatteringVersion}.tar.gz |
20 |
< |
Source6: http://geant4.cern.ch/support/source/G4NEUTRONXS.%{g4NeutronXS}.tar.gz |
6 |
> |
Source0: http://geant4.cern.ch/support/source/%n.%downloadv.tar.gz |
7 |
|
|
8 |
< |
Patch0: geant-4.8.2.p01-nobanner |
8 |
> |
Patch0: geant-4.8.2.p01-nobanner |
9 |
> |
Patch1: geant4-9.4.p03-fix-anti-proton-bug |
10 |
> |
Patch2: geant4-9.4.p03-use-CXXFLAGS-env-variable |
11 |
> |
|
12 |
> |
%if "%{?cms_cxxflags:set}" != "set" |
13 |
> |
%define cms_cxxflags -std=c++0x -O2 |
14 |
> |
%endif |
15 |
|
|
16 |
|
%prep |
17 |
|
%setup -n %n.%downloadv |
18 |
< |
pwd |
18 |
> |
|
19 |
|
%patch0 -p1 |
20 |
< |
|
20 |
> |
%patch1 -p1 |
21 |
> |
%patch2 -p1 |
22 |
> |
|
23 |
|
%build |
24 |
|
if [ $(uname) = Darwin ]; then |
25 |
|
export MACOSX_DEPLOYMENT_TARGET="10.4" |
26 |
|
fi |
27 |
+ |
|
28 |
|
# Linux? -pthread? |
29 |
|
touch G4BuildConf.sh |
30 |
+ |
echo "export CMS_CXXFLAGS='%{cms_cxxflags}'" >> G4BuildConf.sh |
31 |
|
echo "export OS_ARCH=%{cmsplatf}" >> G4BuildConf.sh |
32 |
|
#FIXME: is this correct??? |
33 |
|
echo "export G4SYSTEM=$(uname)-g++" >> G4BuildConf.sh |
41 |
|
echo "export G4_NO_VERBOSE=1" >> G4BuildConf.sh |
42 |
|
echo "export CPPVERBOSE=yes" >> G4BuildConf.sh |
43 |
|
|
48 |
– |
echo "export G4LEVELGAMMADATA=%i/data/PhotonEvaporation/%{photonEvaporationVersion}" >> G4BuildConf.sh |
49 |
– |
echo "export G4RADIOACTIVEDATA=%i/data/RadioactiveDecay%{radioactiveDecayVersion}" >> G4BuildConf.sh |
50 |
– |
echo "export G4LEDATA=%i/data/G4EMLOW%{g4EMLOWVersion}" >> G4BuildConf.sh |
51 |
– |
# G4ELASTIC is not needed from 8.2 onward |
52 |
– |
#echo "export G4ELASTIC=%i/data/G4ELASTIC%{g4ElasticScatteringVersion}" >> G4BuildConf.sh |
53 |
– |
|
54 |
– |
# From Gabriele Cosmo: The variable name 'NeutronHPCrossSections' is replaced by |
55 |
– |
# 'G4NEUTRONHPDATA' starting from version 9.0. |
56 |
– |
#echo "export NeutronHPCrossSections=%i/data/G4NDL%{g4NDLVersion}" >> G4BuildConf.sh |
57 |
– |
echo "export G4NEUTRONHPDATA=%i/data/G4NDL%{g4NDLVersion}" >> G4BuildConf.sh |
58 |
– |
|
59 |
– |
|
44 |
|
# export G4LIB_BUILD_STATIC=1 |
45 |
|
# FIXME: For OS X? export G4NO_OPTIMISE=1 // unset G4OPTIMISE |
46 |
|
# FIXME: override CERNLIB_PATH? |
71 |
|
# echo "export G4VIS_BUILD_VRML_DRIVER=1" >> G4BuildConf.sh |
72 |
|
# echo "export G4VIS_BUILD_RAYTRACER_DRIVER=1" >> G4BuildConf.sh |
73 |
|
# export G4LIB_BUILD_G3TOG4=1 |
74 |
< |
source G4BuildConf.sh |
74 |
> |
source ./G4BuildConf.sh |
75 |
|
mkdir -p %i |
76 |
|
tar -cf - config source | tar -C %i -xf - |
77 |
|
|
89 |
|
#mv %i/lib/$(uname)-g++/libname.map %i/lib |
90 |
|
rm -rf %i/lib/$(uname)-g++ |
91 |
|
# Build already installed into prefix |
92 |
< |
mkdir -p %i/data |
109 |
< |
tar -C %i/data -zxvf %_sourcedir/G4NDL*.tar.gz |
110 |
< |
tar -C %i/data -zxvf %_sourcedir/G4EMLOW*.tar.gz |
111 |
< |
tar -C %i/data -zxvf %_sourcedir/Photon*.tar.gz |
112 |
< |
tar -C %i/data -zxvf %_sourcedir/G4Rad*.tar.gz |
113 |
< |
tar -C %i/data -zxvf %_sourcedir/G4NEU*.tar.gz |
92 |
> |
|
93 |
|
# Clean up the sources, which are not needed in the rpm |
94 |
|
rm -rf %i/source |