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.2 by eulisse, Mon Dec 18 11:16:29 2006 UTC vs.
Revision 1.43 by valya, Mon Sep 15 15:26:32 2008 UTC

# Line 1 | Line 1
1 < ### RPM cms webtools alpha
1 > ### RPM cms webtools 1.3.7
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
7 < %define cvstag HEAD
7 > %define cvstag V01-03-14
8   %define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
9   Source: %cvsserver&strategy=checkout&module=%{moduleName}&nocache=true&export=%{exportName}&tag=-r%{cvstag}&output=/%{moduleName}.tar.gz
10 <
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
11 > Provides: perl(CGI)
12 > Provides: perl(Crypt::CBC)
13 > Provides: perl(SecurityModule)
14 > Provides: perl(DBI)
15   %prep
16   %setup -n %{moduleName}
17   %build
18 + rm -rf %i/etc/profile.d
19 + mkdir -p %i/etc/profile.d
20 + mkdir -p %i/etc/init.d
21 + echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
22 + echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
23 + echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
24 + for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
25 + do
26 +    case X$tool in
27 +        Xdistcc|Xccache )
28 +        ;;
29 +        * )
30 +            toolcap=`echo $tool | tr a-z- A-Z_`
31 +            eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
32 +            eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
33 +        ;;
34 +    esac
35 + done
36 +
37 + perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
38 + perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
39   %install
40   mkdir -p %i/etc
41 < cp -r * %i
41 > mkdir -p %i/bin
42 > mkdir -p %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
43 > mkdir -p %i/lib/perl
44 >
45 > # copy init script
46 > cp Applications/SiteDB/initscripts/start.sh %{i}/etc/init.d/
47 > chmod a+x %{i}/etc/init.d/*
48 >
49 > rm -rf Applications Configuration
50 > cp -r SecurityModule/perl/lib/* %i/lib/perl
51 > cp -r * %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
52 > cp cmsWeb %i/bin
53 >
54   cat << \EOF_CHERRYPY_CONF > %i/etc/cherrypy.conf
55   # Serve a complete directory
56   [/Common]
57 < static_filter.on = True
58 < static_filter.dir = "%i/Common"
57 > tools.staticdir.on = True
58 > tools.staticdir.dir = %i/Common
59   [/Templates]
60 < static_filter.on = True
61 < static_filter.dir = "%i/Templates"
60 > tools.staticdir.on = True
61 > tools.staticdir.dir = %i/Templates
62 > # Serve a complete directory
63 > [/WEBTOOLS/Common]
64 > tools.staticdir.on = True
65 > tools.staticdir.dir = %i/Common
66 > [/WEBTOOLS/Templates]
67 > tools.staticdir.on = True
68 > tools.staticdir.dir = %i/Templates
69   EOF_CHERRYPY_CONF
23
70   cat << \EOF_APACHE2_HEADER > %i/etc/apache2-header.conf
71   RewriteEngine On
72   RewriteBase /cms/services
# Line 39 | Line 85 | cat << \EOF_APACHE2_FOOTER > %i/etc/apac
85   RewriteRule ^/cms/services/webtools/Common(.*)$ %i/Common$1
86   RewriteRule ^/cms/services/webtools/Templates(.*)$ %i/Templates$1
87   EOF_APACHE2_FOOTER
88 <
88 > %define pythonv %(echo $PYTHON_ROOT | cut -d. -f1,2)
89   %post
90   %{relocateConfig}etc/cherrypy.conf
91   %{relocateConfig}etc/apache2.conf
92   %{relocateConfig}etc/apache2-header.conf
93   %{relocateConfig}etc/apache2-footer.conf
94 + %{relocateConfig}etc/profile.d/dependencies-setup.sh
95 + %{relocateConfig}etc/profile.d/dependencies-setup.csh
96 + perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX/%pkgrel!" $RPM_INSTALL_PREFIX/%pkgrel/bin/cmsWeb
97 +
98 +
99 + # setup approripate links and made post install procedure
100 + . $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
101 + if [ `hostname`=="cmswttest.cern.ch" ]; then
102 + cat > $RPM_INSTALL_PREFIX/%{pkgrel}/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages/Tools/SiteDBCore/security.ini << POST_EOF
103 + [database]
104 + dbtype = sqlite
105 + dbname = $RPM_INSTALL_PREFIX/%{pkgrel}/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages/Tools/SiteDBCore/sitedb.db
106 + POST_EOF
107 + else
108 + if [ -n "${WEBTOOLS_CONF}" ] && [ -f ${WEBTOOLS_CONF}/sitedb/security.ini ]; then
109 + ln -s ${WEBTOOLS_CONF}/sitedb/security.ini $RPM_INSTALL_PREFIX/%{pkgrel}/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages/Tools/SiteDBCore/security.ini
110 + fi
111 + fi
112  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines