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.48 by valya, Mon Oct 13 15:17:22 2008 UTC

# Line 1 | Line 1
1 < ### RPM cms webtools 0.9.0
1 > ### RPM cms webtools 1.3.9
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 V00-09-00
7 > %define cvstag V01-03-19
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 < Requires: python cherrypy py2-cheetah yui sqlite zlib py2-pysqlite expat openssl bz2lib db4 gdbm py2-cx-oracle py2-formencode py2-pycrypto
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 > Requires: p5-crypt-cbc p5-crypt-blowfish
12   Provides: perl(CGI)
13   Provides: perl(Crypt::CBC)
14   Provides: perl(SecurityModule)
15 <
15 > Provides: perl(DBI)
16   %prep
17   %setup -n %{moduleName}
18   %build
15
19   rm -rf %i/etc/profile.d
20 < mkdir -p %i/etc/profile.d/
21 < dependenciesRoots="$PYTHON_ROOT $SQLITE_ROOT $PY2_PYSQLITE_ROOT $CHERRYPY_ROOT $YUI_ROOT \
22 <                   $ZLIB_ROOT $EXPAT_ROOT $OPENSSEL_ROOT $BZ2LIB_ROOT $DB4_ROOT $GDBM_ROOT $PY2_FORMENCODE_ROOT \
23 <                   $PY2_CHEETAH_ROOT $PY2_PYCRYPTO_ROOT $PY2_CX_ORACLE_ROOT"
24 < touch %i/etc/profile.d/dependencies-setup.csh
25 < for pkg in $dependenciesRoots
20 > mkdir -p %i/etc/profile.d
21 > mkdir -p %i/etc/init.d
22 > echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
23 > echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
24 > echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
25 > for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
26   do
27 <    echo $pkg
28 <    echo source $pkg/etc/profile.d/init.sh >> %i/etc/profile.d/dependencies-setup.sh
29 <    echo source $pkg/etc/profile.d/init.csh >> %i/etc/profile.d/dependencies-setup.csh
27 >    case X$tool in
28 >        Xdistcc|Xccache )
29 >        ;;
30 >        * )
31 >            toolcap=`echo $tool | tr a-z- A-Z_`
32 >            eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
33 >            eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
34 >        ;;
35 >    esac
36   done
37  
38 + perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
39 + perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
40   %install
41   mkdir -p %i/etc
42 < cp -r * %i
42 > mkdir -p %i/bin
43 > mkdir -p %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
44 > mkdir -p %i/lib/perl
45 >
46 > # copy init script
47 > cp Applications/SiteDB/initscripts/start.sh %{i}/etc/init.d/
48 > chmod a+x %{i}/etc/init.d/*
49 >
50 > rm -rf Applications Configuration
51 > cp -r SecurityModule/perl/lib/* %i/lib/perl
52 > cp -r * %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
53 > cp cmsWeb %i/bin
54 >
55   cat << \EOF_CHERRYPY_CONF > %i/etc/cherrypy.conf
56   # Serve a complete directory
57   [/Common]
# Line 63 | Line 86 | cat << \EOF_APACHE2_FOOTER > %i/etc/apac
86   RewriteRule ^/cms/services/webtools/Common(.*)$ %i/Common$1
87   RewriteRule ^/cms/services/webtools/Templates(.*)$ %i/Templates$1
88   EOF_APACHE2_FOOTER
89 <
89 > %define pythonv %(echo $PYTHON_ROOT | cut -d. -f1,2)
90   %post
91   %{relocateConfig}etc/cherrypy.conf
92   %{relocateConfig}etc/apache2.conf
# Line 71 | Line 94 | EOF_APACHE2_FOOTER
94   %{relocateConfig}etc/apache2-footer.conf
95   %{relocateConfig}etc/profile.d/dependencies-setup.sh
96   %{relocateConfig}etc/profile.d/dependencies-setup.csh
97 < perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX/%pkgrel!" $RPM_INSTALL_PREFIX/%pkgrel/cmsWeb
97 > perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX/%pkgrel!" $RPM_INSTALL_PREFIX/%pkgrel/bin/cmsWeb
98 >
99 >
100 > # setup approripate links and made post install procedure
101 > . $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
102 > if [ `hostname`=="cmswttest.cern.ch" ]; then
103 > cat > $RPM_INSTALL_PREFIX/%{pkgrel}/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages/Tools/SiteDBCore/security.ini << POST_EOF
104 > [database]
105 > dbtype = sqlite
106 > dbname = $RPM_INSTALL_PREFIX/%{pkgrel}/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages/Tools/SiteDBCore/sitedb.db
107 > POST_EOF
108 > else
109 > if [ -n "${WEBTOOLS_CONF}" ] && [ -f ${WEBTOOLS_CONF}/sitedb/security.ini ]; then
110 > 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
111 > fi
112 > fi
113  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines