ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/root.spec
Revision: 1.218
Committed: Tue Nov 2 23:19:05 2010 UTC (14 years, 5 months ago) by elmer
Branch: MAIN
CVS Tags: CMSSW_3_10_0_pre4r52706, pe20101112b-for3100p4r52706, pe20101112-for3100p4r52706
Changes since 1.217: +2 -1 lines
Log Message:
  Build using external xrootd (currently identical to ROOT 5.27/06 version).
  Build external xrootd for both offline and online this time.

File Contents

# User Rev Content
1 elmer 1.217 ### RPM lcg root 5.27.06
2 dlange 1.57 ## INITENV +PATH PYTHONPATH %i/lib/python
3 elmer 1.198 ## INITENV SET ROOTSYS %i
4 ratnik 1.106 #Source: cvs://:pserver:cvs@root.cern.ch:2401/user/cvs?passwd=Ah<Z&tag=-rv%(echo %realversion | tr . -)&module=root&output=/%{n}_v%{realversion}.source.tar.gz
5 elmer 1.144 Source: ftp://root.cern.ch/%n/%{n}_v%{realversion}.source.tar.gz
6 muzaffar 1.165 %define closingbrace )
7 elmer 1.179 %define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo false;; esac)
8 elmer 1.96
9 elmer 1.217 Patch0: root-5.27-06-externals
10     Patch1: root-5.27-04-CINT-maxlongline-maxtypedef
11     Patch2: root-5.22-00a-roofit-silence-static-printout
12     Patch3: root-5.22-00d-linker-gnu-hash-style
13     Patch4: root-5.22-00d-TBranchElement-dropped-data-member
14     Patch5: root-5.27-06-fireworks9
15 elmer 1.98
16     %define cpu %(echo %cmsplatf | cut -d_ -f2)
17    
18 elmer 1.218 Requires: xrootd gccxml gsl castor libjpg dcap pcre python
19 elmer 1.217 %if "%online" != "true"
20     Requires: qt openssl libpng zlib libungif libtiff
21 elmer 1.98 %endif
22 eulisse 1.25
23 eulisse 1.1 %prep
24     %setup -n root
25 ratnik 1.106 %patch0 -p1
26     %patch1 -p1
27 elmer 1.205 %patch2 -p1
28 elmer 1.217 # patch3 is OS version dependent, see below
29 elmer 1.205 %patch4 -p1
30 elmer 1.149 %patch5 -p1
31 elmer 1.204
32 elmer 1.217 # The following patch can only be applied on SLC5 or later (extra linker
33 elmer 1.198 # options only available with the SLC5 binutils)
34     case %cmsplatf in
35     slc5_* | slc5onl_* )
36 elmer 1.217 %patch3 -p1
37 elmer 1.198 ;;
38     esac
39 eulisse 1.190
40 eulisse 1.1 %build
41 andreasp 1.163
42 eulisse 1.1 mkdir -p %i
43 muzaffar 1.209 export LIBJPG_ROOT
44 elmer 1.14 export ROOTSYS=%_builddir/root
45 elmer 1.180 export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)
46 dlange 1.103
47 muzaffar 1.164 %if "%online" == "true"
48 elmer 1.181 # Use system qt. Also skip xrootd and odbc for online case:
49 ratnik 1.111
50 muzaffar 1.164 EXTRA_CONFIG_ARGS="--with-f77=/usr
51 ratnik 1.111 --disable-odbc
52 elmer 1.217 --disable-qt --disable-qtgsi --disable-astiff"
53 dlange 1.103 %else
54 muzaffar 1.209 export LIBPNG_ROOT ZLIB_ROOT LIBTIFF_ROOT LIBUNGIF_ROOT
55 muzaffar 1.164 EXTRA_CONFIG_ARGS="--with-f77=${GCC_ROOT}
56 ratnik 1.106 --enable-qt --with-qt-libdir=${QT_ROOT}/lib --with-qt-incdir=${QT_ROOT}/include
57     --with-ssl-incdir=${OPENSSL_ROOT}/include
58 muzaffar 1.164 --with-ssl-libdir=${OPENSSL_ROOT}/lib
59     --enable-qtgsi"
60 dlange 1.103 %endif
61    
62 muzaffar 1.164 CONFIG_ARGS="--enable-table
63 eulisse 1.20 --disable-builtin-pcre
64     --disable-builtin-freetype
65     --disable-builtin-zlib
66 elmer 1.98 --with-gccxml=${GCCXML_ROOT}
67 elmer 1.180 --enable-python --with-python-libdir=${PYTHON_ROOT}/lib --with-python-incdir=${PYTHON_ROOT}/include/python${PYTHONV}
68 eulisse 1.2 --enable-explicitlink
69 eulisse 1.20 --enable-mathmore
70 eulisse 1.2 --enable-reflex
71     --enable-cintex
72     --enable-minuit2
73 elmer 1.98 --disable-ldap
74 gowdy 1.143 --disable-krb5
75 elmer 1.218 --with-xrootd=${XROOTD_ROOT}
76 eulisse 1.34 --with-gsl-incdir=${GSL_ROOT}/include
77     --with-gsl-libdir=${GSL_ROOT}/lib
78 elmer 1.59 --with-dcap-libdir=${DCAP_ROOT}/lib
79 elmer 1.98 --with-dcap-incdir=${DCAP_ROOT}/include
80     --disable-pgsql
81 elmer 1.181 --disable-mysql
82 elmer 1.187 --disable-xml ${EXTRA_CONFIG_ARGS}"
83 elmer 1.98
84 elmer 1.183 case $(uname)-$(uname -m) in
85 eulisse 1.2 Linux-x86_64)
86 elmer 1.217 ./configure linuxx8664gcc $CONFIG_ARGS --with-rfio-libdir=${CASTOR_ROOT}/lib --with-rfio-incdir=${CASTOR_ROOT}/include/shift --with-castor-libdir=${CASTOR_ROOT}/lib --with-castor-incdir=${CASTOR_ROOT}/include/shift ;;
87 elmer 1.54 Linux-i*86)
88 elmer 1.217 ./configure linux $CONFIG_ARGS --with-rfio-libdir=${CASTOR_ROOT}/lib --with-rfio-incdir=${CASTOR_ROOT}/include/shift --with-castor-libdir=${CASTOR_ROOT}/lib --with-castor-incdir=${CASTOR_ROOT}/include/shift ;;
89 elmer 1.11 Darwin*)
90 elmer 1.198 case %cmsplatf in
91     *_ia32_* )
92     comparch=i386 ;;
93     *_amd64_* )
94     comparch=x86_64 ;;
95     * )
96     comparch=ppc ;;
97     esac
98     export CC="gcc -arch $comparch" CXX="g++ -arch $comparch"
99     ./configure macosx $CONFIG_ARGS --with-cc="$CC" --with-cxx="$CXX" --disable-rfio --disable-builtin_afterimage ;;
100 elmer 1.54 Linux-ppc64*)
101 elmer 1.98 ./configure linux $CONFIG_ARGS --disable-rfio;;
102 eulisse 1.1 esac
103 eulisse 1.2
104 eulisse 1.147 case %cmsplatf in
105     osx*)
106     makeopts=
107     ;;
108     *)
109     makeopts="%makeprocesses"
110     ;;
111     esac
112    
113     make $makeopts
114 eulisse 1.20 make cintdlls
115 eulisse 1.147
116 eulisse 1.1 %install
117     # Override installers if we are using GNU fileutils cp. On OS X
118     # ROOT's INSTALL is defined to "cp -pPR", which only works with
119     # the system cp (/bin/cp). If you have fileutils on fink, you
120     # lose. Check which one is getting picked up and select syntax
121     # accordingly. (FIXME: do we need to check that -P is accepted?)
122     if (cp --help | grep -e '-P.*--parents') >/dev/null 2>&1; then
123     cp="cp -dpR"
124     else
125     cp="cp -pPR"
126     fi
127    
128 dlange 1.57 export ROOTSYS=%i
129 eulisse 1.5 make INSTALL="$cp" INSTALLDATA="$cp" install
130 dlange 1.57 mkdir -p $ROOTSYS/lib/python
131 elmer 1.141 cp -r cint/reflex/python/genreflex $ROOTSYS/lib/python
132 elmer 1.204
133     # SCRAM ToolBox toolfile
134     mkdir -p %i/etc/scram.d
135     # rootcore toolfile
136     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootcore.xml
137     <tool name="rootcore" version="%v">
138     <info url="http://root.cern.ch/root/"/>
139     <lib name="Tree"/>
140     <lib name="Net"/>
141     <lib name="Thread"/>
142     <lib name="MathCore"/>
143     <lib name="RIO"/>
144     <lib name="Core"/>
145     <lib name="Cint"/>
146     <client>
147     <environment name="ROOTCORE_BASE" default="%i"/>
148     <environment name="LIBDIR" default="$ROOTCORE_BASE/lib"/>
149     <environment name="INCLUDE" default="$ROOTCORE_BASE/include"/>
150     <environment name="INCLUDE" default="$ROOTCORE_BASE/cint"/>
151     </client>
152     <runtime name="PATH" value="$ROOTCORE_BASE/bin" type="path"/>
153     <runtime name="ROOTSYS" value="$ROOTCORE_BASE/"/>
154     <runtime name="PYTHONPATH" value="$ROOTCORE_BASE/lib" type="path"/>
155     <use name="sockets"/>
156     <use name="pcre"/>
157     <use name="zlib"/>
158     </tool>
159     EOF_TOOLFILE
160    
161     # root toolfile, alias for rootphysics. Using rootphysics is preferred.
162     cat << \EOF_TOOLFILE >%i/etc/scram.d/root.xml
163     <tool name="root" version="%v">
164     <info url="http://root.cern.ch/root/"/>
165     <use name="rootphysics"/>
166     </tool>
167     EOF_TOOLFILE
168    
169     # roothistmatrix toolfile
170     cat << \EOF_TOOLFILE >%i/etc/scram.d/roothistmatrix.xml
171 elmer 1.217 <tool name="roothistmatrix" version="%v">
172 elmer 1.204 <info url="http://root.cern.ch/root/"/>
173     <lib name="Hist"/>
174     <lib name="Matrix"/>
175     <use name="ROOTCore"/>
176     </tool>
177     EOF_TOOLFILE
178    
179     # rootgpad toolfile
180     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootgpad.xml
181 elmer 1.217 <tool name="rootgpad" version="%v">
182 elmer 1.204 <info url="http://root.cern.ch/root/"/>
183     <lib name="Gpad"/>
184     <lib name="Graf"/>
185     <use name="roothistmatrix"/>
186     </tool>
187     EOF_TOOLFILE
188    
189     # rootphysics toolfile
190     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootphysics.xml
191     <tool name="rootphysics" version="%v">
192     <info url="http://root.cern.ch/root/"/>
193     <lib name="Physics"/>
194     <use name="roothistmatrix"/>
195     </tool>
196     EOF_TOOLFILE
197    
198     # rootgraphics toolfile, identical to old "root" toolfile
199     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootgraphics.xml
200     <tool name="rootgraphics" version="%v">
201     <info url="http://root.cern.ch/root/"/>
202     <lib name="TreePlayer"/>
203     <lib name="Graf3d"/>
204     <lib name="Postscript"/>
205     <use name="rootgpad"/>
206     </tool>
207     EOF_TOOLFILE
208    
209     # rootcintex toolfile
210     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootcintex.xml
211     <tool name="rootcintex" version="%v">
212     <info url="http://root.cern.ch/root/"/>
213     <lib name="Cintex"/>
214     <use name="ROOTRflx"/>
215     <use name="ROOTCore"/>
216     </tool>
217     EOF_TOOLFILE
218    
219     # rootinteractive toolfile (GQt/qt lib dependencies
220     # have been moved to rootqt.xml)
221     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootinteractive.xml
222     <tool name="rootinteractive" version="%v">
223     <info url="http://root.cern.ch/root/"/>
224     <lib name="Rint"/>
225     <lib name="Gui"/>
226     <use name="libjpg"/>
227     <use name="libpng"/>
228     <use name="rootgpad"/>
229     </tool>
230     EOF_TOOLFILE
231    
232     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootqt.xml
233     <tool name="rootqt" version="%v">
234     <info url="http://root.cern.ch/root/"/>
235     <lib name="GQt"/>
236     <use name="qt"/>
237     </tool>
238     EOF_TOOLFILE
239    
240     # rootmath toolfile
241     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootmath.xml
242     <tool name="rootmath" version="%v">
243     <info url="http://root.cern.ch/root/"/>
244     <lib name="GenVector"/>
245     <lib name="MathMore"/>
246     <use name="ROOTCore"/>
247     <use name="gsl"/>
248     </tool>
249     EOF_TOOLFILE
250    
251     # rootminuit toolfile
252     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootminuit.xml
253     <tool name="rootminuit" version="%v">
254     <info url="http://root.cern.ch/root/"/>
255     <lib name="Minuit"/>
256     <use name="rootgpad"/>
257     </tool>
258     EOF_TOOLFILE
259    
260     # rootminuit2 toolfile
261     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootminuit2.xml
262     <tool name="rootminuit2" version="%v">
263     <info url="http://root.cern.ch/root/"/>
264     <lib name="Minuit2"/>
265     <use name="rootgpad"/>
266     </tool>
267     EOF_TOOLFILE
268    
269     # rootrflx toolfile
270     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootrflx.xml
271     <tool name="rootrflx" version="%v">
272     <info url="http://root.cern.ch/root/"/>
273     <lib name="Reflex"/>
274     <client>
275     <environment name="ROOTRFLX_BASE" default="%i"/>
276     <environment name="LIBDIR" default="$ROOTRFLX_BASE/lib"/>
277     <environment name="INCLUDE" default="$ROOTRFLX_BASE/include"/>
278     </client>
279     <runtime name="PATH" value="$ROOTRFLX_BASE/bin" type="path"/>
280     <runtime name="ROOTSYS" value="$ROOTRFLX_BASE/"/>
281     <runtime name="GENREFLEX" value="$ROOTRFLX_BASE/bin/genreflex"/>
282     <use name="sockets"/>
283     <use name="gccxml"/>
284     </tool>
285     EOF_TOOLFILE
286    
287     # roothtml toolfile
288     cat << \EOF_TOOLFILE >%i/etc/scram.d/roothtml.xml
289     <tool name="roothtml" version="%v">
290     <info url="http://root.cern.ch/root/"/>
291     <lib name="Html"/>
292     <use name="rootgpad"/>
293     </tool>
294     EOF_TOOLFILE
295    
296     # rootmlp toolfile
297     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootmlp.xml
298     <tool name="rootmlp" version="%v">
299     <info url="http://root.cern.ch/root/"/>
300     <lib name="MLP"/>
301     <use name="RootGraphics"/>
302     </tool>
303     EOF_TOOLFILE
304    
305     # roottmva toolfile
306     cat << \EOF_TOOLFILE >%i/etc/scram.d/roottmva.xml
307     <tool name="roottmva" version="%v">
308     <info url="http://root.cern.ch/root/"/>
309     <lib name="TMVA"/>
310     <use name="ROOTMLP"/>
311     <use name="rootminuit"/>
312     </tool>
313     EOF_TOOLFILE
314    
315     # rootthread toolfile
316     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootthread.xml
317     <tool name="rootthread" version="%v">
318     <info url="http://root.cern.ch/root/"/>
319     <use name="ROOTCore"/>
320     </tool>
321     EOF_TOOLFILE
322    
323     %post
324     perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $(find $RPM_INSTALL_PREFIX/%pkgrel/etc/scram.d -type f)
325 elmer 1.217