ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/cms-env.spec
(Generate patch)

Comparing COMP/CMSDIST/cms-env.spec (file contents):
Revision 1.4 by eulisse, Fri Jun 16 12:15:00 2006 UTC vs.
Revision 1.7 by eulisse, Wed Jun 21 14:45:02 2006 UTC

# Line 1 | Line 1
1   ### RPM cms cms-env 1.0
2   Source: cmsos
3 Requires: SCRAM SCRAMV1
3   %prep
4   %build
5   echo $SCRAM_ROOT
# Line 10 | Line 9 | 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
# Line 27 | Line 28 | esac
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
40 +
41   if (${?PATH}) then
42      setenv PATH %instroot/bin:$PATH
43   else
# Line 69 | Line 75 | switch ( ${SCRAM_ARCH} )
75   endsw
76  
77   setenv SCRAM_ARCH ${SCRAM_ARCH}_${compilerv}
78 + if ( ${?VO_CMS_SW_DIR} ) then
79 +    setenv here $VO_CMS_SW_DIR
80 + else
81 +    setenv here .
82 + endif
83 +
84 + if ( ! -e $here/cmsset_default.csh ) then
85 +    echo "Please cd into the directory where cmsset_default.csh is."
86 + endif
87 +
88 + foreach pkg ( `ls ${here}/${SCRAM_ARCH}/etc/profile.d/ | grep -e'^S.*[.]csh'` )
89 +        source ${here}/${SCRAM_ARCH}/etc/profile.d/$pkg
90 + end
91  
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
92   EOF_CMSSET_DEFAULT_CSH
93  
94   %post
# Line 84 | Line 101 | perl -p -i -e "s|%{instroot}|$RPM_INSTAL
101   %instroot/cmsset_default.sh
102   %instroot/cmsset_default.csh
103   %instroot/bin/cmsos
104 + %instroot/%cmsplatf/etc/profile.d
105 + %exclude %instroot/%cmsplatf/etc/profile.d/*

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines