1 |
< |
### RPM cms webtools ALPHA-cp3 |
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 |
4 |
< |
%define cvstag V00-09-00 |
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 |
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} |
17 |
+ |
|
18 |
|
%build |
19 |
+ |
|
20 |
|
%install |
21 |
< |
mkdir -p %i/etc |
22 |
< |
cp -r * %i |
23 |
< |
cat << \EOF_CHERRYPY_CONF > %i/etc/cherrypy.conf |
24 |
< |
# Serve a complete directory |
25 |
< |
[/Common] |
26 |
< |
tools.staticdir.on = True |
27 |
< |
tools.staticdir.dir = %i/Common |
28 |
< |
[/Templates] |
29 |
< |
tools.staticdir.on = True |
30 |
< |
tools.staticdir.dir = %i/Templates |
31 |
< |
# Serve a complete directory |
32 |
< |
[/WEBTOOLS/Common] |
33 |
< |
tools.staticdir.on = True |
34 |
< |
tools.staticdir.dir = %i/Common |
35 |
< |
[/WEBTOOLS/Templates] |
36 |
< |
tools.staticdir.on = True |
37 |
< |
tools.staticdir.dir = %i/Templates |
38 |
< |
EOF_CHERRYPY_CONF |
39 |
< |
cat << \EOF_APACHE2_HEADER > %i/etc/apache2-header.conf |
40 |
< |
RewriteEngine On |
32 |
< |
RewriteBase /cms/services |
33 |
< |
EOF_APACHE2_HEADER |
34 |
< |
|
35 |
< |
cat << \EOF_APACHE2_CONF > %i/etc/apache2.conf |
36 |
< |
<Directory %i/Common> |
37 |
< |
Allow from all |
38 |
< |
</Directory> |
39 |
< |
<Directory %i/Templates> |
40 |
< |
Allow from all |
41 |
< |
</Directory> |
42 |
< |
EOF_APACHE2_CONF |
43 |
< |
|
44 |
< |
cat << \EOF_APACHE2_FOOTER > %i/etc/apache2-footer.conf |
45 |
< |
RewriteRule ^/cms/services/webtools/Common(.*)$ %i/Common$1 |
46 |
< |
RewriteRule ^/cms/services/webtools/Templates(.*)$ %i/Templates$1 |
47 |
< |
EOF_APACHE2_FOOTER |
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 |
> |
|
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 |
44 |
< |
%{relocateConfig}etc/apache2.conf |
52 |
< |
%{relocateConfig}etc/apache2-header.conf |
53 |
< |
%{relocateConfig}etc/apache2-footer.conf |
54 |
< |
|
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 |
|
|