ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/tom.spec
Revision: 1.18
Committed: Fri Feb 20 17:29:22 2009 UTC (16 years, 2 months ago) by sgysin
Branch: MAIN
CVS Tags: DBS_2_1_6-pre1, CmsTC_0_0_4, FRONTEND_CONF_3_30_20100724, FRONTEND_CONF_3_29_20100723, ge20100722-rpm-osx-64-bit, ge20100621-bootstrap-rpm-4-8-macosx, ge20100611-apt-rpm-4-8-gcc-4-5-0, MotT0_1_0_15, MotT0_1_0_14, MotT0_1_0_13, MotT0_1_0_12, MotT0_1_0_11, MotT0_1_0_10, MotT0_1_0_9, MotT0_1_0_8, MotT0_1_0_6, MotT0_1_0_5, MotT0_1_0_4, MotT0_1_0_3, MotT0_1_0_2, MotT0_1_0_1, MotT0_1_0_0, MotT0_100531_1, MotT0_100528_1, ge20100521b-new-rpm, ge20100521-new-rpm, ge20100519-new-apt, T0Mon_100518_1, T0Mon_100503_1, ge20100427-rpm-on-linux, ge20100422-rpm-4-8-0, T0Mon_100316_1, T0Mon_100308_2, T0Mon_100308_1, DAS_20100302_slc5_amd64_gcc434, DBS_20100226_slc5_amd64_gcc434, DBS_20100217_slc5_amd64_gcc434, FILEMOVER_20100217_slc5_amd64_gcc434, FRONTEND_CONF_3_24_20100217, DAS_20100217_slc5_amd64_gcc434, DAS_20100216b_slc5_amd64_gcc434, T0Mon_100216_1, DAS_20100216_slc5_amd64_gcc434, T0Mon_100210_1, T0Mon_100204_4, T0Mon_100204_3, T0Mon_100204_2, T0Mon_100204_1, dg20100201-dbs3, FILEMOVER_20100201_slc5_amd64_gcc434, FILEMOVER_20100128b_slc5_amd64_gcc434, dg20100129-dbs3, dg20100128-dbs3, FILEMOVER_20100128_slc5_amd64_gcc434, DAS_20100127_slc5_amd64_gcc434, T0Mon_100127_1, DAS_20100126_slc5_amd64_gcc434, DBS-APP_20100122_slc4, FILEMOVER_20100122_slc5_amd64_gcc434, DBS-APP_20100121_slc4, DBS-WEB_20100120_slc4, DBS-APP_20100120_slc4, DAS_20100119_slc5_amd64_gcc434, DBS-APP_20100118_slc4, DBS-WEB_20100118_slc4, DAS_20100115_slc5_amd64_gcc434, dg20100115-security, DBS_20100115_slc5_amd64_gcc434, DBS-APP_20100114_slc4, DBS-WEB_20100113_slc4, dg20100112-security, DBS_20100112_slc5_amd64_gcc434, DBS_20100111_slc5_amd64_gcc434, dg20100111-security, dg20100107b-wmcore, dg20100107-wmcore, DAS_20100105_slc5_amd64_gcc434, DAS_20091221_slc5_amd64_gcc434, DAS_20091214_slc5_amd64_gcc434, dg20091211-couchdb, dg20091210-phedex, dg20091203c-comp-base, DD_20091208_slc5_amd64_gcc434, DAS_20091208_slc5_amd64_gcc434, FILEMOVER_20091208_slc5_amd64_gcc434, DBS_20091208_slc5_amd64_gcc434, dg20091203b-comp-base, dg20091203-comp-base, DAS_20091202, DQMCATTEST_0_0_1, FILEMOVER_20091118, DBS-APPS_20090929, pe20091117a-fromDAS_20090709, DAS_20091117, pe20091116b-fromDAS_20090709, pe20091116a-fromDAS_20090709, T0Mon_091111_1, BUILDBOT_01, CERNOIDv02, DAS_20091104, DBS-WEB_20091021, CouchDB_0_10_0, DAS_20091016, CERNOIDv01, DAS_20091014, WMCORE-before-refactor, DBS-WEB_20091012, PerfSuiteDB_20090930, DBS-WEB_20090921, PerfSuiteDB_20090916, pe20090910-fromDAS_20090709, FILEMOVER_20090910, PerfSuiteDB_20090904_almost_stable, DBS-WEB_20090817, PerfSuiteDB_20090904, FILEMOVER_20090828, PerfSuiteDB_20090901, DBS-APPS_20090706, forHEARTBEATr04, RPMVERIFY_0_2, forHEARTBEATr01, WEBTOOLS_APPS_20090817, DBS-APPS_20090804, DBS-APPS_20090730, DAS_20090709, DAS_20090607, DBS-WEB_20090618, DBS-APPS_20090619, DBS-APPS_20090608, DBS-APPS_20090604_1, DAS_20090604, DBS-APPS_20090604, DAS_20090603, DBS-APPS_20090603, DBS-APPS_20090528, ap20090520-osx105, ap20090519-osx105, DBS_APPS_20090518, DAS_20090514_3, DAS_20090514_2, DAS_20090514_1, DAS_20090514, DBS-WEB_20090512, DBS-WEB_20090507, DBS_APPS_20090504, DBS_APPS_20090501, DBS-APPS_20090429_2, DBS-WEB_20090429, DBS-APPS_20090429, DBS-WEB_20090428, DBS-WEB_20090422, DBS-WEB_20090420, DBS-APPS_20090417, DBS-APPS_20090415, DBS-APPS_20090410, DAS_20090408, DBS-APPS_20090406, DAS_20090330, DBS-APPS_20090326, DAS_20090319_1, DAS_20090319, DBS-APPS_20090318, DBS-APPS_20090316, DAS_20090316, DAS_20090313, COUCHDB_20090313, DBS-APPS_20090310, WEBTOOLS-APPS_20090310_1, WEBTOOLS-APPS_20090310, WEBTOOLS-APPS_20090309, DBS-APPS_20090306, DBS-APPS_20090304_1, DBS-APPS_20090304, DBS-APPS_20090303_1, DBS-APPS_20090303, DBS-APPS_20090302, DBS-APPS_20090220_1, DBS-APPS_20090220, T0M_0_0_5
Changes since 1.17: +2 -2 lines
Log Message:
updated for version T0M_0_0_5
added a / at the end of the dir and Datadir parameter in the tom.propeties file

