]>
Commit | Line | Data |
---|---|---|
b2ebf224 ER |
1 | %define template php-fpm |
2 | %include /usr/lib/rpm/macros.perl | |
33301c5f | 3 | Summary: PHP-FPM Pool Status template for Cacti |
b2ebf224 | 4 | Name: cacti-template-%{template} |
2aa516fc ER |
5 | Version: 0.5 |
6 | Release: 1 | |
b2ebf224 ER |
7 | License: GPL v2 |
8 | Group: Applications/WWW | |
2aa516fc ER |
9 | Source0: https://github.com/glensc/cacti-template-php-fpm/archive/%{version}/%{template}-%{version}.tar.gz |
10 | # Source0-md5: fb03ca4d5246e7d7ac7477674b16746d | |
35bb28cc | 11 | URL: https://github.com/glensc/cacti-template-php-fpm |
b2ebf224 | 12 | BuildRequires: rpm-perlprov >= 4.1-13 |
33301c5f ER |
13 | BuildRequires: rpmbuild(macros) >= 1.654 |
14 | Requires: cacti >= 0.8.8a | |
15 | Suggests: perl-FCGI-Client | |
35f45764 | 16 | Suggests: perl-Moose |
33301c5f | 17 | Suggests: perl-libwww |
b2ebf224 ER |
18 | BuildArch: noarch |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define cactidir /usr/share/cacti | |
22 | %define resourcedir %{cactidir}/resource | |
23 | %define scriptsdir %{cactidir}/scripts | |
24 | ||
25 | %description | |
33301c5f | 26 | PHP-FPM Pool Status template for Cacti. |
b2ebf224 ER |
27 | |
28 | %prep | |
33301c5f | 29 | %setup -q |
b2ebf224 ER |
30 | |
31 | %install | |
32 | rm -rf $RPM_BUILD_ROOT | |
33 | install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir}} | |
35bb28cc | 34 | install -p get_php_fpm_status.pl $RPM_BUILD_ROOT%{scriptsdir} |
33301c5f | 35 | cp -p cacti_graph_template_php-fpm_pool_status.xml $RPM_BUILD_ROOT%{resourcedir} |
b2ebf224 ER |
36 | |
37 | %post | |
33301c5f | 38 | %cacti_import_template %{resourcedir}/cacti_graph_template_php-fpm_pool_status.xml |
b2ebf224 ER |
39 | |
40 | %clean | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | ||
43 | %files | |
44 | %defattr(644,root,root,755) | |
35bb28cc ER |
45 | %doc README.md |
46 | %attr(755,root,root) %{scriptsdir}/get_php_fpm_status.pl | |
b2ebf224 | 47 | %{resourcedir}/*.xml |