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.22 by muzaffar, Tue Oct 5 15:04:22 2010 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 +        osx106_*) compilerv=gcc421;;
33 +        slc5_*) compilerv=gcc434; osarch=slc5_ia32;;
34 +        slc4_*) compilerv=gcc345; osarch=slc4_ia32;;
35 +        *) compilerv=gcc434; osarch=slc5_ia32;;
36      esac
37      echo ${osarch}_${compilerv}
38   else
# Line 45 | Line 41 | fi
41  
42   EOF_CMSARCH_SH
43   %else
44 < cat << \EOF_CMSARCH_ONL >%instroot/common/cmsarch
44 > cat << \EOF_CMSARCH_SH >%instroot/common/cmsarch
45   #!/bin/sh
46 < echo %{cmsplatf}
47 < EOF_CMSARCH_ONL
48 < %endif
46 > if [ ! "$SCRAM_ARCH" ] ; then
47 >    echo %cmsplatf
48 > else
49 >    echo $SCRAM_ARCH
50 > fi
51  
52 + EOF_CMSARCH_SH
53 + %endif
54   chmod 755 %instroot/common/cmsarch
55  
56   ### BASH code
# Line 103 | Line 103 | fi
103  
104   if [ ! $CVSROOT ]
105   then
106 <    CVSROOT=:kserver:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
106 >    CVSROOT=:gserver:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
107      export CVSROOT
108   fi
109  
# Line 156 | Line 156 | if( -e $CMS_PATH/SITECONF/local/JobConfi
156   endif
157  
158   if ( ! ${?CVSROOT}) then
159 <  setenv CVSROOT :kserver:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
159 >  setenv CVSROOT :gserver:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
160   endif
161  
162   unset here
# Line 168 | Line 168 | CMSARCH=`cmsarch`
168   srbase=%{instroot}/$CMSARCH
169   sver=$SCRAM_VERSION
170   dir=`/bin/pwd`
171 < while [ ! -d ${dir}/.SCRAM -a "$dir" != "/" ] ; do
171 > while [ ! -d ${dir}/.SCRAM ] && [ "$dir" != "/" ] ; do
172    dir=`dirname $dir`
173   done
174   if [ -f ${dir}/config/scram_version ] ; then
175    sver=`cat ${dir}/config/scram_version`
176 < elif [ "X$sver" == "X" ] ; then
176 > elif [ "X$sver" = "X" ] ; then
177    sver=`cat  ${srbase}/etc/default-scramv1-version`
178   fi
179 < if [ "X$sver" = "XV1_0_3-p1" -a "X$CMSARCH" = "Xslc4_ia32_gcc345" ] ; then
179 > if [ "X$sver" = "XV1_0_3-p1" ] && [ "X$CMSARCH" = "Xslc4_ia32_gcc345" ] ; then
180    sver=V1_0_3-p2
181   fi
182   scram_rel_series=`echo $sver | grep '^V[0-9]\+_[0-9]\+_[0-9]\+' | sed 's|^\(V[0-9]\+_[0-9]\+\)_.*|\1|'`
183 < if [ "X${scram_rel_series}" != "X" -a -f ${srbase}/etc/default-scram/${scram_rel_series} ] ; then
183 > if [ "X${scram_rel_series}" != "X" ] && [ -f ${srbase}/etc/default-scram/${scram_rel_series} ] ; then
184    sver=`cat ${srbase}/etc/default-scram/${scram_rel_series}`
185   fi
186   scmd=scram
# Line 194 | Line 194 | if [ ! -f ${srbase}/${sver}/etc/profile.
194    echo "Unable to find SCRAM version $sver for $CMSARCH architecture."
195    exit 1
196   fi
197 < source ${srbase}/${sver}/etc/profile.d/init.sh
197 > . ${srbase}/${sver}/etc/profile.d/init.sh
198   # In the case we are on linux ia32 we prepend the linux32 command to the
199   # actual scram command so that, no matter where the ia32 architecture is
200   # running (i686 or x84_64) scram detects it as ia32.
201   CMSPLAT=`echo $CMSARCH | cut -d_ -f 2`
202   USE_LINUX32=
203 < if [ `uname` == Linux -a "$CMSPLAT" = "ia32" ] ; then
203 > if [ `uname` = "Linux" ] && [ "$CMSPLAT" = "ia32" ] ; then
204    USE_LINUX32=linux32
205   fi
206   $USE_LINUX32 ${srbase}/${sver}/bin/${scmd} $@
# Line 218 | Line 218 | fi
218   touch %instroot/%cmsplatf/etc/profile.d/dummy
219  
220   %post
221 < echo $RPM_INSTALL_PREFIX
222 < perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/cmsset_default.sh
223 < perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/cmsset_default.csh
224 < perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/common/cmsos
225 < perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/common/cmsarch
226 < perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/common/scram
221 > echo $CMS_INSTALL_PREFIX
222 > %{relocateCmsFiles} $RPM_INSTALL_PREFIX/cmsset_default.sh
223 > %{relocateCmsFiles} $RPM_INSTALL_PREFIX/cmsset_default.csh
224 > %{relocateCmsFiles} $RPM_INSTALL_PREFIX/common/cmsos
225 > %{relocateCmsFiles} $RPM_INSTALL_PREFIX/common/cmsarch
226 > %{relocateCmsFiles} $RPM_INSTALL_PREFIX/common/scram
227  
228   %files
229   %i

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines