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.3 by eulisse, Thu Jun 15 23:32:15 2006 UTC vs.
Revision 1.5 by eulisse, Wed Jun 21 09:05:04 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
17   export DYLD_FALLBACK_LIBRARY_PATH=%instroot/lib:$DYLD_FALLBACK_LIBRARY
18 < SCRAM_ARCH=$(cmsos); export SCRAM_ARCH
18 > SCRAM_ARCH=$(cmsos)
19  
20   # We need to assume 1 compiler per platform.
21   # There is no other way around this.
# Line 25 | Line 26 | case $SCRAM_ARCH in
26      osx104_pcc32) compilerv=gcc400;;
27   esac
28   SCRAM_ARCH=${SCRAM_ARCH}_$compilerv
29 + export SCRAM_ARCH
30 +
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  
29 source %instroot/$SCRAM_ARCH/lcg/SCRAM/V0_20_0/etc/profile.d/init.sh
30 source %instroot/$SCRAM_ARCH/lcg/SCRAMV1/V1_0_2/etc/profile.d/init.sh
37   EOF_CMSSET_DEFAULT_SH
38  
39   cat << \EOF_CMSSET_DEFAULT_CSH > %instroot/cmsset_default.csh
40 < setenv PATH %instroot/bin:$PATH
41 < setenv LD_LIBRARY_PATH %instroot/lib:$LD_LIBRARY_PATH
42 < setenv DYLD_FALLBACK_LIBRARY_PATH %instroot/lib:$DYLD_FALLBACK_LIBRARY
43 < setenv SCRAM_ARCH `cmsos`
44 < sentenv compilerv gcc323
45 < switch ( $SCRAM_ARCH )
40 > if (${?PATH}) then
41 >    setenv PATH %instroot/bin:$PATH
42 > else
43 >    setenv PATH %instroot/bin
44 > endif
45 >
46 > if (${?LD_LIBRARY_PATH}) then
47 >    setenv LD_LIBRARY_PATH %instroot/lib:$LD_LIBRARY_PATH
48 > else
49 >    setenv LD_LIBRARY_PATH %instroot/lib
50 > endif
51 >
52 > if (${?DYLD_FALLBACK_LIBRARY_PATH}) then
53 >    setenv DYLD_FALLBACK_LIBRARY_PATH %instroot/lib:$DYLD_FALLBACK_LIBRARY_PATH
54 > else
55 >    setenv DYLD_FALLBACK_LIBRARY_PATH %instroot/lib
56 > endif
57 >
58 > setenv CMSOSCOMMAND `which cmsos`
59 > setenv SCRAM_ARCH `sh -c $CMSOSCOMMAND`
60 > setenv compilerv gcc323
61 > switch ( ${SCRAM_ARCH} )
62      case slc3_ia32:
63          setenv compilerv gcc323
64      breaksw
# Line 51 | Line 73 | switch ( $SCRAM_ARCH )
73      breaksw
74   endsw
75  
76 < . %instroot/$SCRAM_ARCH/lcg/SCRAM/V0_20_0/etc/profile.d/init.csh
77 < . %instroot/$SCRAM_ARCH/lcg/SCRAMV1/V1_0_2/etc/profile.d/init.csh
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 >
83   EOF_CMSSET_DEFAULT_CSH
84  
85   %post
# Line 65 | Line 92 | perl -p -i -e "s|%{instroot}|$RPM_INSTAL
92   %instroot/cmsset_default.sh
93   %instroot/cmsset_default.csh
94   %instroot/bin/cmsos
95 + %instroot/%cmsplatf/etc/profile.d

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines