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

Comparing COMP/CMSDIST/root.spec (file contents):
Revision 1.49 by sashby, Thu Dec 14 10:59:06 2006 UTC vs.
Revision 1.207 by elmer, Wed Sep 1 10:50:53 2010 UTC

# Line 1 | Line 1
1 < ### RPM lcg root 5.13.04e
2 < # INITENV +PATH PYTHONPATH %i/lib/python
3 < %define realVersion %(echo %v | cut -d- -f1)
4 < 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 < #Source: ftp://root.cern.ch/%n/%{n}_v%{realVersion}.source.tar.gz
1 > ### RPM lcg root 5.22.00d
2 > ## INITENV +PATH PYTHONPATH %i/lib/python
3 > ## INITENV SET ROOTSYS %i  
4 > #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 > Source: ftp://root.cern.ch/%n/%{n}_v%{realversion}.source.tar.gz
6 > %define closingbrace )
7 > %define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo false;; esac)
8 >
9 > Patch0: root-5.18-00-libpng
10 > Patch1: root-5.22-00d-CINT-maxlongline-maxtypedef
11 > Patch2: root-5.22-00-TMVA-shut-the-hell-up-for-once
12 > Patch3: root-5.22-00a-TMVA-shut-the-hell-up-again
13 > Patch4: root-5.22-00d-fireworks-graf3d-gui
14 > Patch5: root-5.22-00a-roofit-silence-static-printout
15 > Patch6: root-5.22-00a-TMVA-just-shut-the-hell-up
16 > Patch7: root-5.22-00a-th1
17 > Patch8: root-5.22-00d-makelib-ldl
18 > Patch9: root-5.22-00a-fireworks1
19 > Patch10: root-5.22-00a-gcc44
20 > Patch11: root-5.22-00a-fireworks2
21 > Patch12: root-5.22-00a-fireworks3
22 > Patch13: root-5.22-00a-gcc43-array-bounds-dictionary-workaround
23 > Patch14: root-5.22-00a-fireworks4
24 > Patch15: root-5.22-00d-fireworks5
25 > Patch16: root-5.22-00d-genreflex_python26_popen3
26 > Patch17: root-5.22-00d-fireworks6
27 > Patch18: root-5.22-00d-linker-gnu-hash-style
28 > Patch19: root-5.22-00d-TFile-version3-Init
29 > Patch20: root-5.22-00d-cint-namespace
30 > Patch21: root-5.22-00d-fireworks7
31 > Patch22: root-5.22-00d-TMath-Vavilov
32 > Patch23: root-5.22-00d-TBranchElement-dropped-data-member
33 > Patch24: root-5.22-00d-fireworks8
34 > Patch25: root-5.22-00d-fix-python-shebang
35 > Patch26: root-5.22-00d-RootsysOnMac
36 > Patch27: root-5.22-00d-TString-Clear
37 >
38   %define cpu %(echo %cmsplatf | cut -d_ -f2)
7 %define pythonv %(echo $PYTHON_VERSION | cut -d. -f1,2)
8 Requires: gccxml python qt gsl castor openssl mysql libpng libjpg dcap pcre zlib oracle
39  
40 < %if "%cpu" != "amd64"
40 > Requires: gccxml gsl castor libjpg dcap pcre python fftw3
41 >
42 > %if "%online" != "true"
43 > Requires: qt openssl libpng zlib libungif xrootd
44 > %else
45 > %define skiplibtiff true
46 > %endif
47 >
48 > %if "%cpu" == "amd64"
49 > %define skiplibtiff true
50 > %endif
51 >
52 > %if "%skiplibtiff" != "true"
53   Requires: libtiff
54   %endif
55  
56   %prep
57   %setup -n root
58 + %patch0 -p1
59 + %patch1 -p1
60 + %patch2 -p1
61 + %patch3 -p1
62 + %patch4 -p1
63 +
64 + %patch5 -p1
65 + %patch6 -p1
66 + %patch7 -p1
67 + %patch8 -p1
68 + %patch9 -p1
69 +
70 + # patch10 is compiler version dependent, see below
71 + %patch11 -p1
72 + %patch12 -p1
73 + # patch13 is compiler version dependent, see below
74 +
75 + # work around patch issue...
76 + rm graf3d/gl/src/gl2ps.c
77 + %patch14 -p1
78 + #work around patch issues in patch14(?)
79 + rm graf3d/eve/inc/TEveLegoOverlay.h.orig
80 + rm graf3d/eve/src/TEveLegoOverlay.cxx
81 + rm graf3d/gl/inc/gl2ps.h.orig
82 + rm graf3d/gl/src/gl2ps.c.orig
83 + %patch15 -p1
84 + %patch16 -p1
85 + %patch17 -p1
86 + %patch19 -p1
87 + %patch20 -p1
88 + %patch21 -p1
89 + %patch22 -p1
90 + %patch23 -p1
91 + %patch24 -p1
92 + %patch25 -p1
93 + %patch26 -p1
94 + %patch27 -p1
95 +
96 + case %gccver in
97 +  4.3.*)
98 + %patch13 -p1
99 +  ;;
100 +  4.4.*)
101 + %patch10 -p1
102 +  ;;
103 + esac
104 +
105 + # The following patch can only be applied on SLC5 or later (extra linker
106 + # options only available with the SLC5 binutils)
107 + case %cmsplatf in
108 +  slc5_* | slc5onl_* )
109 + %patch18 -p1
110 +  ;;
111 + esac
112 +
113   %build
114 +
115   mkdir -p %i
116   export ROOTSYS=%_builddir/root
117 + export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)
118 +
119 + %if "%online" == "true"
120 + # Use system qt. Also skip xrootd and odbc for online case:
121 +
122 + EXTRA_CONFIG_ARGS="--with-f77=/usr
123 +             --disable-xrootd
124 +             --disable-odbc
125 +             --disable-qt --disable-qtgsi"
126 + %else
127 + EXTRA_CONFIG_ARGS="--with-f77=${GCC_ROOT}
128 +             --with-xrootd=$XROOTD_ROOT
129 +             --enable-qt --with-qt-libdir=${QT_ROOT}/lib --with-qt-incdir=${QT_ROOT}/include
130 +             --with-ssl-incdir=${OPENSSL_ROOT}/include
131 +             --with-ssl-libdir=${OPENSSL_ROOT}/lib
132 +             --enable-qtgsi"
133 + %endif
134 +
135   CONFIG_ARGS="--enable-table
136               --disable-builtin-pcre
137               --disable-builtin-freetype
138               --disable-builtin-zlib
139               --with-gccxml=${GCCXML_ROOT}
140 <             --enable-python --with-python-libdir=${PYTHON_ROOT}/lib --with-python-incdir=${PYTHON_ROOT}/include/python2.4
25 <             --enable-mysql --with-mysql-libdir=${MYSQL_ROOT}/lib --with-mysql-incdir=${MYSQL_ROOT}/include
26 <             --enable-oracle --with-oracle-libdir=${ORACLE_ROOT}/lib --with-oracle-incdir=${ORACLE_ROOT}/include
140 >             --enable-python --with-python-libdir=${PYTHON_ROOT}/lib --with-python-incdir=${PYTHON_ROOT}/include/python${PYTHONV}
141               --enable-explicitlink
28             --enable-qtgsi
29             --enable-qt --with-qt-libdir=${QT_ROOT}/lib --with-qt-incdir=${QT_ROOT}/include
30             --enable-mathcore
142               --enable-mathmore
143               --enable-reflex  
144               --enable-cintex
145               --enable-minuit2
146 <             --enable-roofit
146 >             --enable-fftw3
147 >             --with-fftw3-incdir=${FFTW3_ROOT}/include
148 >             --with-fftw3-libdir=${FFTW3_ROOT}/lib
149               --disable-ldap
150               --disable-krb5
38                 --with-dcap-libdir=${DCAP_ROOT}/lib
39             --with-dcap-incdir=${DCAP_ROOT}/include
40             --with-ssl-incdir=${OPENSSL_ROOT}/include
41             --with-ssl-libdir=${OPENSSL_ROOT}/lib
42             --with-shift-incdir=${CASTOR_ROOT}/include/shift
43             --with-shift-libdir=${CASTOR_ROOT}/lib
151               --with-gsl-incdir=${GSL_ROOT}/include
152               --with-gsl-libdir=${GSL_ROOT}/lib
153 +             --with-dcap-libdir=${DCAP_ROOT}/lib
154 +             --with-dcap-incdir=${DCAP_ROOT}/include
155               --disable-pgsql
156 <             --disable-xml"
156 >             --disable-mysql
157 >             --disable-xml ${EXTRA_CONFIG_ARGS}"
158  
159   case $(uname)-$(uname -m) in
160    Linux-x86_64)
161 <    ./configure linuxx8664gcc $CONFIG_ARGS --disable-astiff;;
162 <  Linux*)
163 <    ./configure linux $CONFIG_ARGS;;
161 >    ./configure linuxx8664gcc $CONFIG_ARGS --with-shift-libdir=${CASTOR_ROOT}/lib --with-shift-incdir=${CASTOR_ROOT}/include/shift --disable-astiff;;
162 >  Linux-i*86)
163 >    ./configure linux  $CONFIG_ARGS --with-shift-libdir=${CASTOR_ROOT}/lib --with-shift-incdir=${CASTOR_ROOT}/include/shift;;
164    Darwin*)
165 <    ./configure macosx $CONFIG_ARGS;;
165 >    case %cmsplatf in
166 >    *_ia32_* )
167 >      comparch=i386 ;;
168 >    *_amd64_* )
169 >      comparch=x86_64 ;;
170 >    * )
171 >      comparch=ppc ;;
172 >    esac
173 >    export CC="gcc -arch $comparch" CXX="g++ -arch $comparch"
174 >    ./configure macosx $CONFIG_ARGS --with-cc="$CC" --with-cxx="$CXX" --disable-rfio --disable-builtin_afterimage ;;
175 >  Linux-ppc64*)
176 >    ./configure linux $CONFIG_ARGS --disable-rfio;;
177   esac
178  
179 < make
179 > case %cmsplatf in
180 >  osx*)
181 >   makeopts=
182 >  ;;
183 >  *)
184 >   makeopts="%makeprocesses"
185 >  ;;
186 > esac
187 >
188 > make $makeopts
189   make cintdlls
190 +
191   %install
192   # Override installers if we are using GNU fileutils cp.  On OS X
193   # ROOT's INSTALL is defined to "cp -pPR", which only works with
# Line 69 | Line 200 | else
200    cp="cp -pPR"
201   fi
202  
203 < export ROOTSYS=%i/root
203 > export ROOTSYS=%i
204   make INSTALL="$cp" INSTALLDATA="$cp" install
205 < mkdir -p %i/root/lib/python
206 < cp -r reflex/python/genreflex %i/root/lib/python
205 > mkdir -p $ROOTSYS/lib/python
206 > cp -r cint/reflex/python/genreflex $ROOTSYS/lib/python
207   #
208 +
209 + # SCRAM ToolBox toolfile
210 + mkdir -p %i/etc/scram.d
211 + # rootcore toolfile
212 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootcore.xml
213 +  <tool name="rootcore" version="%v">
214 +    <info url="http://root.cern.ch/root/"/>
215 +    <lib name="Tree"/>
216 +    <lib name="Net"/>
217 +    <lib name="Thread"/>
218 +    <lib name="MathCore"/>
219 +    <lib name="RIO"/>
220 +    <lib name="Core"/>
221 +    <lib name="Cint"/>
222 +    <client>
223 +      <environment name="ROOTCORE_BASE" default="%i"/>
224 +      <environment name="LIBDIR" default="$ROOTCORE_BASE/lib"/>
225 +      <environment name="INCLUDE" default="$ROOTCORE_BASE/include"/>
226 +      <environment name="INCLUDE" default="$ROOTCORE_BASE/cint"/>
227 +    </client>
228 +    <runtime name="PATH" value="$ROOTCORE_BASE/bin" type="path"/>
229 +    <runtime name="ROOTSYS" value="$ROOTCORE_BASE/"/>
230 +    <runtime name="PYTHONPATH" value="$ROOTCORE_BASE/lib" type="path"/>
231 +    <use name="sockets"/>
232 +    <use name="pcre"/>
233 +    <use name="zlib"/>
234 +  </tool>
235 + EOF_TOOLFILE
236 +
237 + # root toolfile, alias for rootphysics. Using rootphysics is preferred.
238 + cat << \EOF_TOOLFILE >%i/etc/scram.d/root.xml
239 +  <tool name="root" version="%v">
240 +    <info url="http://root.cern.ch/root/"/>
241 +    <use name="rootphysics"/>
242 +  </tool>
243 + EOF_TOOLFILE
244 +
245 + # roothistmatrix toolfile
246 + cat << \EOF_TOOLFILE >%i/etc/scram.d/roothistmatrix.xml
247 +  <tool name="roothistmatrix" version="%v">
248 +    <info url="http://root.cern.ch/root/"/>
249 +    <lib name="Hist"/>
250 +    <lib name="Matrix"/>
251 +    <use name="ROOTCore"/>
252 +  </tool>
253 + EOF_TOOLFILE
254 +
255 + # rootgpad toolfile
256 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootgpad.xml
257 +  <tool name="rootgpad" version="%v">
258 +    <info url="http://root.cern.ch/root/"/>
259 +    <lib name="Gpad"/>
260 +    <lib name="Graf"/>
261 +    <use name="roothistmatrix"/>
262 +  </tool>
263 + EOF_TOOLFILE
264 +
265 + # rootphysics toolfile
266 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootphysics.xml
267 +  <tool name="rootphysics" version="%v">
268 +    <info url="http://root.cern.ch/root/"/>
269 +    <lib name="Physics"/>
270 +    <use name="roothistmatrix"/>
271 +  </tool>
272 + EOF_TOOLFILE
273 +
274 + # rootgraphics toolfile, identical to old "root" toolfile
275 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootgraphics.xml
276 +  <tool name="rootgraphics" version="%v">
277 +    <info url="http://root.cern.ch/root/"/>
278 +    <lib name="TreePlayer"/>
279 +    <lib name="Graf3d"/>
280 +    <lib name="Postscript"/>
281 +    <use name="rootgpad"/>
282 +  </tool>
283 + EOF_TOOLFILE
284 +
285 + # rootcintex toolfile
286 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootcintex.xml
287 +  <tool name="rootcintex" version="%v">
288 +    <info url="http://root.cern.ch/root/"/>
289 +    <lib name="Cintex"/>
290 +    <use name="ROOTRflx"/>
291 +    <use name="ROOTCore"/>
292 +  </tool>
293 + EOF_TOOLFILE
294 +
295 + # rootinteractive toolfile (GQt/qt lib dependencies
296 + # have been moved to rootqt.xml)
297 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootinteractive.xml
298 +  <tool name="rootinteractive" version="%v">
299 +    <info url="http://root.cern.ch/root/"/>
300 +    <lib name="Rint"/>
301 +    <lib name="Gui"/>
302 +    <use name="libjpg"/>
303 +    <use name="libpng"/>
304 +    <use name="rootgpad"/>
305 +  </tool>
306 + EOF_TOOLFILE
307 +
308 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootqt.xml
309 +  <tool name="rootqt" version="%v">
310 +    <info url="http://root.cern.ch/root/"/>
311 +    <lib name="GQt"/>
312 +    <use name="qt"/>
313 +  </tool>
314 + EOF_TOOLFILE
315 +
316 + # rootmath toolfile
317 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootmath.xml
318 +  <tool name="rootmath" version="%v">
319 +    <info url="http://root.cern.ch/root/"/>
320 +    <lib name="GenVector"/>
321 +    <lib name="MathMore"/>
322 +    <use name="ROOTCore"/>
323 +    <use name="gsl"/>
324 +  </tool>
325 + EOF_TOOLFILE
326 +
327 + # rootminuit toolfile
328 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootminuit.xml
329 +  <tool name="rootminuit" version="%v">
330 +    <info url="http://root.cern.ch/root/"/>
331 +    <lib name="Minuit"/>
332 +    <use name="rootgpad"/>
333 +  </tool>
334 + EOF_TOOLFILE
335 +
336 + # rootminuit2 toolfile
337 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootminuit2.xml
338 +  <tool name="rootminuit2" version="%v">
339 +    <info url="http://root.cern.ch/root/"/>
340 +    <lib name="Minuit2"/>
341 +    <use name="rootgpad"/>
342 +  </tool>
343 + EOF_TOOLFILE
344 +
345 + # rootrflx toolfile
346 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootrflx.xml
347 +  <tool name="rootrflx" version="%v">
348 +    <info url="http://root.cern.ch/root/"/>
349 +    <lib name="Reflex"/>
350 +    <client>
351 +      <environment name="ROOTRFLX_BASE" default="%i"/>
352 +      <environment name="LIBDIR" default="$ROOTRFLX_BASE/lib"/>
353 +      <environment name="INCLUDE" default="$ROOTRFLX_BASE/include"/>
354 +    </client>
355 +    <runtime name="PATH" value="$ROOTRFLX_BASE/bin" type="path"/>
356 +    <runtime name="ROOTSYS" value="$ROOTRFLX_BASE/"/>
357 +    <runtime name="GENREFLEX" value="$ROOTRFLX_BASE/bin/genreflex"/>
358 +    <use name="sockets"/>
359 +    <use name="gccxml"/>
360 +  </tool>
361 + EOF_TOOLFILE
362 +
363 + # roothtml toolfile
364 + cat << \EOF_TOOLFILE >%i/etc/scram.d/roothtml.xml
365 +  <tool name="roothtml" version="%v">
366 +    <info url="http://root.cern.ch/root/"/>
367 +    <lib name="Html"/>
368 +    <use name="rootgpad"/>
369 +  </tool>
370 + EOF_TOOLFILE
371 +
372 + # rootmlp toolfile
373 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootmlp.xml
374 +  <tool name="rootmlp" version="%v">
375 +    <info url="http://root.cern.ch/root/"/>
376 +    <lib name="MLP"/>
377 +    <use name="RootGraphics"/>
378 +  </tool>
379 + EOF_TOOLFILE
380 +
381 + # roottmva toolfile
382 + cat << \EOF_TOOLFILE >%i/etc/scram.d/roottmva.xml
383 +  <tool name="roottmva" version="%v">
384 +    <info url="http://root.cern.ch/root/"/>
385 +    <lib name="TMVA"/>
386 +    <use name="ROOTMLP"/>
387 +    <use name="rootminuit"/>
388 +  </tool>
389 + EOF_TOOLFILE
390 +
391 + # rootthread toolfile
392 + cat << \EOF_TOOLFILE >%i/etc/scram.d/rootthread.xml
393 +  <tool name="rootthread" version="%v">
394 +    <info url="http://root.cern.ch/root/"/>
395 +    <use name="ROOTCore"/>
396 +  </tool>
397 + EOF_TOOLFILE
398 +
399 + %post
400 + perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $(find $RPM_INSTALL_PREFIX/%pkgrel/etc/scram.d -type f)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines