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.9 by eulisse, Fri Mar 30 14:13:07 2007 UTC vs.
Revision 1.37 by metson, Tue Jun 3 16:01:30 2008 UTC

# Line 1 | Line 1
1 < ### RPM cms webtools 0.9.0
1 > ### RPM cms webtools 1.3.3
2 > ## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages
3   %define moduleName WEBTOOLS
4   %define exportName WEBTOOLS
5 < %define cvstag V00-09-00
5 > %define cvstag V01-03-08
6   %define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
7   Source: %cvsserver&strategy=checkout&module=%{moduleName}&nocache=true&export=%{exportName}&tag=-r%{cvstag}&output=/%{moduleName}.tar.gz
8 < Requires: python cherrypy py2-cheetah yui sqlite zlib py2-pysqlite expat openssl bz2lib db4 gdbm py2-cx-oracle py2-formencode py2-pycrypto
8 > 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
9   Provides: perl(CGI)
10   Provides: perl(Crypt::CBC)
11   Provides: perl(SecurityModule)
12 <
12 > Provides: perl(DBI)
13   %prep
14   %setup -n %{moduleName}
15   %build
15
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
17 > mkdir -p %i/etc/profile.d
18 > echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
19 > echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
20 > echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
21 > for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
22   do
23 <    echo $pkg
24 <    echo source $pkg/etc/profile.d/init.sh >> %i/etc/profile.d/dependencies-setup.sh
25 <    echo source $pkg/etc/profile.d/init.csh >> %i/etc/profile.d/dependencies-setup.csh
23 >    case X$tool in
24 >        Xdistcc|Xccache )
25 >        ;;
26 >        * )
27 >            toolcap=`echo $tool | tr a-z- A-Z_`
28 >            eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
29 >            eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
30 >        ;;
31 >    esac
32   done
33  
34 + perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
35 + perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
36   %install
37   mkdir -p %i/etc
38 < cp -r * %i
38 > mkdir -p %i/bin
39 > mkdir -p %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
40 > rm -rf Applications Configuration
41 > cp -r * %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
42 > cp cmsWeb %i/bin
43   cat << \EOF_CHERRYPY_CONF > %i/etc/cherrypy.conf
44   # Serve a complete directory
45   [/Common]
# Line 63 | Line 74 | cat << \EOF_APACHE2_FOOTER > %i/etc/apac
74   RewriteRule ^/cms/services/webtools/Common(.*)$ %i/Common$1
75   RewriteRule ^/cms/services/webtools/Templates(.*)$ %i/Templates$1
76   EOF_APACHE2_FOOTER
77 <
77 > %define pythonv %(echo $PYTHON_ROOT | cut -d. -f1,2)
78   %post
79   %{relocateConfig}etc/cherrypy.conf
80   %{relocateConfig}etc/apache2.conf
# Line 71 | Line 82 | EOF_APACHE2_FOOTER
82   %{relocateConfig}etc/apache2-footer.conf
83   %{relocateConfig}etc/profile.d/dependencies-setup.sh
84   %{relocateConfig}etc/profile.d/dependencies-setup.csh
85 < perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX/%pkgrel!" $RPM_INSTALL_PREFIX/%pkgrel/cmsWeb
85 > perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX/%pkgrel!" $RPM_INSTALL_PREFIX/%pkgrel/bin/cmsWeb
86 >
87 >
88 > # setup approripate links and made post install procedure
89 > . $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
90 > if [ `hostname`=="cmswttest.cern.ch" ]; then
91 > cat > $RPM_INSTALL_PREFIX/%{pkgrel}/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages/Tools/SiteDBCore/security.ini << POST_EOF
92 > [database]
93 > dbtype = sqlite
94 > dbname = $RPM_INSTALL_PREFIX/%{pkgrel}/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages/Tools/SiteDBCore/sitedb.db
95 > POST_EOF
96 > else
97 > if [ -n "${WEBTOOLS_CONF}" ] && [ -f ${WEBTOOLS_CONF}/sitedb/security.ini ]; then
98 > 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
99 > fi
100 > fi
101  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines