ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/lcgaa.spec
Revision: 1.28
Committed: Wed Apr 11 19:04:43 2007 UTC (18 years ago) by elmer
Branch: MAIN
CVS Tags: HEAD
Changes since 1.27: +0 -0 lines
State: FILE REMOVED
Error occurred while calculating annotation data.
Log Message:
Remove obsolete file (per Natalia)

File Contents

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