File nagcon.spec of Package nagcon

# norootforbuild

Name:				 nagcon
Version:			 0.0.30
Release:			 0
Summary:			 Nagios Service Overview Console
Source:			 http://www.vanheusden.com/nagcon/nagcon-0.0.30.tgz
Source1:        nagcon.desktop
Source2:        nagcon.xinetd
Source3:        nagcon.png
Patch1:         nagcon-makefile.patch
Patch2:         nagcon-suse_nagios_log.patch
URL:				 http://www.vanheusden.com/nagcon/
Group:			 System/Monitoring
License:			 GNU General Public License version 2 or later (GPL v2 or later)
BuildRoot:		 %{_tmppath}/build-%{name}-%{version}
BuildRequires:	 ncurses-devel
BuildRequires:	 gcc make glibc-devel gcc-c++ libstdc++-devel
BuildRequires:	 update-desktop-files
BuildRequires:  xinetd

%description
Nagcon is a console application interfacing to Nagios which gives you an
overview of all services with troubled services.

%package -n nagcon-remote-server
Summary:			 Nagios Service Overview Status File Server
Group:			 System/Monitoring
Requires:       nagios
Requires:       xinetd

%description -n nagcon-remote-server
Nagcon is a console application interfacing to Nagios which gives you an
overview of all services with troubled services.

This package provides an xinetd service that forwards the Nagios status
log through a TCP connection. Install this package on the host where Nagios
is running in order to enable nagcon to connect to that Nagios instance
remotely.

%prep
%setup -q
%patch1
%patch2
%__sed -i 's/\r$//' *.txt

%build
%__make %{?jobs:-j%{jobs}} \
	OPTFLAGS="%{optflags}" \
	PREFIX="%{_prefix}" \
	CXX="%__cxx"

%install
%__make \
	DESTDIR="%{buildroot}" \
	OPTFLAGS="%{optflags}" \
	PREFIX="%{_prefix}" \
	install

%__install -D -m0644 "%{SOURCE2}" "%{buildroot}/etc/xinetd.d/%{name}"

%__install -D -m0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/%{name}.desktop"
%__install -D -m0644 "%{SOURCE3}" "%{buildroot}%{_datadir}/pixmaps/%{name}.png"
%suse_update_desktop_file -r "%{name}" System Monitor

%clean
%__rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%doc *.txt
%{_bindir}/nagcon
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%files -n nagcon-remote-server
%defattr(-,root,root)
%config(noreplace) /etc/xinetd.d/%{name}

%changelog
# vim: set sw=3 ts=3 noet:
# Local Variables:
# mode: rpm-spec
# tab-width: 3
# End:
openSUSE Build Service is sponsored by