1 |
< |
### RPM lcg SCRAMV1 V1_0_3-p1 |
1 |
> |
### RPM lcg SCRAMV1 V1_0_3-p2 |
2 |
|
## INITENV +PATH PATH %instroot/bin |
3 |
|
## INITENV +PATH PERL5LIB %{i} |
4 |
< |
Requires: expat p5-template-toolkit p5-uri p5-xml-parser p5-libwww-perl cms-env |
4 |
> |
Requires: p5-template-toolkit p5-uri p5-xml-parser p5-libwww-perl cms-env |
5 |
|
Provides: perl(SCRAM::Helper) |
6 |
|
Provides: perl(Utilities::AddDir) |
7 |
|
Provides: perl(Utilities::Architecture) |
92 |
|
# EOF |
93 |
|
chmod 755 %i/bin/scramv1 |
94 |
|
|
95 |
< |
mkdir %i/etc |
95 |
> |
mkdir -p %i/etc |
96 |
|
echo $PERL5LIB > %i/etc/perl5lib.env |
97 |
|
|
98 |
|
mkdir -p %{instroot}/%{cmsplatf}/etc/profile.d |
99 |
|
mkdir -p %{i}/etc/profile.d |
100 |
|
echo "#!/bin/sh" > %i/etc/profile.d/dependencies-setup.sh |
101 |
– |
echo "source $EXPAT_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh |
101 |
|
echo "source $P5_TEMPLATE_TOOLKIT_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh |
102 |
|
echo "source $P5_URI_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh |
103 |
|
echo "source $P5_XML_PARSER_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh |
104 |
|
echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh |
105 |
|
|
106 |
|
echo "#!/bin/csh" > %i/etc/profile.d/dependencies-setup.csh |
108 |
– |
echo "source $EXPAT_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh |
107 |
|
echo "source $P5_TEMPLATE_TOOLKIT_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh |
108 |
|
echo "source $P5_URI_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh |
109 |
|
echo "source $P5_XML_PARSER_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh |
133 |
|
# uninstalling the old revision of scram. |
134 |
|
cat << \EOF_BIN_SCRAMV1 > $RPM_INSTALL_PREFIX/bin/scramv1 |
135 |
|
#!/bin/sh |
136 |
< |
if [ "`cmsos`" == "slc4_amd64" ]; then |
139 |
< |
# Check that scramv1 for native platform is installed: |
140 |
< |
[ -e $RPM_INSTALL_PREFIX/slc4_amd64_gcc345/lcg/%{n}/%{v}/bin ] || \ |
141 |
< |
echo -e "===================================================================== |
142 |
< |
WARNING: SCRAMV1 installation for slc4_amd64_gcc345 is missing! |
143 |
< |
To build CMSSW on `uname -m` you need GCC and SCRAMV1 |
144 |
< |
installed for this platform. |
145 |
< |
=====================================================================" |
146 |
< |
CMSARCH=slc4_amd64_gcc345 |
147 |
< |
else |
148 |
< |
CMSARCH=`cmsarch` |
149 |
< |
fi |
136 |
> |
CMSARCH=`cmsarch` |
137 |
|
SCRAM_VERSION=`cat %{instroot}/$CMSARCH/etc/default-scramv1-version` |
138 |
|
dir=`/bin/pwd` |
139 |
|
while [ ! -d ${dir}/.SCRAM -a "$dir" != "/" ] ; do |
146 |
|
fi |
147 |
|
fi |
148 |
|
source %{instroot}/$CMSARCH/lcg/SCRAMV1/$SCRAM_VERSION/etc/profile.d/init.sh |
149 |
< |
%{instroot}/$CMSARCH/lcg/SCRAMV1/$SCRAM_VERSION/bin/scramv1 $@ |
149 |
> |
# In the case we are on ia32 we prepend the linux32 command to the actual |
150 |
> |
# scram command so that, no matter where the ia32 architecture is running |
151 |
> |
# (i686 or x84_64) scram detects it as ia32. |
152 |
> |
CMSPLAT=`echo $CMSARCH | cut -d_ -f 2` |
153 |
> |
if [ "$CMSPLAT" == "ia32" ] |
154 |
> |
then |
155 |
> |
USE_LINUX32=linux32 |
156 |
> |
else |
157 |
> |
USE_LINUX32= |
158 |
> |
fi |
159 |
> |
|
160 |
> |
$USE_LINUX32 %{instroot}/$CMSARCH/lcg/SCRAMV1/$SCRAM_VERSION/bin/scramv1 $@ |
161 |
|
EOF_BIN_SCRAMV1 |
162 |
+ |
|
163 |
|
chmod +x $RPM_INSTALL_PREFIX/bin/scramv1 |
164 |
|
perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/bin/scramv1 |
165 |
|
|