]> git.pld-linux.org Git - packages/cacti-template-varnish.git/blob - cacti-template-varnish.spec
- use rpm macros for cacti_import_template
[packages/cacti-template-varnish.git] / cacti-template-varnish.spec
1 %define         template        varnish
2 Summary:        Varnish Cache statistics template for Cacti
3 Name:           cacti-template-%{template}
4 Version:        0.0.3
5 Release:        0.5
6 License:        GPL v2
7 Group:          Applications/WWW
8 Source1:        get_varnish_stats.py
9 Source2:        cacti_host_template_varnish.xml
10 URL:            http://forums.cacti.net/viewtopic.php?p=182152
11 BuildRequires:  rpmbuild(macros) >= 1.554
12 Requires:       cacti >= 0.8.7e-8
13 Conflicts:      cacti-spine < 0.8.7e-3
14 BuildArch:      noarch
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17 %define         cactidir                /usr/share/cacti
18 %define         resourcedir             %{cactidir}/resource
19 %define         scriptsdir              %{cactidir}/scripts
20
21 %description
22 Template for Cacti - Varnish Cache statistics.
23
24 Uses advanced template from
25 <http://forums.cacti.net/viewtopic.php?p=182152>
26
27 Combines script to pull data via varnish telnet port from
28 <http://forums.cacti.net/viewtopic.php?t=31260>
29
30 %prep
31 %setup -qcT
32
33 %install
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir}}
36 install -p %{SOURCE1} $RPM_BUILD_ROOT%{scriptsdir}
37 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{resourcedir}
38
39 %post
40 %cacti_import_template %{resourcedir}/cacti_host_template_varnish.xml
41
42 %clean
43 rm -rf $RPM_BUILD_ROOT
44
45 %files
46 %defattr(644,root,root,755)
47 %attr(755,root,root) %{scriptsdir}/get_varnish_stats.py
48 %{resourcedir}/*.xml
This page took 0.0497570000000001 seconds and 3 git commands to generate.