ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/PHEDEX-web.spec
Revision: 1.8
Committed: Tue Oct 7 10:33:13 2008 UTC (16 years, 6 months ago) by egeland
Branch: MAIN
CVS Tags: MotT0_1_0_2, MotT0_1_0_1, MotT0_1_0_0, MotT0_100531_1, MotT0_100528_1, T0Mon_100518_1, T0Mon_100503_1, T0Mon_100316_1, T0Mon_100308_2, T0Mon_100308_1, T0Mon_100216_1, T0Mon_100210_1, T0Mon_100204_4, T0Mon_100204_3, T0Mon_100204_1, T0Mon_100127_1, T0Mon_091111_1, T0Mon_090828_1, T0Mon_090822_1, T0Mon_090715_1, T0Mon_090612_1, T0Mon_090611_1, T0Mon_090610_1, T0Mon_090601_1, T0Mon_090527_2, T0Mon_090527_1, T0Mon_090522_1, T0Mon_090519_2, T0Mon_090519_1, T0Mon_090517_1, T0Mon_090516_1, T0Mon_090515_4, T0Mon_090515_3, T0Mon_090515_2, T0Mon_090515_1, forPHEDEX320pre1, T0Mon_090510_1, T0Mon_090406_1, T0Mon_090326_1, T0Mon_090325_1, T0Mon_090318_1, T0Mon_090315_1, forPHEDEX313a, T0Mon_090303_1, forPHEDEX313, forPHEDEX312, forPHEDEX311, forPHEDEX310, forPHEDEX310pre2, forPHEDEX310pre1, testofc, T0Mon_081107_1, T0Mon_081105_1, forPHEDEX307, forPHEDEX-web-services-20081008, forPHEDEX-web-services-20081007
Changes since 1.7: +1 -1 lines
Log Message:
remove useless slash

File Contents

# User Rev Content
1 egeland 1.6 ### RPM cms PHEDEX-web WEB_3_0_2
2 egeland 1.1 #
3     ## INITENV +PATH PERL5LIB %i/perl_lib
4     %define downloadn %(echo %n | cut -f1 -d-)
5 egeland 1.3 %define nversion %(echo %v | sed 's|WEB_||' | sed 's|_|.|g')
6     %define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
7 egeland 1.1
8 egeland 1.7 Source: %cvsserver&strategy=checkout&module=%{downloadn}&export=%{downloadn}&&tag=-r%{v}&output=/%{n}.tar.gz
9 egeland 1.1 Requires: oracle oracle-env p5-time-hires p5-text-glob p5-compress-zlib p5-dbi p5-dbd-oracle p5-xml-parser
10 egeland 1.2 Requires: p5-monalisa-apmon p5-poe p5-cgi p5-cgi-session p5-json-xs p5-apache-dbi p5-sort-key
11 egeland 1.4 Requires: py2-pil py2-matplotlib py2-numpy libjpg
12 egeland 1.7 Requires: apache2-conf mod_perl2 webtools dbs-client
13 egeland 1.1
14     # Actually, it is p5-xml-parser that requires this, but it doesn't configure itself correctly
15     # This is so it gets into our dependencies-setup.sh
16     Requires: expat
17    
18     # Provided by system perl
19     Provides: perl(HTML::Entities)
20     Provides: perl(DB_File)
21     Provides: perl(XML::LibXML)
22    
23 egeland 1.7 # We obsolete each previous release to force them to be removed
24     Obsoletes: cms+PHEDEX-web+WEB_3_0_1
25     Obsoletes: cms+PHEDEX-web+WEB_3_0_0
26    
27 egeland 1.1 %prep
28 egeland 1.7 %setup -n PHEDEX
29 egeland 1.1
30     %build
31     %install
32     tar -cf - * | (cd %i && tar -xf -)
33    
34 egeland 1.7 rm -f %instroot/apache2/startenv.d/phedexweb-env.sh
35     rm -f %instroot/apache2/apps.d/phedexweb-httpd.conf
36    
37 egeland 1.1 # Switch template variables in the configuration files
38 egeland 1.7 perl -p -i -e "s|\@PHEDEX_ROOT\@|%i|g;
39 egeland 1.8 s|\@SERVER_ROOT\@|%instroot/apache2|g;
40 egeland 1.7 s|\@MOD_PERL_LIB\@|$MOD_PERL2_ROOT/modules/mod_perl.so|g;" \
41     %i/Documentation/WebConfig/* \
42     %i/Documentation/WebSite/PlotConfig/config/*
43 egeland 1.1
44     # Copy dependencies to dependencies-setup.sh
45     mkdir -p %i/etc/profile.d
46     for x in %pkgreqs; do
47     case $x in /* ) continue ;; esac
48     p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/')
49     echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
50     echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
51     done
52    
53 egeland 1.4 # cp startup scripts to /bin
54     mkdir -p %i/bin
55     cp %i/Documentation/WebConfig/cmsweb_phedex* %i/bin
56    
57 egeland 1.1 %post
58 egeland 1.7 # Relocate the package
59 egeland 1.1 %{relocateConfig}Documentation/WebConfig/phedexweb-httpd.conf
60     %{relocateConfig}Documentation/WebConfig/phedexweb-app.conf
61     %{relocateConfig}Documentation/WebConfig/phedexweb-secmod.conf
62 egeland 1.4 %{relocateConfig}Documentation/WebSite/PlotConfig/config/cherrypy_prod.conf
63     %{relocateConfig}bin/cmsweb_phedex
64     %{relocateConfig}bin/cmsweb_phedex_graphs
65 egeland 1.1 %{relocateConfig}etc/profile.d/dependencies-setup.sh
66     %{relocateConfig}etc/profile.d/dependencies-setup.csh
67 egeland 1.7
68     # Copy files to apache2 directory
69     cp -p $RPM_INSTALL_PREFIX/%{pkgrel}/Documentation/WebConfig/phedexweb-httpd.conf $RPM_INSTALL_PREFIX/apache2/apps.d
70     cp -p $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh $RPM_INSTALL_PREFIX/apache2/startenv.d/phedexweb-env.sh
71    
72     # Relocate those files
73     #perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" \
74     # $RPM_INSTALL_PREFIX/apache2/apps.d/phedexweb-httpd.conf \
75     # $RPM_INSTALL_PREFIX/apache2/startenv.d/phedexweb-env.sh
76    
77     %files
78     %i/
79     # %files processed before %post? listing these files causes a build failure
80     # %attr(444,-,-) %config %instroot/apache2/apps.d/phedexweb-httpd.conf
81     # %attr(444,-,-) %config %instroot/apache2/startenv.d/phedexweb-env.sh