ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/lcgaa.spec
Revision: 1.3
Committed: Tue Mar 21 17:38:04 2006 UTC (19 years, 1 month ago) by eulisse
Branch: MAIN
CVS Tags: test2
Changes since 1.2: +1 -1 lines
Log Message:
Fixes typo.

File Contents

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