File cacti-plugin-npc.spec of Package cacti-plugin-npc

#
# spec file for package cacti-plugin-npc
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           cacti-plugin-npc
Version:        3.0
Release:        0.0
Summary:        This plugin adds the ability to auto-discover devices on a subnet that are not monitored by Cacti
License:        GPL-2.0
Group:          Development/Tools/Other
Url:            https://github.com/Cacti/plugin_npc
Source0:        %{realname}-%{version}.zip
Requires:       cacti
Requires:       nagios
Requires:       ndoutils
BuildRequires:	unzip
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%define realname   npc
%if 0%{?suse_version} <= 1210
%define prefix %{_datadir}/cacti
%else
%define prefix /srv/www/cacti
%endif
Obsoletes:      cacti-PA-npc
Provides:       cacti-PA-npc

%description
This is the community site for the Nagios Plugin for Cacti (NPC).

As a long time user of Nagios and Cacti I consider both applications crucial to understanding the health of my network, servers, and services. The purpose of NPC is to be a complete web based UI replacement to Nagios while fully integrating into Cacti using the Cacti Plugin Architecture. The primary benefit is a single point of access for trending and alert monitoring.

Nagios is excellent at reliably determining the status of network devices and services and Cacti is great at managing trending data via RRD's. Because Cacti has an extensible interface via the Cacti Plugin Architecture and decent user management it made sense to stick with Cacti's user interface. Both applications have tools and API's available now to make an integration project like this possible.

%prep

%setup -q  -n %{realname}

%build

%install
mkdir -p %{buildroot}%{prefix}/plugins/%{realname}
cp -r * %{buildroot}%{prefix}/plugins/%{realname}/.
mkdir -p %{buildroot}%{_docdir}/cacti/plugins/%{realname}
mv %{buildroot}%{prefix}/plugins/%{realname}/LICENSE %{buildroot}%{_docdir}/cacti/plugins/%{realname}/.
mv %{buildroot}%{prefix}/plugins/%{realname}/README.md %{buildroot}%{_docdir}/cacti/plugins/%{realname}/.

%files
%defattr(-,root,root)
%{prefix}/
%dir %{_docdir}/cacti
%dir %{_docdir}/cacti/plugins
%{_docdir}/cacti/plugins/%{realname}/
%config (noreplace) %{prefix}/plugins/%{realname}/config.php


%changelog