]>
Commit | Line | Data |
---|---|---|
1 | %define template varnish | |
2 | Summary: Varnish Cache statistics template for Cacti | |
3 | Name: cacti-template-%{template} | |
4 | Version: 3 | |
5 | Release: 1 | |
6 | License: GPL v2 | |
7 | Group: Applications/WWW | |
8 | Source1: get_varnish_stats.py | |
9 | Source2: cacti_host_template_varnish.xml | |
10 | Source3: README | |
11 | URL: http://forums.cacti.net/viewtopic.php?p=182152 | |
12 | BuildRequires: rpmbuild(macros) >= 1.554 | |
13 | Requires: cacti >= 0.8.7e-8 | |
14 | Conflicts: cacti-spine < 0.8.7e-3 | |
15 | BuildArch: noarch | |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | %define cactidir /usr/share/cacti | |
19 | %define resourcedir %{cactidir}/resource | |
20 | %define scriptsdir %{cactidir}/scripts | |
21 | ||
22 | %description | |
23 | Template for Cacti - Varnish Cache statistics. | |
24 | ||
25 | %prep | |
26 | %setup -qcT | |
27 | cp -a %{SOURCE3} . | |
28 | ||
29 | %install | |
30 | rm -rf $RPM_BUILD_ROOT | |
31 | install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir}} | |
32 | install -p %{SOURCE1} $RPM_BUILD_ROOT%{scriptsdir} | |
33 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{resourcedir} | |
34 | ||
35 | %post | |
36 | %cacti_import_template %{resourcedir}/cacti_host_template_varnish.xml | |
37 | ||
38 | %clean | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | ||
41 | %files | |
42 | %defattr(644,root,root,755) | |
43 | %doc README | |
44 | %attr(755,root,root) %{scriptsdir}/get_varnish_stats.py | |
45 | %{resourcedir}/*.xml |