forked from ganglia/ganglia-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ganglia-web.spec.in
66 lines (56 loc) · 2.18 KB
/
ganglia-web.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Summary: Ganglia Web Frontend
Name: ganglia-web
Version: @GWEB_VERSION@
URL: http://ganglia.info
Release: 1
License: BSD
Vendor: Ganglia Development Team <[email protected]>
Group: System Environment/Base
Source: %{name}-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}-%{version}-buildroot
Obsoletes: ganglia-webfrontend
Requires: php >= 5, php-gd
%if 0%{?suse_version}
%define web_prefixdir /srv/www/htdocs/ganglia
%else
%define web_prefixdir %{custom_web_prefixdir}
%endif
%{!?custom_web_prefixdir: %define web_prefixdir /var/www/html/ganglia}
Prefix: %{web_prefixdir}
BuildArchitectures: noarch
%description
This package provides a web frontend to display the XML tree published by
ganglia, and to provide historical graphs of collected metrics. This website is
written in the PHP5 language and uses the Dwoo templating engine.
%prep
%setup -n %{name}-%{version}
%build
%install
# Flush any old RPM build root
%__rm -rf $RPM_BUILD_ROOT
%__mkdir -p $RPM_BUILD_ROOT/%{web_prefixdir}
%__cp -rf * $RPM_BUILD_ROOT/%{web_prefixdir}
%__rm -rf $RPM_BUILD_ROOT/%{web_prefixdir}/conf
%__install -d -m 0755 $RPM_BUILD_ROOT@varstatedir@/ganglia/filters
%__install -d -m 0755 $RPM_BUILD_ROOT@varstatedir@/ganglia/conf
%__cp -rf conf/* $RPM_BUILD_ROOT@varstatedir@/ganglia/conf
%__install -d -m 0755 $RPM_BUILD_ROOT@varstatedir@/ganglia/dwoo
%__install -d -m 0755 $RPM_BUILD_ROOT@varstatedir@/ganglia/dwoo/compiled
%__install -d -m 0755 $RPM_BUILD_ROOT@varstatedir@/ganglia/dwoo/cache
%files
%defattr(-,root,root)
%attr(0755,nobody,nobody)@varstatedir@/ganglia/filters
%attr(0755,@varapacheuser@,@varapacheuser@)@varstatedir@/ganglia/conf
%attr(0755,@varapacheuser@,@varapacheuser@)@varstatedir@/ganglia/dwoo
%attr(0755,@varapacheuser@,@varapacheuser@)@varstatedir@/ganglia/dwoo/compiled
%attr(0755,@varapacheuser@,@varapacheuser@)@varstatedir@/ganglia/dwoo/cache
%{web_prefixdir}/*
/var/lib/ganglia/conf/*
%config(noreplace) %{web_prefixdir}/conf_default.php
%clean
%__rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Mar 17 2011 Bernard Li <[email protected]>
- Renamed conf.php -> conf_default.php
* Fri Dec 17 2010 Bernard Li <[email protected]>
- Spec file for gweb which is split from ganglia-web subpackage