Summary: System Monitoring Daemon
Version: 0.83.1
Name: sysmon
URL: http://puck.nether.net/sysmon/
Packager: jared@puck.nether.net
Release: 1
Group: Applications/System
Copyright: 2000 Jared Mauch
Source0: sysmon-0.83.1.tar.gz
Source1: sysmond
BuildRoot: /var/tmp/%{name}-buildroot

%description
Sysmon is a network monitoring tool designed to provide high performance and
accurate network monitoring. Currently supported protocols include SMTP, IMAP,
HTTP, TCP, UDP, NNTP, and PING tests.

%prep
%setup
%configure --prefix=/usr
%build
make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/usr/man/man5
mkdir -p $RPM_BUILD_ROOT/usr/man/man8
cp src/block src/sysmon $RPM_BUILD_ROOT/usr/bin
cp src/sysmond $RPM_BUILD_ROOT/usr/sbin
cp docs/sysmon.man $RPM_BUILD_ROOT/usr/man/man8/sysmon.8
cp docs/sysmon.conf.man $RPM_BUILD_ROOT/usr/man/man5/sysmon.conf.5
cp $RPM_SOURCE_DIR/sysmond $RPM_BUILD_ROOT/etc/rc.d/init.d

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc LICENSE WISHLIST docs/[A-Z]* docs/*.jpg docs/*.html examples
%attr(755,root,root) /etc/rc.d/init.d/sysmond
%attr(711,root,root) /usr/bin/sysmon
%attr(711,root,root) /usr/bin/block
%attr(700,root,root) /usr/sbin/sysmond
%attr(644,root,man) /usr/man/man8/sysmon.8
%attr(644,root,man) /usr/man/man5/sysmon.conf.5

%post
/sbin/chkconfig --add sysmond

%preun
/sbin/chkconfig --del sysmond
