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.41 by elmer, Tue May 1 11:31:21 2007 UTC vs.
Revision 1.51 by elmer, Thu Dec 27 20:57:09 2007 UTC

# Line 1 | Line 1
1 < ### RPM cms cms-env 1.0
1 > ### RPM cms cms-env 1.0
2   Source: cmsos
3 +
4   %prep
5   %build
5 echo $SCRAM_ROOT
6   %install
7 %define scramroot %(echo $SCRAM_ROOT)
8 %define scramv1root %(echo $SCRAMV1_ROOT)
7  
8   mkdir -p %instroot/bin
9 +
10 + %if "%{?online_release:set}" != "set"
11   install -m 755 %_sourcedir/cmsos %instroot/bin/cmsos
12 + %else
13 + echo echo %{cmsos} >  %instroot/bin/cmsos
14 + chmod 755 %instroot/bin/cmsos
15 + %endif
16 +
17   mkdir -p %{instroot}/%{cmsplatf}/etc/profile.d
18  
19 + %if "%{?online_release:set}" != "set"
20   ### Detects the SCRAM_ARCH to be used.
21   cat << \EOF_CMSARCH_SH >%instroot/bin/cmsarch
22   #!/bin/sh
# Line 32 | Line 38 | then
38   else
39      echo $SCRAM_ARCH
40   fi
35
41   EOF_CMSARCH_SH
42 + %else
43 + cat << \EOF_CMSARCH_ONL >%instroot/bin/cmsarch
44 + #!/bin/sh
45 + echo %{cmsplatf}
46 + EOF_CMSARCH_ONL
47 + %endif
48 +
49   chmod 755 %instroot/bin/cmsarch
50  
51   ### BASH code
# Line 76 | Line 88 | then
88      export CMS_PATH=$here
89   fi
90  
91 + # aliases
92 + alias cmsenv='eval `scramv1 runtime -sh`'
93 + alias cmsrel='scramv1 project CMSSW'
94 +
95   if [ -f $CMS_PATH/SITECONF/local/JobConfig/cmsset_local.sh ]; then
96          . $CMS_PATH/SITECONF/local/JobConfig/cmsset_local.sh
97   fi
# Line 119 | Line 135 | if ( ! ${?CMS_PATH} ) then
135      setenv CMS_PATH $here
136   endif
137  
138 < if( -e $CMS_PATH/SITECONF/local/JobConfig/cmsset_local.csh ) then
138 > # aliases
139 > alias cmsenv 'eval `scramv1 runtime -csh`'
140 > alias cmsrel 'scramv1 project CMSSW'
141 >
142 > if ( -e $CMS_PATH/SITECONF/local/JobConfig/cmsset_local.csh ) then
143          source $CMS_PATH/SITECONF/local/JobConfig/cmsset_local.csh
144   endif
145   unset here
146   EOF_CMSSET_DEFAULT_CSH
147   touch %instroot/%cmsplatf/etc/profile.d/dummy
148   %pre
149 < [ -f $RPM_INSTALL_PREFIX/cmsset_default.sh ] && cp $RPM_INSTALL_PREFIX/cmsset_default.sh $RPM_INSTALL_PREFIX/cmsset_default.sh.old`date +%Y%m%d`
150 < [ -f $RPM_INSTALL_PREFIX/cmsset_default.csh ] && cp $RPM_INSTALL_PREFIX/cmsset_default.csh $RPM_INSTALL_PREFIX/cmsset_default.csh.old`date +%Y%m%d`
151 < [ -d $RPM_INSTALL_PREFIX/bin ] && cp -r $RPM_INSTALL_PREFIX/bin $RPM_INSTALL_PREFIX/bin.old`date +%Y%m%d`
149 > if [ -f $RPM_INSTALL_PREFIX/cmsset_default.sh ]
150 > then
151 >  cp $RPM_INSTALL_PREFIX/cmsset_default.sh $RPM_INSTALL_PREFIX/cmsset_default.sh.old`date +%Y%m%d`
152 > fi
153 > if [ -f $RPM_INSTALL_PREFIX/cmsset_default.csh ]
154 > then
155 >  cp $RPM_INSTALL_PREFIX/cmsset_default.csh $RPM_INSTALL_PREFIX/cmsset_default.csh.old`date +%Y%m%d`
156 > fi
157 > if [ -d $RPM_INSTALL_PREFIX/bin ]
158 > then
159 >  cp -r $RPM_INSTALL_PREFIX/bin $RPM_INSTALL_PREFIX/bin.old`date +%Y%m%d`
160 > else
161 >  mkdir -p $RPM_INSTALL_PREFIX/bin
162 > fi
163   %post
164   echo $RPM_INSTALL_PREFIX
165   perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/cmsset_default.sh

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines