1 |
|
### RPM cms cms-env 1.0 |
2 |
|
Source: cmsos |
3 |
– |
Requires: SCRAM SCRAMV1 |
3 |
|
%prep |
4 |
|
%build |
5 |
|
echo $SCRAM_ROOT |
9 |
|
|
10 |
|
mkdir -p %instroot/bin |
11 |
|
install -m 755 %_sourcedir/cmsos %instroot/bin/cmsos |
12 |
+ |
mkdir -p %{instroot}/%{cmsplatf}/etc/profile.d |
13 |
+ |
|
14 |
|
cat << \EOF_CMSSET_DEFAULT_SH > %instroot/cmsset_default.sh |
15 |
|
export PATH=%instroot/bin:$PATH |
16 |
|
export LD_LIBRARY_PATH=%instroot/lib:$LD_LIBRARY_PATH |
28 |
|
SCRAM_ARCH=${SCRAM_ARCH}_$compilerv |
29 |
|
export SCRAM_ARCH |
30 |
|
|
31 |
< |
source %instroot/$SCRAM_ARCH/lcg/SCRAM/V0_20_0/etc/profile.d/init.sh |
32 |
< |
source %instroot/$SCRAM_ARCH/lcg/SCRAMV1/V1_0_2/etc/profile.d/init.sh |
31 |
> |
here=`dirname $0` |
32 |
> |
for pkg in `ls $here/${SCRAM_ARCH}/etc/profile.d/ | grep -e'^S.*[.]sh'` |
33 |
> |
do |
34 |
> |
source $here/${SCRAM_ARCH}/etc/profile.d/$pkg |
35 |
> |
done |
36 |
> |
|
37 |
|
EOF_CMSSET_DEFAULT_SH |
38 |
|
|
39 |
|
cat << \EOF_CMSSET_DEFAULT_CSH > %instroot/cmsset_default.csh |
74 |
|
endsw |
75 |
|
|
76 |
|
setenv SCRAM_ARCH ${SCRAM_ARCH}_${compilerv} |
77 |
+ |
setenv here `dirname $0` |
78 |
+ |
|
79 |
+ |
foreach pkg ( `ls ${here}/${SCRAM_ARCH}/etc/profile.d/ | grep -e'^S.*[.]csh'` ) |
80 |
+ |
source ${here}/${SCRAM_ARCH}/etc/profile.d/$pkg |
81 |
+ |
end |
82 |
|
|
73 |
– |
source %instroot/${SCRAM_ARCH}/lcg/SCRAM/V0_20_0/etc/profile.d/init.csh |
74 |
– |
source %instroot/${SCRAM_ARCH}/lcg/SCRAMV1/V1_0_2/etc/profile.d/init.csh |
83 |
|
EOF_CMSSET_DEFAULT_CSH |
84 |
|
|
85 |
|
%post |
92 |
|
%instroot/cmsset_default.sh |
93 |
|
%instroot/cmsset_default.csh |
94 |
|
%instroot/bin/cmsos |
95 |
+ |
%instroot/%cmsplatf/etc/profile.d |
96 |
+ |
%exclude %instroot/%cmsplatf/etc/profile.d/* |