]>
Commit | Line | Data |
---|---|---|
04a0f80e ER |
1 | %define plugin snmp_tcp_connection_status |
2 | Summary: Plugin for Cacti - TCP Connection Status | |
3 | Name: cacti-plugin-%{plugin} | |
4 | Version: 0.1 | |
5 | Release: 0.2 | |
6 | License: GPL v2 | |
7 | Group: Applications/WWW | |
8 | # Source0Download: http://forums.cacti.net/download.php?id=5198 | |
9 | Source0: tcp-connections.zip | |
10 | # Source0-md5: 72fd9adfafcecec0b6f5a23ec6db8e57 | |
11 | Source1: %{name}.sh | |
12 | URL: http://forums.cacti.net/viewtopic.php?t=12766 | |
13 | BuildRequires: sed >= 4.0 | |
14 | Requires: cacti >= 0.8.6j | |
15 | Requires: cacti-add_template | |
16 | Requires: net-snmp-utils | |
17 | BuildArch: noarch | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %define cactidir /usr/share/cacti | |
21 | %define resourcedir %{cactidir}/resource | |
22 | %define scriptsdir %{cactidir}/scripts | |
23 | ||
24 | %description | |
25 | Plugin for Cacti - Monitor TCP Connection Status. | |
26 | ||
27 | %prep | |
28 | %setup -q -c | |
90b5b46f | 29 | mv get_tcp_connections{,.orig} |
9b80e1ca | 30 | install %{SOURCE1} get_tcp_connections |
04a0f80e ER |
31 | %{__sed} -i -e 's,/bin/bash /var/www/htdocs/cacti/scripts/get_tcp_connections,%{scriptsdir}/%{plugin},' *.xml |
32 | ||
33 | %install | |
34 | rm -rf $RPM_BUILD_ROOT | |
35 | install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir}} | |
36 | cp -a *.xml $RPM_BUILD_ROOT%{resourcedir} | |
37 | install get_tcp_connections $RPM_BUILD_ROOT%{scriptsdir}/%{plugin} | |
38 | ||
39 | %post | |
40 | %{_sbindir}/cacti-add_template %{resourcedir}/cacti_graph_template_tcp_connections.xml | |
41 | ||
42 | %clean | |
43 | rm -rf $RPM_BUILD_ROOT | |
44 | ||
45 | %files | |
46 | %defattr(644,root,root,755) | |
47 | %attr(755,root,root) %{scriptsdir}/%{plugin} | |
48 | %{resourcedir}/cacti_graph_template_tcp_connections.xml |