ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/conddb-appserver.spec
Revision: 1.16
Committed: Wed Jun 3 16:41:52 2009 UTC (15 years, 10 months ago) by xiezhen
Branch: MAIN
CVS Tags: condapp164b
Changes since 1.15: +2 -2 lines
Log Message:
add HLT in the detector map

File Contents

# User Rev Content
1 xiezhen 1.16 ### RPM cms conddb-appserver 1.6.4b
2 eulisse 1.1 ## INITENV +PATH PYTHONPATH %i
3     # FIXME: Change the version above
4     # FIXME: Change the tag in cvstag
5 xiezhen 1.3 %define moduleName WEBCONDDB
6     %define exportName WEBCONDDB
7 xiezhen 1.16 %define cvstag CONDAPP-1-6-4b
8 eulisse 1.1
9     %define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
10     Source: %cvsserver&strategy=checkout&module=%{moduleName}&nocache=true&export=%{exportName}&tag=-r%{cvstag}&output=/WEBCONDDB.tar.gz
11 xiezhen 1.11 Requires: python cherrypy
12 eulisse 1.1
13    
14     %prep
15     %setup -n WEBCONDDB
16     %build
17     rm -rf %i/etc/profile.d
18     mkdir -p %i/etc/profile.d/
19 xiezhen 1.9 rm -rf %i/etc/init.d
20     mkdir -p %i/etc/init.d/
21     rm -rf %i/data
22     mkdir -p %i/data
23     rm -rf %i/auth
24     mkdir -p %i/auth
25 eulisse 1.1
26     echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
27     echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
28 xiezhen 1.11
29 eulisse 1.1 echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
30     for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
31     do
32     case X$tool in
33     Xdistcc|Xccache )
34     ;;
35     * )
36     toolcap=`echo $tool | tr a-z- A-Z_`
37     eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
38 xiezhen 1.11 eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
39 eulisse 1.1 ;;
40     esac
41     done
42    
43     perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
44     perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
45    
46     %install
47 xiezhen 1.5 cp -r CondWebServer %i
48 xiezhen 1.9 cp -f CondWebServer/scripts/conddb-app-server %i/etc/init.d/
49     cp -f CondWebServer/scripts/conddb-app-server.conf %i/etc/init.d/
50     chmod a+x %{i}/etc/init.d/conddb-app-server
51    
52     rm -f %i/CondWebServer/config/application.conf
53     cat << \EOF_APP_CONF > %{i}/CondWebServer/config/application.conf
54     # generate application.conf on the fly
55     [common]
56     auth_path = %{i}/auth
57     datasave_dir = %{i}/data
58     detector_conf= %{i}/CondWebServer/config/detector.conf
59    
60     [iov]
61     log_conn=sqlite_file:log.db
62    
63     [globaltag]
64     config_file = %{i}/CondWebServer/config/globaltag.conf
65     EOF_APP_CONF
66    
67 eulisse 1.1 %post
68     %{relocateConfig}etc/profile.d/dependencies-setup.sh
69     %{relocateConfig}etc/profile.d/dependencies-setup.csh
70 xiezhen 1.9 %{relocateConfig}CondWebServer/config/application.conf
71    
72     echo "*************************************************************"
73     echo
74     echo Please now add authentication.xml in
75     echo $RPM_INSTALL_PREFIX/%{pkgrel}/auth
76     echo
77 xiezhen 1.11 echo Please ajust PORT variables in
78 xiezhen 1.9 echo $RPM_INSTALL_PREFIX/%{pkgrel}/etc/init.d/conddb-app-server.conf
79     echo
80     echo If you choose to use non-default setup, please ajust the parameters in:
81 xiezhen 1.8 echo
82     echo $RPM_INSTALL_PREFIX/%{pkgrel}/CondWebServer/config/application.conf
83     echo
84 xiezhen 1.9 echo "*************************************************************"