1 |
< |
### cms frontend 1.0 |
2 |
< |
|
3 |
< |
# Dummy package to get apache-conf installed. |
4 |
< |
Source: none |
1 |
> |
### RPM cms frontend 1.1e |
2 |
> |
%define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&strategy=export&nocache=true |
3 |
> |
Source0: %cvsserver&module=COMP/WEBTOOLS/Configuration&export=conf&tag=-rFRONTEND_CONF_1_1&output=/config.tar.gz |
4 |
> |
Source1: %cvsserver&module=COMP/WEBTOOLS/WelcomePages&export=htdocs&tag=-rFRONTEND_HTDOCS_1_0&output=/htdocs.tar.gz |
5 |
> |
Requires: apache2-conf |
6 |
> |
Obsoletes: cms+frontend+1.1d-cmp |
7 |
> |
Obsoletes: cms+frontend+1.1c-cmp |
8 |
> |
Obsoletes: cms+frontend+1.1b-cmp |
9 |
> |
Obsoletes: cms+frontend+1.1-cmp |
10 |
> |
Obsoletes: cms+frontend+1.0-cmp11 |
11 |
> |
Obsoletes: cms+frontend+1.0-cmp10 |
12 |
> |
Obsoletes: cms+frontend+1.0-cmp9 |
13 |
> |
Obsoletes: cms+frontend+1.0-cmp8 |
14 |
> |
Obsoletes: cms+frontend+1.0-cmp7 |
15 |
> |
Obsoletes: cms+frontend+1.0-cmp6 |
16 |
> |
Obsoletes: cms+frontend+1.0-cmp5 |
17 |
> |
Obsoletes: cms+frontend+1.0-cmp4 |
18 |
> |
Obsoletes: cms+frontend+1.0-cmp3 |
19 |
> |
Obsoletes: cms+frontend+1.0-cmp2 |
20 |
> |
Obsoletes: cms+frontend+1.0-cmp |
21 |
|
|
22 |
|
%prep |
23 |
+ |
%setup -T -b 0 -n conf |
24 |
+ |
%setup -D -T -b 1 -n htdocs |
25 |
+ |
|
26 |
|
%build |
27 |
|
%install |
28 |
+ |
# Make directory for various resources of this package. |
29 |
+ |
rm -fr %instroot/htdocs/* |
30 |
+ |
rm -fr %instroot/apache2/*rewrites.d |
31 |
+ |
rm -f %instroot/apache2/apps.d/*frontend.conf |
32 |
+ |
|
33 |
+ |
mkdir -p %instroot/apache2/apps.d |
34 |
+ |
mkdir -p %instroot/apache2/rewrites.d |
35 |
+ |
mkdir -p %instroot/apache2/ssl_rewrites.d |
36 |
+ |
mkdir -p %instroot/apache2/htdocs |
37 |
+ |
|
38 |
+ |
# Replace template variables in configuration files with actual paths. |
39 |
+ |
perl -p -i -e "s|\@SERVER_ROOT\@|%instroot/apache2|g;s|\@APACHE2_ROOT\@|$APACHE2_ROOT|g;" %_builddir/conf/*/*.conf |
40 |
+ |
|
41 |
+ |
# Copy files to the server setup directory. |
42 |
+ |
cp -p %_builddir/conf/apps.d/*frontend.conf %instroot/apache2/apps.d |
43 |
+ |
cp -p %_builddir/conf/rewrites.d/*.conf %instroot/apache2/rewrites.d |
44 |
+ |
cp -p %_builddir/conf/ssl_rewrites.d/*.conf %instroot/apache2/ssl_rewrites.d |
45 |
+ |
cp -rp %_builddir/htdocs/* %instroot/apache2/htdocs |
46 |
+ |
|
47 |
+ |
%post |
48 |
+ |
# Relocate files. |
49 |
+ |
perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/apache2/*.d/*.conf |
50 |
+ |
|
51 |
+ |
# Deter attempts to modify installed files locally. |
52 |
+ |
chmod a-w $RPM_INSTALL_PREFIX/apache2/*.d/*.conf |
53 |
+ |
|
54 |
+ |
%files |
55 |
+ |
%i/ |
56 |
+ |
%dir %instroot/apache2/rewrites.d |
57 |
+ |
%dir %instroot/apache2/ssl_rewrites.d |
58 |
+ |
%attr(444,-,-) %instroot/apache2/apps.d/*frontend.conf |
59 |
+ |
%attr(444,-,-) %instroot/apache2/rewrites.d/*.conf |
60 |
+ |
%attr(444,-,-) %instroot/apache2/ssl_rewrites.d/*.conf |
61 |
+ |
%instroot/apache2/htdocs/* |