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.1 by eulisse, Fri Feb 24 08:01:52 2006 UTC vs.
Revision 1.101 by muzaffar, Fri Dec 3 10:38:43 2010 UTC

# Line 1 | Line 1
1 < ### RPM external geant4 7.1
2 < # Build system fudging and some patches by Lassi A. Tuura <lat@iki.fi>
1 > ### RPM external geant4 9.4.cand02
2 > %define downloadv %(echo %v | cut -d- -f1)
3 >
4   Requires: clhep
4 Source0: http://geant4.cern.ch/support/source/geant4.%v.tar.gz
5 Source1: http://geant4.cern.ch/support/source/G4NDL.3.8.tar.gz
6 Source2: http://geant4.cern.ch/support/source/G4EMLOW.2.2.tar.gz
7 Source3: http://geant4.cern.ch/support/source/PhotonEvaporation.2.0.tar.gz
8 Source4: http://geant4.cern.ch/support/source/RadiativeDecay.3.0.tar.gz
5  
6 < %prep
7 < %setup -n %n.%v
8 < %ifos darwin
9 < #patch0 -p1
10 < #%patch1
11 < %endif
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/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
20  
21 + Patch0:  geant-4.8.2.p01-nobanner
22 +
23 + %prep
24 + %setup -n %n.%downloadv
25 + pwd
26 + %patch0 -p1
27 +
28   %build
29 + if [ $(uname) = Darwin ]; then
30 +  export MACOSX_DEPLOYMENT_TARGET="10.4"
31 + fi
32   # Linux? -pthread?
33 < export G4SYSTEM=$(uname)-g++
34 < export G4INSTALL=%i
35 < export G4BASE=$PWD/source
36 < export G4WORKDIR=$PWD
37 < export G4TMP=$PWD/tmp
33 > touch G4BuildConf.sh
34 > echo "export OS_ARCH=%{cmsplatf}" >> G4BuildConf.sh
35 > #FIXME: is this correct???
36 > echo "export G4SYSTEM=$(uname)-g++" >> G4BuildConf.sh
37 > echo "export G4INSTALL=%i" >> G4BuildConf.sh
38 > echo "export G4BASE=$PWD/source" >> G4BuildConf.sh
39 > echo "export G4WORKDIR=$PWD" >> G4BuildConf.sh
40 > echo "export G4TMP=$PWD/tmp" >> G4BuildConf.sh
41 > echo "export G4LIB=%i/lib" >> G4BuildConf.sh
42 > echo "export G4LIB_BUILD_SHARED=1" >> G4BuildConf.sh
43 > echo "unset G4DEBUG" >> G4BuildConf.sh
44 > echo "export G4_NO_VERBOSE=1" >> G4BuildConf.sh
45 > echo "export CPPVERBOSE=yes" >> G4BuildConf.sh
46 >
47 > echo "export G4LEVELGAMMADATA=%i/data/PhotonEvaporation/%{photonEvaporationVersion}" >> G4BuildConf.sh
48 > echo "export G4RADIOACTIVEDATA=%i/data/RadioactiveDecay%{radioactiveDecayVersion}" >> G4BuildConf.sh
49 > echo "export G4LEDATA=%i/data/G4EMLOW%{g4EMLOWVersion}" >> G4BuildConf.sh
50 > # G4ELASTIC is not needed from 8.2 onward
51 > #echo "export G4ELASTIC=%i/data/G4ELASTIC%{g4ElasticScatteringVersion}" >> G4BuildConf.sh
52 >
53 > # From Gabriele Cosmo: The variable name 'NeutronHPCrossSections' is replaced by
54 > # 'G4NEUTRONHPDATA' starting from version 9.0.
55 > #echo "export NeutronHPCrossSections=%i/data/G4NDL%{g4NDLVersion}" >> G4BuildConf.sh
56 > echo "export G4NEUTRONHPDATA=%i/data/G4NDL%{g4NDLVersion}" >> G4BuildConf.sh
57 >
58  
25 export G4LIB_BUILD_SHARED=1
26 export G4DEBUG=1
59   # export G4LIB_BUILD_STATIC=1
60   # FIXME: For OS X? export G4NO_OPTIMISE=1 // unset G4OPTIMISE
61   # FIXME: override CERNLIB_PATH?
62  
63 < export CLHEP_BASE_DIR=$CLHEP_ROOT
63 > echo "export CLHEP_BASE_DIR=$CLHEP_ROOT" >> G4BuildConf.sh
64  
65 < export G4USE_STL=1
65 > echo "export G4USE_STL=1" >> G4BuildConf.sh
66   # export G4USE_G3TOG4=1
67  
68 < export G4UI_BUILD_TERMINAL_SESSION=1
68 > # G4UI_BUILD_TERMINAL_SESSION is the default:
69 > echo "export G4UI_BUILD_TERMINAL_SESSION=1" >> G4BuildConf.sh
70   # export G4UI_BUILD_GAG_SESSION=1
71   # export G4UI_BUILD_XAW_SESSION=1
72   # export G4UI_BUILD_XM_SESSION=1
73   # export G4UI_BUILD_WO_SESSION=1
74  
75 < export OGLHOME=/usr/X11R6
75 > # FIXME: this will not work on osx!
76 > echo "export OGLHOME=/usr/X11R6" >> G4BuildConf.sh
77   # export OGLLIBS="-L$OGLHOME/lib -lGLU -lGL"
78   # export OGLFLAGS="-I$OGLHOME/include"
79  
80 < export G4VIS_BUILD_DAWNFILE_DRIVER=1
80 > # G4VIS_BUILD_DAWNFILE_DRIVER is the default
81 > echo "export G4VIS_BUILD_DAWNFILE_DRIVER=1" >> G4BuildConf.sh
82   # export G4VIS_BUILD_DAWN_DRIVER=1
83   # export G4VIS_BUILD_OPENGLX_DRIVER=1
84   # export G4VIS_BUILD_OPENGLXM_DRIVER=1
85 < export G4VIS_BUILD_VRMLFILE_DRIVER=1
86 < export G4VIS_BUILD_VRML_DRIVER=1
87 < export G4VIS_BUILD_RAYTRACER_DRIVER=1
88 <
85 > # echo "export G4VIS_BUILD_VRMLFILE_DRIVER=1" >> G4BuildConf.sh
86 > # echo "export G4VIS_BUILD_VRML_DRIVER=1" >> G4BuildConf.sh
87 > # echo "export G4VIS_BUILD_RAYTRACER_DRIVER=1" >> G4BuildConf.sh
88 > # export G4LIB_BUILD_G3TOG4=1
89 > source G4BuildConf.sh
90   mkdir -p %i
91   tar -cf - config source | tar -C %i -xf -
92 < make -C $G4BASE all
92 >
93 > make -C $G4BASE global
94   make -C $G4BASE includes
95  
96   %install
97 + case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
98 + mkdir -p %i/etc
99 + cp G4BuildConf.sh %i/etc
100 + mv %i/lib/$(uname)-g++/*.$so %i/lib
101 + # The following file does not appear to exist after this spec file was
102 + # switched # to use the subsystem libraries instead of the individual ones,
103 + # so comment # it for now
104 + #mv %i/lib/$(uname)-g++/libname.map %i/lib
105 + rm -rf %i/lib/$(uname)-g++
106   # Build already installed into prefix
107   mkdir -p %i/data
108   tar -C %i/data -zxvf %_sourcedir/G4NDL*.tar.gz
109   tar -C %i/data -zxvf %_sourcedir/G4EMLOW*.tar.gz
110   tar -C %i/data -zxvf %_sourcedir/Photon*.tar.gz
111 < tar -C %i/data -zxvf %_sourcedir/Rad*.tar.gz
111 > tar -C %i/data -zxvf %_sourcedir/G4Rad*.tar.gz
112 > tar -C %i/data -zxvf %_sourcedir/G4NEU*.tar.gz
113 > # Clean up the sources, which are not needed in the rpm
114 > rm -rf %i/source

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines