ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/root.spec
Revision: 1.232
Committed: Thu Jan 20 23:30:29 2011 UTC (14 years, 3 months ago) by elmer
Branch: MAIN
Changes since 1.231: +11 -5 lines
Log Message:
  Some monkeying around with the %if conditionals for the %online and %ismac
so that the Requires winds up correct on linux. I'm not 100% sure what is
going on, but it is as if the "false" part of the case definition of those
two things is not working correctly.

File Contents

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