]>
Commit | Line | Data |
---|---|---|
a29a256b ER |
1 | %define template varnish |
2 | Summary: Varnish Cache statistics template for Cacti | |
3 | Name: cacti-template-%{template} | |
16f65673 | 4 | Version: 5 |
89d2e5e3 | 5 | Release: 1 |
a29a256b ER |
6 | License: GPL v2 |
7 | Group: Applications/WWW | |
16f65673 ER |
8 | Source0: https://github.com/glensc/cacti-template-varnish/archive/v%{version}/%{template}-%{version}.tar.gz |
9 | # Source0-md5: 3ff32e25c6ea52ca46f4eda4139ea400 | |
10 | URL: https://github.com/glensc/cacti-template-varnish | |
f9b34109 | 11 | BuildRequires: rpm-pythonprov |
36ddf002 | 12 | BuildRequires: rpmbuild(macros) >= 1.554 |
26a31dc3 | 13 | Requires: cacti >= 0.8.7e-8 |
36ddf002 | 14 | Conflicts: cacti-spine < 0.8.7e-3 |
a29a256b ER |
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 | ||
a9e32588 | 25 | %prep |
16f65673 ER |
26 | %setup -qc |
27 | mv cacti-template-varnish-*/* -v . | |
f24437c0 | 28 | |
a29a256b ER |
29 | %install |
30 | rm -rf $RPM_BUILD_ROOT | |
31 | install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir}} | |
16f65673 ER |
32 | install -p get_varnish_stats.py $RPM_BUILD_ROOT%{scriptsdir} |
33 | cp -p *.xml $RPM_BUILD_ROOT%{resourcedir} | |
a29a256b ER |
34 | |
35 | %post | |
26a31dc3 | 36 | %cacti_import_template %{resourcedir}/cacti_host_template_varnish.xml |
a29a256b ER |
37 | |
38 | %clean | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | ||
41 | %files | |
42 | %defattr(644,root,root,755) | |
16f65673 | 43 | %doc README.md |
a29a256b ER |
44 | %attr(755,root,root) %{scriptsdir}/get_varnish_stats.py |
45 | %{resourcedir}/*.xml |