]>
Commit | Line | Data |
---|---|---|
ee463545 ER |
1 | %define template mailgraph |
2 | Summary: Mailgraph statistics template for Cacti | |
3 | Name: cacti-template-%{template} | |
4 | Version: 0.1 | |
18ee158b | 5 | Release: 0.3 |
ee463545 ER |
6 | License: GPL v2 |
7 | Group: Applications/WWW | |
8 | Source0: cacti_data_template_postfix_processing_mailgraph.xml | |
9 | Source1: cacti_data_template_postfix_processing_virus_mailgraph.xml | |
10 | Source2: cacti_graph_template_postfix_processing_mailgraph.xml | |
18ee158b | 11 | Source3: README |
ee463545 ER |
12 | URL: http://forums.cacti.net/about1571.html |
13 | BuildRequires: rpmbuild(macros) >= 1.554 | |
14 | Requires: cacti | |
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 - Mail statistics via mailgraph rrd files. | |
24 | ||
25 | %prep | |
26 | %setup -qcT | |
27 | cp -a %{SOURCE0} . | |
28 | cp -a %{SOURCE1} . | |
29 | cp -a %{SOURCE2} . | |
18ee158b | 30 | cp -a %{SOURCE3} . |
ee463545 ER |
31 | |
32 | %install | |
33 | rm -rf $RPM_BUILD_ROOT | |
34 | install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir}} | |
35 | cp -a *.xml $RPM_BUILD_ROOT%{resourcedir} | |
36 | ||
37 | %post | |
38 | %cacti_import_template %{resourcedir}/cacti_data_template_postfix_processing_mailgraph.xml | |
39 | %cacti_import_template %{resourcedir}/cacti_data_template_postfix_processing_virus_mailgraph.xml | |
40 | %cacti_import_template %{resourcedir}/cacti_graph_template_postfix_processing_mailgraph.xml | |
41 | ||
42 | %clean | |
43 | rm -rf $RPM_BUILD_ROOT | |
44 | ||
45 | %files | |
46 | %defattr(644,root,root,755) | |
18ee158b | 47 | %doc README |
ee463545 | 48 | %{resourcedir}/*.xml |