ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/geant4.spec
(Generate patch)

Comparing COMP/CMSDIST/geant4.spec (file contents):
Revision 1.96 by elmer, Tue Jul 27 10:57:00 2010 UTC vs.
Revision 1.107 by muzaffar, Mon Oct 3 11:51:37 2011 UTC

# Line 3 | Line 3
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
6   Source0: http://geant4.cern.ch/support/source/%n.%downloadv.tar.gz
14 Source1: http://geant4.cern.ch/support/source/G4NDL.%{g4NDLVersion}.tar.gz
15 Source2: http://geant4.cern.ch/support/source/G4EMLOW.%{g4EMLOWVersion}.tar.gz
16 Source3: http://geant4.cern.ch/support/source/PhotonEvaporation.%{photonEvaporationVersion}.tar.gz
17 Source4: http://geant4.cern.ch/support/source/G4RadioactiveDecay.%{radioactiveDecayVersion}.tar.gz
18 Source5: http://geant4.cern.ch/support/source/G4ELASTIC.%{g4ElasticScatteringVersion}.tar.gz
19 Source6: http://geant4.cern.ch/support/source/G4NEUTRONXS.%{g4NeutronXS}.tar.gz
7  
8 < Patch:  geant-4.8.2.p01-nobanner
8 > Patch0:  geant-4.8.2.p01-nobanner
9   Patch1: geant4.9.3.p01-G4CascadeInterface
10  
11   %prep
12   %setup -n %n.%downloadv
13 < pwd
13 >
14   %patch0 -p1
15   %patch1 -p1
16  
# Line 31 | Line 18 | pwd
18   if [ $(uname) = Darwin ]; then
19    export MACOSX_DEPLOYMENT_TARGET="10.4"
20   fi
21 +
22   # Linux? -pthread?
23   touch G4BuildConf.sh
24   echo "export OS_ARCH=%{cmsplatf}" >> G4BuildConf.sh
# Line 46 | Line 34 | echo "unset G4DEBUG" >> G4BuildConf.sh
34   echo "export G4_NO_VERBOSE=1" >> G4BuildConf.sh
35   echo "export CPPVERBOSE=yes" >> G4BuildConf.sh
36  
49 echo "export G4LEVELGAMMADATA=%i/data/PhotonEvaporation/%{photonEvaporationVersion}" >> G4BuildConf.sh
50 echo "export G4RADIOACTIVEDATA=%i/data/RadioactiveDecay%{radioactiveDecayVersion}" >> G4BuildConf.sh
51 echo "export G4LEDATA=%i/data/G4EMLOW%{g4EMLOWVersion}" >> G4BuildConf.sh
52 # G4ELASTIC is not needed from 8.2 onward
53 #echo "export G4ELASTIC=%i/data/G4ELASTIC%{g4ElasticScatteringVersion}" >> G4BuildConf.sh
54
55 # From Gabriele Cosmo: The variable name 'NeutronHPCrossSections' is replaced by
56 # 'G4NEUTRONHPDATA' starting from version 9.0.
57 #echo "export NeutronHPCrossSections=%i/data/G4NDL%{g4NDLVersion}" >> G4BuildConf.sh
58 echo "export G4NEUTRONHPDATA=%i/data/G4NDL%{g4NDLVersion}" >> G4BuildConf.sh
59
60
37   # export G4LIB_BUILD_STATIC=1
38   # FIXME: For OS X? export G4NO_OPTIMISE=1 // unset G4OPTIMISE
39   # FIXME: override CERNLIB_PATH?
# Line 106 | Line 82 | mv %i/lib/$(uname)-g++/*.$so %i/lib
82   #mv %i/lib/$(uname)-g++/libname.map %i/lib
83   rm -rf %i/lib/$(uname)-g++
84   # Build already installed into prefix
85 < mkdir -p %i/data
110 < tar -C %i/data -zxvf %_sourcedir/G4NDL*.tar.gz
111 < tar -C %i/data -zxvf %_sourcedir/G4EMLOW*.tar.gz
112 < tar -C %i/data -zxvf %_sourcedir/Photon*.tar.gz
113 < tar -C %i/data -zxvf %_sourcedir/G4Rad*.tar.gz
114 < tar -C %i/data -zxvf %_sourcedir/G4NEU*.tar.gz
85 >
86   # Clean up the sources, which are not needed in the rpm
87   rm -rf %i/source
117
118 # SCRAM ToolBox toolfile
119 mkdir -p %i/etc/scram.d
120 cat << \EOF_TOOLFILE >%i/etc/scram.d/%n.xml
121  <tool name="GEANT4" version="%v">
122    <info url="http://wwwinfo.cern.ch/asd/geant4/geant4.html"/>
123    <lib name="G4digits_hits"/>
124    <lib name="G4error_propagation"/>
125    <lib name="G4event"/>
126    <lib name="G4FR"/>
127    <lib name="G4geometry"/>
128    <lib name="G4global"/>
129    <lib name="G4graphics_reps"/>
130    <lib name="G4intercoms"/>
131    <lib name="G4interfaces"/>
132    <lib name="G4materials"/>
133    <lib name="G4modeling"/>
134    <lib name="G4parmodels"/>
135    <lib name="G4particles"/>
136    <lib name="G4persistency"/>
137    <lib name="G4physicslists"/>
138    <lib name="G4processes"/>
139    <lib name="G4RayTracer"/>
140    <lib name="G4readout"/>
141    <lib name="G4run"/>
142    <lib name="G4tracking"/>
143    <lib name="G4track"/>
144    <lib name="G4Tree"/>
145    <lib name="G4visHepRep"/>
146    <lib name="G4vis_management"/>
147    <lib name="G4visXXX"/>
148    <lib name="G4VRML"/>
149    <client>
150      <environment name="GEANT4_BASE" default="%i"/>
151      <environment name="LIBDIR" default="$GEANT4_BASE/lib"/>
152      <environment name="G4LIB" value="$LIBDIR"/>
153      <environment name="INCLUDE" default="$GEANT4_BASE/include"/>
154    </client>
155    <flags cppdefines="G4USE_STD_NAMESPACE GNU_GCC G4V9"/>
156    <runtime name="G4LEVELGAMMADATA" value="$GEANT4_BASE/data/PhotonEvaporation2.0" type="path"/>
157    <runtime name="G4NEUTRONHPDATA" value="$GEANT4_BASE/data/G4NDL3.13" type="path"/>
158    <runtime name="G4RADIOACTIVEDATA" value="$GEANT4_BASE/data/RadioactiveDecay3.2" type="path"/>
159    <runtime name="G4LEDATA" value="$GEANT4_BASE/data/G4EMLOW6.2" type="path"/>
160    <runtime name="G4NEUTRONXS" value="$GEANT4_BASE/data/G4NEUTRONXS1.0" type="path"/>
161    <use name="clhep"/>
162  </tool>
163
164 EOF_TOOLFILE
165
166 cat << \EOF_TOOLFILE >%i/etc/scram.d/geant4core.xml
167  <tool name="geant4core" version="%v">
168    <info url="http://wwwinfo.cern.ch/asd/geant4/geant4.html"/>
169    <lib name="G4digits_hits"/>
170    <lib name="G4error_propagation"/>
171    <lib name="G4event"/>
172    <lib name="G4geometry"/>
173    <lib name="G4global"/>
174    <lib name="G4graphics_reps"/>
175    <lib name="G4intercoms"/>
176    <lib name="G4interfaces"/>
177    <lib name="G4materials"/>
178    <lib name="G4parmodels"/>
179    <lib name="G4particles"/>
180    <lib name="G4persistency"/>
181    <lib name="G4physicslists"/>
182    <lib name="G4processes"/>
183    <lib name="G4readout"/>
184    <lib name="G4run"/>
185    <lib name="G4tracking"/>
186    <lib name="G4track"/>
187    <client>
188      <environment name="GEANT4_BASE" default="%i"/>
189      <environment name="LIBDIR" default="$GEANT4_BASE/lib"/>
190      <environment name="G4LIB" value="$LIBDIR"/>
191      <environment name="INCLUDE" default="$GEANT4_BASE/include"/>
192    </client>
193    <flags cppdefines="G4USE_STD_NAMESPACE GNU_GCC G4V9"/>
194    <runtime name="G4LEVELGAMMADATA" value="$GEANT4_BASE/data/PhotonEvaporation2.0" type="path"/>
195    <runtime name="G4NEUTRONHPDATA" value="$GEANT4_BASE/data/G4NDL3.13" type="path"/>
196    <runtime name="G4RADIOACTIVEDATA" value="$GEANT4_BASE/data/RadioactiveDecay3.2" type="path"/>
197    <runtime name="G4LEDATA" value="$GEANT4_BASE/data/G4EMLOW6.2" type="path"/>
198    <runtime name="G4NEUTRONXS" value="$GEANT4_BASE/data/G4NEUTRONXS1.0" type="path"/>
199    <use name="clhep"/>
200  </tool>
201 EOF_TOOLFILE
202
203 cat << \EOF_TOOLFILE >%i/etc/scram.d/geant4vis.xml
204  <tool name="geant4vis" version="%v">
205    <info url="http://wwwinfo.cern.ch/asd/geant4/geant4.html"/>
206    <lib name="G4FR"/>
207    <lib name="G4modeling"/>
208    <lib name="G4RayTracer"/>
209    <lib name="G4Tree"/>
210    <lib name="G4visHepRep"/>
211    <lib name="G4vis_management"/>
212    <lib name="G4visXXX"/>
213    <lib name="G4VRML"/>
214    <use name="geant4core"/>
215  </tool>
216 EOF_TOOLFILE
217
218 %post
219 %{relocateConfig}etc/scram.d/%n.xml
220 %{relocateConfig}etc/scram.d/geant4core.xml
221 %{relocateConfig}etc/scram.d/geant4vis.xml

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines