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.9 by muzaffar, Wed Feb 6 16:18:45 2008 UTC vs.
Revision 1.11 by muzaffar, Mon Feb 25 13:11:22 2008 UTC

# Line 1 | Line 1
1 < ### RPM cms cms-common 1.0
1 > ### RPM cms cms-common 1.0
2   Source: cmsos
3   %prep
4   %build
# Line 148 | Line 148 | EOF_CMSSET_DEFAULT_CSH
148   cat << \EOF_COMMON_SCRAM > %instroot/common/scram
149   #!/bin/sh
150   CMSARCH=`cmsarch`
151 < srbase=
152 < if [ "X$SCRAM_VERSION" = "X" ] ; then
153 <  sver=`cat  %{instroot}/$CMSARCH/etc/default-scramv1-version`
154 <  dir=`/bin/pwd`
155 <  while [ ! -d ${dir}/.SCRAM -a "$dir" != "/" ] ; do
156 <    dir=`dirname $dir`
157 <  done
158 <  if [ -f ${dir}/config/scram_version ] ; then
159 <    ver=`cat ${dir}/config/scram_version`
160 <    if [ "X$ver" = "XV1_0_3-p1" ] ; then
161 <      if [ "X$CMSARCH" = "Xslc4_ia32_gcc345" ] ; then
162 <        ver=V1_0_3-p2
163 <      fi
164 <    fi
165 <    case $ver in
166 <      V0_* ) srbase=lcg/SCRAM/${ver};;
167 <      * ) srbase=lcg/SCRAMV1/${ver};;
168 <    esac
169 <    if [ -f %{instroot}/$CMSARCH/${srbase}/etc/profile.d/init.sh ] ; then
170 <      sver=$ver
171 <    fi
172 <  fi
173 < else
174 <   if [ "X$SCRAM_VERSION" = "XV1_0_3-p1" ] ; then
175 <     if [ "X$CMSARCH" = "Xslc4_ia32_gcc345" ] ; then
176 <       SCRAM_VERSION=V1_0_3-p2
177 <     fi
178 <   fi
179 <   sver=$SCRAM_VERSION
151 > srbase=%{instroot}/$CMSARCH
152 > sver=$SCRAM_VERSION
153 > dir=`/bin/pwd`
154 > while [ ! -d ${dir}/.SCRAM -a "$dir" != "/" ] ; do
155 >  dir=`dirname $dir`
156 > done
157 > if [ -f ${dir}/config/scram_version ] ; then
158 >  sver=`cat ${dir}/config/scram_version`
159 > elif [ "X$sver" == "X" ] ; then
160 >  sver=`cat  ${srbase}/etc/default-scramv1-version`
161 > fi
162 > if [ "X$sver" = "XV1_0_3-p1" -a "X$CMSARCH" = "Xslc4_ia32_gcc345" ] ; then
163 >  sver=V1_0_3-p2
164 > fi
165 > scram_rel_series=`echo $sver | grep '^V[0-9]\+_[0-9]\+_[0-9]\+' | sed 's|^\(V[0-9]\+_[0-9]\+\)_.*|\1|'`
166 > if [ "X${scram_rel_series}" != "X" -a -f ${srbase}/etc/default-scram/${scram_rel_series} ] ; then
167 >  sver=`cat ${srbase}/etc/default-scram/${scram_rel_series}`
168   fi
169   scmd=scram
170 + srbase=%{instroot}/$CMSARCH/lcg/SCRAMV1
171   case $sver in
172 <  V0_* ) srbase=lcg/SCRAM/${sver}; scmd=scramv0;;
173 <  V1_0* ) srbase=lcg/SCRAMV1/${sver}; scmd=scramv1;;
174 <  * ) srbase=lcg/SCRAMV1/${sver};;
172 >  V0_*  ) srbase=%{instroot}/$CMSARCH/lcg/SCRAM; scmd=scramv0;;
173 >  V1_0* ) scmd=scramv1;;
174 >  *     ) ;;
175   esac
176 < if [ ! -f %{instroot}/$CMSARCH/${srbase}/etc/profile.d/init.sh ] ; then
176 > if [ ! -f ${srbase}/${sver}/etc/profile.d/init.sh ] ; then
177    echo "Unable to find SCRAM version $sver for $CMSARCH architecture."
178    exit 1
179   fi
180 < source %{instroot}/$CMSARCH/${srbase}/etc/profile.d/init.sh
180 > source ${srbase}/${sver}/etc/profile.d/init.sh
181   # In the case we are on linux ia32 we prepend the linux32 command to the
182   # actual scram command so that, no matter where the ia32 architecture is
183   # running (i686 or x84_64) scram detects it as ia32.
184   CMSPLAT=`echo $CMSARCH | cut -d_ -f 2`
185   USE_LINUX32=
186 < if [ `uname` == Linux ]; then
187 <  if [ "$CMSPLAT" = "ia32" ]
199 <  then
200 <      USE_LINUX32=linux32
201 <  fi
186 > if [ `uname` == Linux -a "$CMSPLAT" = "ia32" ] ; then
187 >  USE_LINUX32=linux32
188   fi
189 < $USE_LINUX32 %{instroot}/$CMSARCH/${srbase}/bin/${scmd} $@
189 > $USE_LINUX32 ${srbase}/${sver}/bin/${scmd} $@
190   EOF_COMMON_SCRAM
191  
192   chmod +x %{instroot}/common/scram

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines