]>
Commit | Line | Data |
---|---|---|
64e40e56 ER |
1 | %define plugin check_mysql-heartbeat |
2 | %define php_min_version 5.0.0 | |
3 | %include /usr/lib/rpm/macros.php | |
1e4e0308 | 4 | Summary: Nagios/Icinga plugin to check MySQL heartbeat |
0d868cd5 | 5 | Name: monitoring-plugin-%{plugin} |
1e4e0308 | 6 | Version: 1.1 |
531faa63 | 7 | Release: 2 |
64e40e56 ER |
8 | License: GPL v2 |
9 | Group: Networking | |
1e4e0308 ER |
10 | Source0: %{plugin}.sh |
11 | Source1: %{plugin}.cfg | |
64e40e56 ER |
12 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
13 | Requires: nagios-common | |
14 | Requires: nagios-plugins-libs | |
531faa63 | 15 | Obsoletes: nagios-plugin-check_mysql-heartbeat < 1.1 |
64e40e56 ER |
16 | BuildArch: noarch |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %define _sysconfdir /etc/nagios/plugins | |
20 | %define plugindir %{_prefix}/lib/nagios/plugins | |
21 | ||
64e40e56 | 22 | %description |
1e4e0308 | 23 | Nagios/Icinga plugin to check MySQL heartbeat with maatkit or |
0498be4d | 24 | percona-toolkit. |
64e40e56 ER |
25 | |
26 | %prep | |
64e40e56 | 27 | %setup -qTc |
c97836d2 ER |
28 | cp -p %{SOURCE0} . |
29 | cp -p %{SOURCE1} . | |
64e40e56 ER |
30 | |
31 | %install | |
32 | rm -rf $RPM_BUILD_ROOT | |
33 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}} | |
8c35b54f | 34 | install -p %{plugin}.sh $RPM_BUILD_ROOT%{plugindir}/%{plugin} |
64e40e56 ER |
35 | cp -p %{plugin}.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg |
36 | ||
37 | %clean | |
38 | rm -rf $RPM_BUILD_ROOT | |
39 | ||
40 | %files | |
41 | %defattr(644,root,root,755) | |
42 | %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg | |
43 | %attr(755,root,root) %{plugindir}/%{plugin} |