ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/lcgaa.spec
Revision: 1.10
Committed: Mon May 22 12:08:56 2006 UTC (18 years, 11 months ago) by eulisse
Branch: MAIN
CVS Tags: CRABSERVER_TEST_BUILD_V4, CRABSERVER_TEST_BUILD_V3, CRABSERVER_TEST_BUILD_V2, CRABSERVER_TEST_BUILD_V1, forCRABSERVER104test, forCRABSERVER103, PRODAGENT_0_10_12_V10, PRODAGENT_0_10_12_V9, PRODAGENT_0_10_12_V8, PRODAGENT_0_10_12_V7, PRODAGENT_0_10_12_V6, PRODAGENT_0_10_12_V5, PRODAGENT_0_10_12_V4, forCS102pre4, PRODAGENT_0_10_12_V3, PRODAGENT_0_10_12_V2, PRODAGENT_0_10_12, PRODAGENT_0_10_3, PRODAGENT_0_10_3_20080521, PRODAGENT_0_8_3_SL4, forPA070pre3-slc3, forPA070pre3-slc4, forPA070pre3-slc, forPA061, forPA060pre7-slc4, forPA060pre3, forDBS106, forPA050pre3, WEBTOOLS_CONFIG_1_pre2, WEBTOOLS_CONFIG_1_pre1, forPA030, forPA020, PR_0_5_4, PR_0_5_0, PR_0_4_21, PRODREQUEST_0_4_0, PR0_3_13, PR0_3_12, PR0-3-11, forPR034, forPR033, forPIL116, forPR032, forPR030, forPR020, forPA011, forPR010, forPA010, af20060928, ProdAgent_pa17, V00-00-11, V00-00-10, V00-00-09, V00-00-08, V00-00-07
Changes since 1.9: +4 -2 lines
Log Message:
Uses new configuration.

File Contents

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