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