ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/lcgaa.spec
Revision: 1.23
Committed: Mon Sep 11 10:37:00 2006 UTC (18 years, 7 months ago) by argiro
Branch: MAIN
CVS Tags: pre-for106, for105, for104, for103, for102, for101-take3, for101-take2, for101, forGeant481, CMSSW_1_0_0, for110p5
Changes since 1.22: +1 -1 lines
Log Message:
Rebuild for cms141b with root 5.12.00e

File Contents

# User Rev Content
1 argiro 1.23 ### RPM lcg lcgaa LCGAA_LCG_46-forCMS141b
2 eulisse 1.11 ## IMPORT configurations
3 eulisse 1.1 %define downloadn LCGAA-Packages
4     %define cvsdir CMSSW
5 eulisse 1.12 %define cvstag CMSSW_0_7_0
6     %define conftag CMS_135a_2
7 eulisse 1.1 %define tbxrepo cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/SCRAMToolBox?passwd=AA_:yZZ3e
8     %define cvsrepo cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/%cvsdir?passwd=AA_:yZZ3e
9 eulisse 1.10 Requires: p5-template-toolkit p5-xml-parser p5-uri p5-libwww-perl SCRAMV1 seal coral pool
10 eulisse 1.1
11     Source0: %{tbxrepo}&tag=-r%{conftag}&module=SCRAMToolBox&output=/toolbox.tar.gz
12     Source1: %{cvsrepo}&tag=-r%{cvstag}&module=config&output=/config.tar.gz
13 eulisse 1.5 Source2: afs:///afs/cern.ch/cms/external/LCGAA/LCG_wrapper_src.tar
14 eulisse 1.1
15     %prep
16     %setup -T -b 0 -n SCRAMToolBox
17     %setup -T -b 1 -n config
18 eulisse 1.6 %setup -T -c -b 2 -n src1
19 eulisse 1.1
20     cd ..
21 eulisse 1.6 cp -r src1/src src
22 eulisse 1.1 ls
23 eulisse 1.10 perl -p -i -e 's!<select.*(icutils|unixODBC|LCGAA|lcgaa|tkonlinesw).*>!!' config/requirements
24 eulisse 1.6
25 eulisse 1.2 echo PERL5LIB=$PERL5LIB
26 eulisse 1.1 perl -p -i -e '
27     # Keep track whether we are in a toolbox area or not
28     if ($. == 1) { $intbx = 1; }
29     if (/<base/) { $intbx = /SPITOOLS|SCRAMToolBox/; }
30    
31     # Replace base locations
32     s!cvs://.*/(SPITOOLS|SCRAMToolBox)\?[^">]+!file:%_builddir/SCRAMToolBox/!;
33     s!cvs://.*/%{cvsdir}\?[^">]+!file:%_builddir/!;
34    
35    
36     # Replace relative references depending on whether this is in
37     # toolbox, or for project itself; configuration is always in
38     # toolbox. In toolbox keep cvs module name but drop the leading
39     # SCRAMToolBox if there is one. In project always replace with
40     # rewritten paths. (FIXME: produce source archive in cvs order?)
41     if ($intbx) {
42     s!url="cvs:\?module="?([^">]+)"?\s+name="?([^">]+)"?>!url="file:$1" name="$2">!;
43     s!url="(cvs:\?module=|file:)SCRAMToolBox/(.*)">!url="file:$2">!;
44     } else {
45     s!url="cvs:\?module="?([^">]+)"?\s+name="?([^">]+)"?>!url="file:$2" name="$2">!;
46     }
47     ' config/boot \
48     config/bootsrc \
49     config/requirements \
50     config/requirements.tmpl \
51     SCRAMToolBox/Configuration/Configuration \
52     SCRAMToolBox/CMS/Configuration/CMSconfiguration
53    
54 eulisse 1.3 if [ "%cmsplatf" != "slc3_ia32_gcc323" ] && [ "$(uname)" = "Linux" ]
55 eulisse 1.1 then
56 eulisse 1.2 perl -p -i -e '
57     s!slc3_ia32_gcc323!%{cmsplatf}!;
58     s!slc3_ia32_gcc32!%{cmsplatf}!;
59     s!slc3_ia32_gcc3!%{cmsplatf}!;
60     ' config/boot \
61     config/bootsrc \
62     config/BuildFile \
63     config/requirements \
64     config/requirements.tmpl \
65     SCRAMToolBox/Configuration/Configuration \
66     SCRAMToolBox/CMS/Configuration/CMSconfiguration
67    
68     TOOLFILESTOPATCH=$(grep -e "<[aA]rchitecture.*name=\(slc3_ia32_gcc\|sl>\)" SCRAMToolBox/*/* SCRAMToolBox/*/*/* SCRAMToolBox/*/*/*/* | cut -d: -f1)
69     echo TOOLS TO PATCH $TOOLFILESTOPATCH
70    
71     if [ "$TOOLFILESTOPATCH" != "" ]
72     then
73     perl -p -i -e '
74     s!<[aA]rchitecture name=sl>!<architecture name=%cmsplatf>!;
75     s!<[aA]rchitecture name=slc3_ia32_.*>!<architecture name=%{cmsplatf}>!;
76     ' $TOOLFILESTOPATCH
77     fi
78     fi
79 eulisse 1.1
80     ls
81     perl -p -i -e'
82     s!<select name.*fed9.*>$!!;
83     s!<select name.*OTL.*>$!!;
84     s!<select name.*ignominy.*>$!!;
85     s!<select name.*iguana.*>$!!;
86     ' config/requirements \
87     config/requirements.tmpl
88    
89     perl -p -i -e'
90     s!name=%{cvsdir}!name=LCGAA!;
91     s!version=.*>$!version=%v>!;
92     s!%{cvstag}.*boot file!LCGAA_%v boot file!;
93     ' config/bootsrc
94    
95     ls
96 eulisse 1.10 rm -rf %i
97     mkdir -p %i
98 eulisse 1.1 %{?buildarch:%buildarch}
99     while true ; do echo $(dirname %i) ; done | \
100     scramv1 project -d $(dirname %i) \
101     -b config/bootsrc || true
102    
103     %build
104     cd %i/src
105     %{?buildarch:%buildarch}
106     if [ $(uname) = Darwin ]; then
107     # scramv1 doesn't know the rpath variable on darwin...
108     scramv1 b echo_null # ensure lib, bin exist
109     eval `scramv1 runtime -sh`
110     export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
111     fi
112     scramv1 b -r -t </dev/null
113    
114     %install
115     cd %i
116     %{?buildarch:%buildarch}
117     # need writeable directory for profile stuff
118     mkdir etc
119     yes | scramv1 install # FIXME: do by hand?
120 eulisse 1.15 #
121 eulisse 1.18 #