ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/crab.spec
Revision: 1.7
Committed: Fri Jan 5 14:38:13 2007 UTC (18 years, 4 months ago) by afanfani
Branch: MAIN
Changes since 1.6: +90 -6 lines
Log Message:
Update for testing with CRAB_1_4_2

File Contents

# User Rev Content
1 afanfani 1.7 ### RPM cms crab CRAB_1_4_2
2 eulisse 1.1 ## INITENV +PATH PYTHONPATH %i/python
3 afanfani 1.7 ## INITENV +PATH PYTHONPATH %i/PsetCode
4     ## INITENV +PATH PATH %i/python
5     ## INITENV +PATH CRABPYTHON %i/python
6     ## INITENV SET CRABDIR %i
7     ## INITENV SET CRABSCRIPT %i/script
8 eulisse 1.1
9 elmer 1.3 %define cvstag %v
10 eulisse 1.1 Source: cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&module=CRAB&export=CRAB&&tag=-r%{cvstag}&output=/CRAB.tar.gz
11 afanfani 1.7 Requires: python boss dbs dls prodagent
12 eulisse 1.1
13     %prep
14     %setup -n CRAB
15     %build
16 afanfani 1.7 %install
17 eulisse 1.1 rm -rf %i
18     mkdir -p %i
19     cp -r ./* %i
20 afanfani 1.7 mkdir -p %{i}/etc/profile.d
21    
22     (echo "#!/bin/sh"; \
23     echo "source $PYTHON_ROOT/etc/profile.d/init.sh"; \
24     echo "source $DBS_ROOT/etc/profile.d/init.sh"; \
25     echo "source $DLS_ROOT/etc/profile.d/init.sh"; \
26     echo "source $PRODAGENT_ROOT/etc/profile.d/init.sh"; \
27     echo "source $BOSS_ROOT/etc/profile.d/init.sh" ) > %{i}/etc/profile.d/dependencies-setup.sh
28    
29    
30    
31    
32     (echo "#!/bin/tcsh"; \
33     echo "source $PYTHON_ROOT/etc/profile.d/init.csh"; \
34     echo "source $DBS_ROOT/etc/profile.d/init.csh"; \
35     echo "source $DLS_ROOT/etc/profile.d/init.csh"; \
36     echo "source $PRODAGENT_ROOT/etc/profile.d/init.csh"; \
37     echo "source $BOSS_ROOT/etc/profile.d/init.csh" ) > %{i}/etc/profile.d/dependencies-setup.csh
38    
39     %post
40     %{relocateConfig}etc/profile.d/dependencies-setup.sh
41     %{relocateConfig}etc/profile.d/dependencies-setup.csh
42    
43     (echo "#!/bin/sh"; \
44     echo " if [ ! -d ~/.bossrc ]; then"; \
45     echo " mkdir ~/.bossrc "; \
46     echo "fi "; \
47     echo "# check if *clad files exist"; \
48     echo "if [ ! -e ~/.bossrc/BossConfig.clad ]; then "; \
49     echo "if [ -e ~/BossConfig.clad ]; then "; \
50     echo " cp ~/BossConfig.clad ~/.bossrc/BossConfig.clad "; \
51     echo " else "; \
52     echo " echo \"User-boss DB not installed => run $\CRABDIR/python/configureBoss\" "; \
53     echo " return 1 "; \
54     echo " fi "; \
55     echo "fi "; \
56     echo "if [ ! -e ~/.bossrc/SQLiteConfig.clad ]; then"; \
57     echo " if [ -e ~/SQLiteConfig.clad ]; then"; \
58     echo " cp ~/SQLiteConfig.clad ~/.bossrc/SQLiteConfig.clad"; \
59     echo " else"; \
60     echo " echo \"User-boss DB not installed => run $\CRABDIR/python/configureBoss\" "; \
61     echo " return 1"; \
62     echo " fi"; \
63     echo "fi"; \
64     echo "if [ ! -e ~/.bossrc/MySQLRTConfig.clad ]; then"; \
65     echo " if [ -e ~/MySQLRTConfig.clad ]; then"; \
66     echo " cp ~/MySQLRTConfig.clad ~/.bossrc/MySQLRTConfig.clad"; \
67     echo " else"; \
68     echo " echo \"User-boss DB not installed => run $\CRABDIR/python/configureBoss\" "; \
69     echo " return 1"; \
70     echo " fi"; \
71     echo "fi" ) >> %{i}/etc/profile.d/init.sh
72    
73     (echo "#!/bin/csh"; \
74     echo "if ( ! -d ~/.bossrc ) then"; \
75     echo " mkdir ~/.bossrc"; \
76     echo "endif"; \
77     echo "# check if *clad files exist"; \
78     echo "if ( ! -e ~/.bossrc/BossConfig.clad ) then"; \
79     echo " if ( -e ~/BossConfig.clad ) then"; \
80     echo " cp ~/BossConfig.clad ~/.bossrc/BossConfig.clad"; \
81     echo " else"; \
82     echo " echo \"User-boss DB not installed => run $\CRABDIR/python/configureBoss\""; \
83     echo " exit 1"; \
84     echo " endif"; \
85     echo "endif"; \
86     echo "if ( ! -e ~/.bossrc/SQLiteConfig.clad ) then"; \
87     echo " if ( -e ~/SQLiteConfig.clad ) then"; \
88     echo " cp ~/SQLiteConfig.clad ~/.bossrc/SQLiteConfig.clad"; \
89     echo " else"; \
90     echo " echo \"User-boss DB not installed => run $\CRABDIR/configureBoss\""; \
91     echo " exit 1"; \
92     echo " endif"; \
93     echo "endif"; \
94     echo "if ( ! -e ~/.bossrc/MySQLRTConfig.clad ) then"; \
95     echo " if ( -e ~/MySQLRTConfig.clad ) then"; \
96     echo " cp ~/MySQLRTConfig.clad ~/.bossrc/MySQLRTConfig.clad"; \
97     echo " else"; \
98     echo " echo \"User-boss DB not installed => run $\CRABDIR/configureBoss\""; \
99     echo " exit 1"; \
100     echo " endif"; \
101     echo "endif " ) >> %{i}/etc/profile.d/init.csh