File Contents

# User Rev Content
1 sgysin 1.18 ### RPM cms tom T0M_0_0_5
2 sgysin 1.1 # the last string specifies the cvs tag to be used in the checkout command, don't know what the other strings are.
3 gowdy 1.3 ## NOCOMPILER
4 sgysin 1.1
5     %define cvstag %{realversion}
6     # define version of tom to use, realversion is supplied by CMS
7     %define tom_version %{realversion}
8    
9     Source: cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&module=T0/src/java/tom&export=tom&tag=-r%{cvstag}&output=/tom.tar.gz
10     # RPM dependencies, if are RPM files
11 gowdy 1.4 Requires: java-jdk apache-ant apache-tomcat
12 sgysin 1.1
13     %prep
14     # this section is for preparation such as declaring variables
15    
16     %setup -n tom
17     # 'tom' matches the export parameter in line 7
18     # will un-tar the tom tar ball
19    
20     %build
21     # will be on top directory in tar ball
22     # make the war file using ant
23 gowdy 1.5 cd src/java/tom
24 gowdy 1.6 mkdir build temp
25 sgysin 1.1 echo "PWD=$PWD"
26     source $JAVA_JDK_ROOT/etc/profile.d/init.sh
27     export JAVA_HOME=$JAVA_JDK_ROOT
28     ant
29 gowdy 1.12 rm -rf %i/etc/profile.d
30     mkdir -p %i/etc/profile.d
31     echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
32     echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
33     echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
34     for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
35     do
36     case X$tool in
37     Xdistcc|Xccache )
38     ;;
39     * )
40     toolcap=`echo $tool | tr a-z- A-Z_`
41     eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
42     eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
43     ;;
44     esac
45     done
46 sgysin 1.1
47     %install
48     # copy war file, %{i} means install area
49 gowdy 1.17 cp -p src/java/tom/build/tom.war %{i}/
50 gowdy 1.15 # copy properties file
51     cp -p src/java/tom/tom.properties %{i}/
52     chmod 700 %{i}/tom.properties
53 sgysin 1.1 # this is where I can modify the tomcat start script to add a parameter
54     # can not start or stop tomcat
55 gowdy 1.15
56 sgysin 1.1 %post
57     # installs script to set up environment
58     %{relocateConfig}etc/profile.d/dependencies-setup.sh
59     %{relocateConfig}etc/profile.d/dependencies-setup.csh
60 gowdy 1.13 # copy war file
61 gowdy 1.14 . $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
62 gowdy 1.16 cp -p $RPM_INSTALL_PREFIX/%{pkgrel}/tom.war $APACHE_TOMCAT_ROOT/webapps
63 gowdy 1.15 mkdir -p $APACHE_TOMCAT_ROOT/temp/tom
64 sgysin 1.18 sed "s:dir=:dir=$APACHE_TOMCAT_ROOT/temp/tom/:;s%dataDir=%dataDir=file:///$APACHE_TOMCAT_ROOT/temp/tom/%" $RPM_INSTALL_PREFIX/%{pkgrel}/tom.properties > $APACHE_TOMCAT_ROOT/etc/tom.properties
65 gowdy 1.15 chmod 700 $APACHE_TOMCAT_ROOT/etc/tom.properties
66 sgysin 1.1
67     echo "##### tom install is complete #####"
68