Revision: | 1.8 |
Committed: | Mon Jun 9 09:39:54 2008 UTC (16 years, 10 months ago) by swakef |
Branch: | MAIN |
CVS Tags: | MotT0_1_0_2, MotT0_1_0_1, MotT0_1_0_0, MotT0_100531_1, MotT0_100528_1, T0Mon_100518_1, T0Mon_100503_1, T0Mon_100316_1, T0Mon_100308_2, T0Mon_100308_1, T0Mon_100216_1, T0Mon_100210_1, T0Mon_100204_4, T0Mon_100204_3, T0Mon_100204_1, T0Mon_100127_1, T0Mon_091111_1, T0Mon_090828_1, T0Mon_090822_1, T0Mon_090715_1, T0Mon_090612_1, T0Mon_090611_1, T0Mon_090610_1, T0Mon_090601_1, T0Mon_090527_2, T0Mon_090527_1, T0Mon_090522_1, T0Mon_090519_2, T0Mon_090519_1, T0Mon_090517_1, T0Mon_090516_1, T0Mon_090515_4, T0Mon_090515_3, T0Mon_090515_2, T0Mon_090515_1, T0Mon_090510_1, T0Mon_090406_1, T0Mon_090326_1, T0Mon_090325_1, T0Mon_090318_1, T0Mon_090315_1, T0Mon_090303_1, testofc, T0Mon_081107_1, T0Mon_081105_1, PRODAGENT_0_12_2, T0Mon_080926_1, T0Mon_080920_2, T0Mon_080920_1, T0Mon_080916_2, T0Mon_080905_1, T0Mon_080905_01, T0Mon_080902_2, T0Mon_080902_1, T0Mon_080824_1, T0Mon_080823_1, buildset_V2_8, nr080714_forCRAB, sw_20080509 |
Changes since 1.7: | +1 -0 lines |
Log Message: | Try to correct prob with control script |
# | User | Rev | Content |
---|---|---|---|
1 | swakef | 1.6 | ### RPM cms prodmon 0.0.3 |
2 | swakef | 1.1 | ## INITENV +PATH PYTHONPATH %i |
3 | swakef | 1.4 | |
4 | swakef | 1.2 | %define moduleName COMP/PRODMON |
5 | swakef | 1.1 | %define exportName PRODMON |
6 | swakef | 1.5 | %define cvstag PRODMON_0_0_3 |
7 | swakef | 1.1 | %define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e |
8 | Source: %cvsserver&strategy=checkout&module=%{moduleName}&nocache=true&export=%{exportName}&tag=-r%{cvstag}&output=/PRODMON.tar.gz | ||
9 | Requires: python cherrypy py2-cheetah yui py2-formencode zlib libtiff libjpg libpng expat openssl bz2lib db4 gdbm webtools py2-pycrypto beautifulsoup py2-numpy py2-pil py2-matplotlib | ||
10 | |||
11 | |||
12 | %prep | ||
13 | %setup -n PRODMON | ||
14 | %build | ||
15 | rm -rf %i/etc/profile.d | ||
16 | mkdir -p %i/etc/profile.d | ||
17 | echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh | ||
18 | echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh | ||
19 | echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` | ||
20 | for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` | ||
21 | do | ||
22 | case X$tool in | ||
23 | Xdistcc|Xccache ) | ||
24 | ;; | ||
25 | * ) | ||
26 | toolcap=`echo $tool | tr a-z- A-Z_` | ||
27 | eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh | ||
28 | eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh | ||
29 | ;; | ||
30 | esac | ||
31 | done | ||
32 | |||
33 | perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh | ||
34 | perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh | ||
35 | swakef | 1.5 | |
36 | swakef | 1.1 | %install |
37 | cp -r * %i/ | ||
38 | swakef | 1.5 | |
39 | # Create the prodmon shell script. | ||
40 | cat > %{i}/prodmon.sh <<EOF | ||
41 | #!/bin/sh | ||
42 | . %{i}/etc/profile.d/init.sh | ||
43 | exec \$PRODMON_ROOT/prodmon \$@ | ||
44 | EOF | ||
45 | swakef | 1.7 | chmod +x %{i}/prodmon.sh |
46 | |||
47 | %post | ||
48 | %{relocateConfig}etc/profile.d/dependencies-setup.sh | ||
49 | %{relocateConfig}etc/profile.d/dependencies-setup.csh | ||
50 | swakef | 1.8 | %{relocateConfig}prodmon.sh |
51 | swakef | 1.7 |