ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/webtools.spec
Revision: 1.19
Committed: Wed Apr 18 23:46:02 2007 UTC (18 years ago) by ratnik
Branch: MAIN
Changes since 1.18: +2 -0 lines
Log Message:
Changes for building  externals in 64/32 mode: added gcc-wrapper .

File Contents

# User Rev Content
1 eulisse 1.9 ### RPM cms webtools 0.9.0
2 ratnik 1.19 Requires: gcc-wrapper
3 eulisse 1.10 ## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages
4 eulisse 1.1 %define moduleName WEBTOOLS
5     %define exportName WEBTOOLS
6 eulisse 1.16 %define cvstag V00-09-07
7 eulisse 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=/%{moduleName}.tar.gz
9 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
10 eulisse 1.8 Provides: perl(CGI)
11     Provides: perl(Crypt::CBC)
12     Provides: perl(SecurityModule)
13 eulisse 1.1
14 eulisse 1.17
15 eulisse 1.1 %prep
16     %setup -n %{moduleName}
17     %build
18 ratnik 1.19 ## IMPORT gcc-wrapper
19 eulisse 1.9
20     rm -rf %i/etc/profile.d
21     mkdir -p %i/etc/profile.d/
22     dependenciesRoots="$PYTHON_ROOT $SQLITE_ROOT $PY2_PYSQLITE_ROOT $CHERRYPY_ROOT $YUI_ROOT \
23     $ZLIB_ROOT $EXPAT_ROOT $OPENSSEL_ROOT $BZ2LIB_ROOT $DB4_ROOT $GDBM_ROOT $PY2_FORMENCODE_ROOT \
24     $PY2_CHEETAH_ROOT $PY2_PYCRYPTO_ROOT $PY2_CX_ORACLE_ROOT"
25     touch %i/etc/profile.d/dependencies-setup.csh
26     for pkg in $dependenciesRoots
27     do
28     echo $pkg
29     echo source $pkg/etc/profile.d/init.sh >> %i/etc/profile.d/dependencies-setup.sh
30     echo source $pkg/etc/profile.d/init.csh >> %i/etc/profile.d/dependencies-setup.csh
31     done
32    
33 eulisse 1.10 python Applications/SiteDB/Utilities/CreateSiteDB.py -p `pwd`/Applications/SiteDB/
34    
35 eulisse 1.1 %install
36     mkdir -p %i/etc
37 eulisse 1.10 mkdir -p %i/bin
38     mkdir -p %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
39     cp -r * %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
40     cp cmsWeb %i/bin
41 eulisse 1.1 cat << \EOF_CHERRYPY_CONF > %i/etc/cherrypy.conf
42     # Serve a complete directory
43     [/Common]
44 eulisse 1.6 tools.staticdir.on = True
45     tools.staticdir.dir = %i/Common
46 eulisse 1.1 [/Templates]
47 eulisse 1.6 tools.staticdir.on = True
48     tools.staticdir.dir = %i/Templates
49 eulisse 1.5 # Serve a complete directory
50     [/WEBTOOLS/Common]
51 eulisse 1.6 tools.staticdir.on = True
52     tools.staticdir.dir = %i/Common
53 eulisse 1.5 [/WEBTOOLS/Templates]
54 eulisse 1.6 tools.staticdir.on = True
55     tools.staticdir.dir = %i/Templates
56 eulisse 1.1 EOF_CHERRYPY_CONF
57 eulisse 1.2 cat << \EOF_APACHE2_HEADER > %i/etc/apache2-header.conf
58     RewriteEngine On
59     RewriteBase /cms/services
60     EOF_APACHE2_HEADER
61    
62     cat << \EOF_APACHE2_CONF > %i/etc/apache2.conf
63     <Directory %i/Common>
64     Allow from all
65     </Directory>
66     <Directory %i/Templates>
67     Allow from all
68     </Directory>
69     EOF_APACHE2_CONF
70    
71     cat << \EOF_APACHE2_FOOTER > %i/etc/apache2-footer.conf
72     RewriteRule ^/cms/services/webtools/Common(.*)$ %i/Common$1
73     RewriteRule ^/cms/services/webtools/Templates(.*)$ %i/Templates$1
74     EOF_APACHE2_FOOTER
75 eulisse 1.14 %define pythonv %(echo $PYTHON_ROOT | cut -d. -f1,2)
76 eulisse 1.1 %post
77     %{relocateConfig}etc/cherrypy.conf
78 eulisse 1.2 %{relocateConfig}etc/apache2.conf
79     %{relocateConfig}etc/apache2-header.conf
80     %{relocateConfig}etc/apache2-footer.conf
81 eulisse 1.9 %{relocateConfig}etc/profile.d/dependencies-setup.sh
82     %{relocateConfig}etc/profile.d/dependencies-setup.csh
83 eulisse 1.15 %{relocateConfig}lib/python2.4/site-packages/Applications/SiteDB/sitedb.ini
84 eulisse 1.18 perl -p -i -e "s|/BUILD/|/|;s|/WEBTOOLS/|/lib/python2.4/site-packages/|" $RPM_INSTALL_PREFIX/%pkgrel/lib/python2.4/site-packages/Applications/SiteDB/sitedb.ini
85 eulisse 1.14 perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX/%pkgrel!" $RPM_INSTALL_PREFIX/%pkgrel/bin/cmsWeb