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