]>
Commit | Line | Data |
---|---|---|
de02bf48 ER |
1 | %define template apache |
2 | Summary: Apache Stats | |
3 | Name: cacti-template-%{template} | |
4 | Version: 0.6 | |
eb5dae34 | 5 | Release: 1 |
de02bf48 ER |
6 | License: GPL v2 |
7 | Group: Applications/WWW | |
8 | Source0: http://forums.cacti.net/download/file.php?id=301#/apachestats-0.4.zip | |
9 | # Source0-md5: 6d032addcc40db63c279fdcb2dbcb786 | |
10 | Source1: http://forums.cacti.net/download/file.php?id=7674#/ss_apache_stats-wget.zip | |
11 | # Source1-md5: cb460f3c00707dcb960efe8c4ceff0c1 | |
12 | Source2: http://forums.cacti.net/download/file.php?id=7534#/SS_Apache_Stats-curl.zip | |
13 | # Source2-md5: 71112bf32403e548120b3b76eadd5a75 | |
14 | URL: http://forums.cacti.net/about17995.html | |
15 | BuildRequires: rpmbuild(macros) >= 1.554 | |
16 | Requires: cacti >= 0.8.7g-6 | |
17 | BuildArch: noarch | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %define _sysconfdir /etc/webapps/cacti | |
21 | %define cactidir /usr/share/cacti | |
22 | %define resourcedir %{cactidir}/resource | |
23 | %define scriptsdir %{cactidir}/scripts | |
24 | ||
25 | %description | |
26 | Apache Stats for Cacti (PHP Script Server Version). | |
27 | ||
28 | %prep | |
29 | %setup -qc -a1 -a2 | |
30 | mv apachestats-0.4/* . | |
31 | ||
32 | %install | |
33 | rm -rf $RPM_BUILD_ROOT | |
34 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{resourcedir},%{scriptsdir}} | |
35 | install -p ss_apache_stats.php $RPM_BUILD_ROOT%{scriptsdir} | |
eb5dae34 | 36 | cp -a SS_Apache_Stats/cacti_host_template_webserver_apache_5min.xml \ |
de02bf48 ER |
37 | $RPM_BUILD_ROOT%{resourcedir} |
38 | ||
39 | %post | |
eb5dae34 | 40 | %cacti_import_template %{resourcedir}/cacti_host_template_webserver_apache_5min.xml |
de02bf48 ER |
41 | |
42 | %clean | |
43 | rm -rf $RPM_BUILD_ROOT | |
44 | ||
45 | %files | |
46 | %defattr(644,root,root,755) | |
eb5dae34 | 47 | %doc README.txt docs/* |
de02bf48 ER |
48 | %attr(755,root,root) %{scriptsdir}/* |
49 | %{resourcedir}/*.xml |