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

Comparing COMP/CMSDIST/cms-common.spec (file contents):
Revision 1.13 by dlange, Mon Jul 28 04:11:50 2008 UTC vs.
Revision 1.20 by elmer, Tue Dec 1 11:09:54 2009 UTC

# Line 1 | Line 1
1   ### RPM cms cms-common 1.0
2 < ## REVISION 1050
2 > ## REVISION 1054
3   ## NOCOMPILER
4 + %define closingbrace )
5 + %define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo false;; esac)
6   Source: cmsos
7   %prep
8   %build
9   echo $SCRAM_ROOT
10   %install
11  
12 < mkdir -p %instroot/common %instroot/bin %{instroot}/%{cmsplatf}/etc/profile.d
12 > mkdir -p %instroot/common %instroot/bin %instroot/%{cmsplatf}/etc/profile.d
13  
14   # Do not create these common files if already exist
15   # This is to avoid different arch creating these files
16   if [ ! -f %instroot/common/.cms-common ]; then
17   install -m 755 %_sourcedir/cmsos %instroot/common/cmsos
16
17 %if "%{?online_release:set}" == "set"
18 echo echo %{cmsos} >  %instroot/common/cmsos
19 chmod 755 %instroot/common/cmsos
20 %endif
21
22
23 %if "%{?online_release:set}" != "set"
18   ### Detects the SCRAM_ARCH to be used.
19 + %if "%online" != "true"
20   cat << \EOF_CMSARCH_SH >%instroot/common/cmsarch
21   #!/bin/sh
22   osarch=`%instroot/common/cmsos`
23 < compilerv=gcc323
23 > compilerv=gcc434
24   # We need to assume 1 compiler per platform.
25   # There is no other way around this.
26   if [ ! "$SCRAM_ARCH" ]
27   then
28      case $osarch in
34        slc3_ia32) compilerv=gcc323;;
35        slc3_amd64) compilerv=gcc344;;
36        slc4_ia32) compilerv=gcc345;;
37        slc4_amd64) compilerv=gcc345; osarch=slc4_ia32;;
29          osx104_ia32) compilerv=gcc401;;
30          osx104_ppc32) compilerv=gcc400;;
31 +        osx105_*) compilerv=gcc401;;
32 +        slc5_*) compilerv=gcc434; osarch=slc5_ia32;;
33 +        slc4_*) compilerv=gcc345; osarch=slc4_ia32;;
34 +        *) compilerv=gcc434; osarch=slc5_ia32;;
35      esac
36      echo ${osarch}_${compilerv}
37   else
# Line 45 | Line 40 | fi
40  
41   EOF_CMSARCH_SH
42   %else
43 < cat << \EOF_CMSARCH_ONL >%instroot/common/cmsarch
43 > cat << \EOF_CMSARCH_SH >%instroot/common/cmsarch
44   #!/bin/sh
45 < echo %{cmsplatf}
46 < EOF_CMSARCH_ONL
47 < %endif
45 > if [ ! "$SCRAM_ARCH" ] ; then
46 >    echo %cmsplatf
47 > else
48 >    echo $SCRAM_ARCH
49 > fi
50  
51 + EOF_CMSARCH_SH
52 + %endif
53   chmod 755 %instroot/common/cmsarch
54  
55   ### BASH code
# Line 103 | Line 102 | fi
102  
103   if [ ! $CVSROOT ]
104   then
105 <    CVSROOT=:kserver:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
105 >    CVSROOT=:gserver:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
106      export CVSROOT
107   fi
108  
# Line 156 | Line 155 | if( -e $CMS_PATH/SITECONF/local/JobConfi
155   endif
156  
157   if ( ! ${?CVSROOT}) then
158 <  setenv CVSROOT :kserver:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
158 >  setenv CVSROOT :gserver:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
159   endif
160  
161   unset here
# Line 168 | Line 167 | CMSARCH=`cmsarch`
167   srbase=%{instroot}/$CMSARCH
168   sver=$SCRAM_VERSION
169   dir=`/bin/pwd`
170 < while [ ! -d ${dir}/.SCRAM -a "$dir" != "/" ] ; do
170 > while [ ! -d ${dir}/.SCRAM ] && [ "$dir" != "/" ] ; do
171    dir=`dirname $dir`
172   done
173   if [ -f ${dir}/config/scram_version ] ; then
174    sver=`cat ${dir}/config/scram_version`
175 < elif [ "X$sver" == "X" ] ; then
175 > elif [ "X$sver" = "X" ] ; then
176    sver=`cat  ${srbase}/etc/default-scramv1-version`
177   fi
178 < if [ "X$sver" = "XV1_0_3-p1" -a "X$CMSARCH" = "Xslc4_ia32_gcc345" ] ; then
178 > if [ "X$sver" = "XV1_0_3-p1" ] && [ "X$CMSARCH" = "Xslc4_ia32_gcc345" ] ; then
179    sver=V1_0_3-p2
180   fi
181   scram_rel_series=`echo $sver | grep '^V[0-9]\+_[0-9]\+_[0-9]\+' | sed 's|^\(V[0-9]\+_[0-9]\+\)_.*|\1|'`
182 < if [ "X${scram_rel_series}" != "X" -a -f ${srbase}/etc/default-scram/${scram_rel_series} ] ; then
182 > if [ "X${scram_rel_series}" != "X" ] && [ -f ${srbase}/etc/default-scram/${scram_rel_series} ] ; then
183    sver=`cat ${srbase}/etc/default-scram/${scram_rel_series}`
184   fi
185   scmd=scram
# Line 194 | Line 193 | if [ ! -f ${srbase}/${sver}/etc/profile.
193    echo "Unable to find SCRAM version $sver for $CMSARCH architecture."
194    exit 1
195   fi
196 < source ${srbase}/${sver}/etc/profile.d/init.sh
196 > . ${srbase}/${sver}/etc/profile.d/init.sh
197   # In the case we are on linux ia32 we prepend the linux32 command to the
198   # actual scram command so that, no matter where the ia32 architecture is
199   # running (i686 or x84_64) scram detects it as ia32.
200   CMSPLAT=`echo $CMSARCH | cut -d_ -f 2`
201   USE_LINUX32=
202 < if [ `uname` == Linux -a "$CMSPLAT" = "ia32" ] ; then
202 > if [ `uname` = "Linux" ] && [ "$CMSPLAT" = "ia32" ] ; then
203    USE_LINUX32=linux32
204   fi
205   $USE_LINUX32 ${srbase}/${sver}/bin/${scmd} $@

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines