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 |
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};; |
180 |
|
* ) srbase=lcg/SCRAMV1/${sver};; |
181 |
|
esac |
182 |
|
source %{instroot}/$CMSARCH/${srbase}/etc/profile.d/init.sh |
183 |
< |
# In the case we are on ia32 we prepend the linux32 command to the actual |
184 |
< |
# scram command so that, no matter where the ia32 architecture is running |
185 |
< |
# (i686 or x84_64) scram detects it as ia32. |
183 |
> |
# In the case we are on linux ia32 we prepend the linux32 command to the |
184 |
> |
# actual scram command so that, no matter where the ia32 architecture is |
185 |
> |
# running (i686 or x84_64) scram detects it as ia32. |
186 |
|
CMSPLAT=`echo $CMSARCH | cut -d_ -f 2` |
187 |
< |
if [ "$CMSPLAT" = "ia32" ] |
188 |
< |
then |
189 |
< |
USE_LINUX32=linux32 |
190 |
< |
else |
191 |
< |
USE_LINUX32= |
187 |
> |
USE_LINUX32= |
188 |
> |
if [ `uname` == Linux ]; then |
189 |
> |
if [ "$CMSPLAT" = "ia32" ] |
190 |
> |
then |
191 |
> |
USE_LINUX32=linux32 |
192 |
> |
fi |
193 |
|
fi |
194 |
|
$USE_LINUX32 %{instroot}/$CMSARCH/${srbase}/bin/${scmd} $@ |
195 |
|
EOF_COMMON_SCRAM |
197 |
|
chmod +x %{instroot}/common/scram |
198 |
|
ln -sf scram %{instroot}/common/scramv1 |
199 |
|
ln -sf scram %{instroot}/common/scramv0 |
200 |
+ |
ln -sf ../common/cmsarch %instroot/bin/cmsarch |
201 |
+ |
ln -sf ../common/cmsarch %instroot/bin/cmsos |
202 |
+ |
ln -sf ../common/scramv1 %instroot/bin/scramv1 |
203 |
|
touch %instroot/common/.cms-common |
204 |
|
fi |
205 |
|
|
206 |
|
touch %instroot/%cmsplatf/etc/profile.d/dummy |
198 |
– |
ln -s ../common/cmsarch %instroot/bin/cmsarch |
199 |
– |
ln -s ../common/cmsarch %instroot/bin/cmsos |
207 |
|
|
208 |
|
%post |
209 |
|
echo $RPM_INSTALL_PREFIX |
222 |
|
%instroot/common/scram |
223 |
|
%instroot/common/scramv1 |
224 |
|
%instroot/common/scramv0 |
225 |
+ |
%instroot/common/.cms-common |
226 |
+ |
%instroot/bin/cmsos |
227 |
+ |
%instroot/bin/cmsarch |
228 |
+ |
%instroot/bin/scramv1 |
229 |
|
%instroot/%cmsplatf/etc/profile.d |
230 |
|
%exclude %instroot/%cmsplatf/etc/profile.d/* |