ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/webtools.spec
(Generate patch)

Comparing COMP/CMSDIST/webtools.spec (file contents):
Revision 1.14 by eulisse, Tue Apr 3 14:56:00 2007 UTC vs.
Revision 1.72 by diego, Thu Oct 7 13:46:34 2010 UTC

# Line 1 | Line 1
1 < ### RPM cms webtools 0.9.0
1 > ### RPM cms webtools 1.3.43
2   ## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages
3 + ## INITENV +PATH PERL5LIB %i/lib/perl
4 +
5   %define moduleName WEBTOOLS
6 < %define exportName WEBTOOLS
5 < %define cvstag V00-09-06
6 > %define cvstag V01-03-43
7   %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 < Requires: python cherrypy py2-cheetah yui sqlite zlib py2-pysqlite expat openssl bz2lib db4 gdbm py2-cx-oracle py2-formencode py2-pycrypto
10 < Provides: perl(CGI)
11 < Provides: perl(Crypt::CBC)
8 > Source: %cvsserver&strategy=checkout&module=%{moduleName}&nocache=true&export=%{moduleName}&tag=-r%{cvstag}&output=/%{moduleName}.tar.gz
9 >
10 > Requires: python cherrypy py2-cheetah yui sqlite zlib py2-pysqlite expat openssl bz2lib db4 gdbm py2-cx-oracle py2-formencode py2-pycrypto oracle beautifulsoup py2-sqlalchemy oracle-env py2-pyopenssl
11 > Requires: p5-crypt-cbc p5-crypt-blowfish
12 >
13   Provides: perl(SecurityModule)
14  
15   %prep
16   %setup -n %{moduleName}
15 %build
16
17 rm -rf %i/etc/profile.d
18 mkdir -p %i/etc/profile.d/
19 dependenciesRoots="$PYTHON_ROOT $SQLITE_ROOT $PY2_PYSQLITE_ROOT $CHERRYPY_ROOT $YUI_ROOT \
20                   $ZLIB_ROOT $EXPAT_ROOT $OPENSSEL_ROOT $BZ2LIB_ROOT $DB4_ROOT $GDBM_ROOT $PY2_FORMENCODE_ROOT \
21                   $PY2_CHEETAH_ROOT $PY2_PYCRYPTO_ROOT $PY2_CX_ORACLE_ROOT"
22 touch %i/etc/profile.d/dependencies-setup.csh
23 for pkg in $dependenciesRoots
24 do
25    echo $pkg
26    echo source $pkg/etc/profile.d/init.sh >> %i/etc/profile.d/dependencies-setup.sh
27    echo source $pkg/etc/profile.d/init.csh >> %i/etc/profile.d/dependencies-setup.csh
28 done
17  
18 < python Applications/SiteDB/Utilities/CreateSiteDB.py -p `pwd`/Applications/SiteDB/
18 > %build
19  
20   %install
21 < mkdir -p %i/etc
34 < mkdir -p %i/bin
21 > mkdir -p %i/{etc,bin}
22   mkdir -p %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
23 + mkdir -p %i/lib/perl
24 +
25 + cp -r SecurityModule/perl/lib/* %i/lib/perl
26 + rm -rf Applications Configuration Tools/StartupScripts SecurityModule/perl
27   cp -r * %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
28   cp cmsWeb %i/bin
29 < cat << \EOF_CHERRYPY_CONF > %i/etc/cherrypy.conf
30 < # Serve a complete directory
31 < [/Common]
32 < tools.staticdir.on = True
33 < tools.staticdir.dir = %i/Common
34 < [/Templates]
35 < tools.staticdir.on = True
36 < tools.staticdir.dir = %i/Templates
37 < # Serve a complete directory
38 < [/WEBTOOLS/Common]
39 < tools.staticdir.on = True
40 < tools.staticdir.dir = %i/Common
41 < [/WEBTOOLS/Templates]
51 < tools.staticdir.on = True
52 < tools.staticdir.dir = %i/Templates
53 < EOF_CHERRYPY_CONF
54 < cat << \EOF_APACHE2_HEADER > %i/etc/apache2-header.conf
55 < RewriteEngine On
56 < RewriteBase /cms/services
57 < EOF_APACHE2_HEADER
58 <
59 < cat << \EOF_APACHE2_CONF > %i/etc/apache2.conf
60 < <Directory %i/Common>
61 < Allow from all
62 < </Directory>
63 < <Directory %i/Templates>
64 < Allow from all
65 < </Directory>
66 < EOF_APACHE2_CONF
67 <
68 < cat << \EOF_APACHE2_FOOTER > %i/etc/apache2-footer.conf
69 < RewriteRule ^/cms/services/webtools/Common(.*)$ %i/Common$1
70 < RewriteRule ^/cms/services/webtools/Templates(.*)$ %i/Templates$1
71 < EOF_APACHE2_FOOTER
72 < %define pythonv %(echo $PYTHON_ROOT | cut -d. -f1,2)
29 >
30 > # Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment.
31 > mkdir -p %i/etc/profile.d
32 > : > %i/etc/profile.d/dependencies-setup.sh
33 > : > %i/etc/profile.d/dependencies-setup.csh
34 > for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do
35 >  root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root
36 >  if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then
37 >    echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
38 >    echo "test X\$$root != X || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
39 >  fi
40 > done
41 >
42   %post
43 < %{relocateConfig}etc/cherrypy.conf
75 < %{relocateConfig}etc/apache2.conf
76 < %{relocateConfig}etc/apache2-header.conf
77 < %{relocateConfig}etc/apache2-footer.conf
78 < %{relocateConfig}etc/profile.d/dependencies-setup.sh
79 < %{relocateConfig}etc/profile.d/dependencies-setup.csh
80 < %{relocateConfig}etc/lib/python2.4/site-packages/Applications/SiteDB/sitedb.ini
43 > %{relocateConfig}etc/profile.d/dependencies-setup.*sh
44   perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX/%pkgrel!" $RPM_INSTALL_PREFIX/%pkgrel/bin/cmsWeb
45 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines