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