7 |
|
|
8 |
|
mkdir -p %instroot/common %instroot/bin %{instroot}/%{cmsplatf}/etc/profile.d |
9 |
|
|
10 |
< |
# Do not create these common files if already exist |
10 |
> |
# Do not create these common files if already exist |
11 |
|
# This is to avoid different arch creating these files |
12 |
|
if [ ! -f %instroot/common/.cms-common ]; then |
13 |
|
install -m 755 %_sourcedir/cmsos %instroot/common/cmsos |
77 |
|
fi |
78 |
|
|
79 |
|
# aliases |
80 |
< |
alias cmsenv='eval `scram runtime -sh`' |
81 |
< |
alias cmsrel='scram project CMSSW' |
80 |
> |
alias cmsenv='eval `scramv1 runtime -sh`' |
81 |
> |
alias cmsrel='scramv1 project CMSSW' |
82 |
|
|
83 |
|
if [ -f $CMS_PATH/SITECONF/local/JobConfig/cmsset_local.sh ]; then |
84 |
|
. $CMS_PATH/SITECONF/local/JobConfig/cmsset_local.sh |
131 |
|
endif |
132 |
|
|
133 |
|
# aliases |
134 |
< |
alias cmsenv 'eval `scram runtime -csh`' |
135 |
< |
alias cmsrel 'scram project CMSSW' |
134 |
> |
alias cmsenv 'eval `scramv1 runtime -csh`' |
135 |
> |
alias cmsrel 'scramv1 project CMSSW' |
136 |
|
|
137 |
|
if( -e $CMS_PATH/SITECONF/local/JobConfig/cmsset_local.csh ) then |
138 |
|
source $CMS_PATH/SITECONF/local/JobConfig/cmsset_local.csh |
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};; |
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 |
180 |
|
fi |
181 |
|
scmd=scram |
184 |
|
V1_0* ) srbase=lcg/SCRAMV1/${sver}; scmd=scramv1;; |
185 |
|
* ) srbase=lcg/SCRAMV1/${sver};; |
186 |
|
esac |
187 |
+ |
if [ ! -f %{instroot}/$CMSARCH/${srbase}/etc/profile.d/init.sh ] ; then |
188 |
+ |
echo "Unable to find SCRAM version $sver for $CMSARCH architecture." |
189 |
+ |
exit 1 |
190 |
+ |
fi |
191 |
|
source %{instroot}/$CMSARCH/${srbase}/etc/profile.d/init.sh |
192 |
|
# In the case we are on linux ia32 we prepend the linux32 command to the |
193 |
|
# actual scram command so that, no matter where the ia32 architecture is |
194 |
|
# running (i686 or x84_64) scram detects it as ia32. |
195 |
|
CMSPLAT=`echo $CMSARCH | cut -d_ -f 2` |
196 |
|
USE_LINUX32= |
197 |
< |
if [ `uname` = Linux]; then |
197 |
> |
if [ `uname` == Linux ]; then |
198 |
|
if [ "$CMSPLAT" = "ia32" ] |
199 |
|
then |
200 |
|
USE_LINUX32=linux32 |
206 |
|
chmod +x %{instroot}/common/scram |
207 |
|
ln -sf scram %{instroot}/common/scramv1 |
208 |
|
ln -sf scram %{instroot}/common/scramv0 |
209 |
+ |
ln -sf ../common/cmsarch %instroot/bin/cmsarch |
210 |
+ |
ln -sf ../common/cmsarch %instroot/bin/cmsos |
211 |
+ |
ln -sf ../common/scramv1 %instroot/bin/scramv1 |
212 |
|
touch %instroot/common/.cms-common |
213 |
|
fi |
214 |
|
|
215 |
|
touch %instroot/%cmsplatf/etc/profile.d/dummy |
199 |
– |
ln -s ../common/cmsarch %instroot/bin/cmsarch |
200 |
– |
ln -s ../common/cmsarch %instroot/bin/cmsos |
216 |
|
|
217 |
|
%post |
218 |
|
echo $RPM_INSTALL_PREFIX |
231 |
|
%instroot/common/scram |
232 |
|
%instroot/common/scramv1 |
233 |
|
%instroot/common/scramv0 |
234 |
+ |
%instroot/common/.cms-common |
235 |
+ |
%instroot/bin/cmsos |
236 |
+ |
%instroot/bin/cmsarch |
237 |
+ |
%instroot/bin/scramv1 |
238 |
|
%instroot/%cmsplatf/etc/profile.d |
239 |
|
%exclude %instroot/%cmsplatf/etc/profile.d/* |