ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/webtools.spec
Revision: 1.9
Committed: Fri Mar 30 14:13:07 2007 UTC (18 years, 1 month ago) by eulisse
Branch: MAIN
Changes since 1.8: +19 -2 lines
Log Message:
* It does source all the dependencies now, so that one can run sitedb standalone.
* Version moved to 0.9.0 as we are actually close to the real thing.

File Contents

# User Rev Content
1 eulisse 1.9 ### RPM cms webtools 0.9.0
2 eulisse 1.1 %define moduleName WEBTOOLS
3     %define exportName WEBTOOLS
4 eulisse 1.7 %define cvstag V00-09-00
5 eulisse 1.1 %define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
6     Source: %cvsserver&strategy=checkout&module=%{moduleName}&nocache=true&export=%{exportName}&tag=-r%{cvstag}&output=/%{moduleName}.tar.gz
7 eulisse 1.9 Requires: python cherrypy py2-cheetah yui sqlite zlib py2-pysqlite expat openssl bz2lib db4 gdbm py2-cx-oracle py2-formencode py2-pycrypto
8 eulisse 1.8 Provides: perl(CGI)
9     Provides: perl(Crypt::CBC)
10     Provides: perl(SecurityModule)
11 eulisse 1.1
12     %prep
13     %setup -n %{moduleName}
14     %build
15 eulisse 1.9
16     rm -rf %i/etc/profile.d
17     mkdir -p %i/etc/profile.d/
18     dependenciesRoots="$PYTHON_ROOT $SQLITE_ROOT $PY2_PYSQLITE_ROOT $CHERRYPY_ROOT $YUI_ROOT \
19     $ZLIB_ROOT $EXPAT_ROOT $OPENSSEL_ROOT $BZ2LIB_ROOT $DB4_ROOT $GDBM_ROOT $PY2_FORMENCODE_ROOT \
20     $PY2_CHEETAH_ROOT $PY2_PYCRYPTO_ROOT $PY2_CX_ORACLE_ROOT"
21     touch %i/etc/profile.d/dependencies-setup.csh
22     for pkg in $dependenciesRoots
23     do
24     echo $pkg
25     echo source $pkg/etc/profile.d/init.sh >> %i/etc/profile.d/dependencies-setup.sh
26     echo source $pkg/etc/profile.d/init.csh >> %i/etc/profile.d/dependencies-setup.csh
27     done
28    
29 eulisse 1.1 %install
30     mkdir -p %i/etc
31     cp -r * %i
32     cat << \EOF_CHERRYPY_CONF > %i/etc/cherrypy.conf
33     # Serve a complete directory
34     [/Common]
35 eulisse 1.6 tools.staticdir.on = True
36     tools.staticdir.dir = %i/Common
37 eulisse 1.1 [/Templates]
38 eulisse 1.6 tools.staticdir.on = True
39     tools.staticdir.dir = %i/Templates
40 eulisse 1.5 # Serve a complete directory
41     [/WEBTOOLS/Common]
42 eulisse 1.6 tools.staticdir.on = True
43     tools.staticdir.dir = %i/Common
44 eulisse 1.5 [/WEBTOOLS/Templates]
45 eulisse 1.6 tools.staticdir.on = True
46     tools.staticdir.dir = %i/Templates
47 eulisse 1.1 EOF_CHERRYPY_CONF
48 eulisse 1.2 cat << \EOF_APACHE2_HEADER > %i/etc/apache2-header.conf
49     RewriteEngine On
50     RewriteBase /cms/services
51     EOF_APACHE2_HEADER
52    
53     cat << \EOF_APACHE2_CONF > %i/etc/apache2.conf
54     <Directory %i/Common>
55     Allow from all
56     </Directory>
57     <Directory %i/Templates>
58     Allow from all
59     </Directory>
60     EOF_APACHE2_CONF
61    
62     cat << \EOF_APACHE2_FOOTER > %i/etc/apache2-footer.conf
63     RewriteRule ^/cms/services/webtools/Common(.*)$ %i/Common$1
64     RewriteRule ^/cms/services/webtools/Templates(.*)$ %i/Templates$1
65     EOF_APACHE2_FOOTER
66    
67 eulisse 1.1 %post
68     %{relocateConfig}etc/cherrypy.conf
69 eulisse 1.2 %{relocateConfig}etc/apache2.conf
70     %{relocateConfig}etc/apache2-header.conf
71     %{relocateConfig}etc/apache2-footer.conf
72 eulisse 1.9 %{relocateConfig}etc/profile.d/dependencies-setup.sh
73     %{relocateConfig}etc/profile.d/dependencies-setup.csh
74     perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX/%pkgrel!" $RPM_INSTALL_PREFIX/%pkgrel/cmsWeb
75 eulisse 1.7