%define version 0.4.1
Name:				loggrep
Summary:			greps through iptables and ipchains log entries
Version:			%{version}
Release:			0
Copyright:			GPL...
Packager:			William Stearns <wstearns@pobox.com>
Group:				Applications/Text
Source:				http://ftp1.sourceforge.net/loggrep/loggrep-%{version}.tar.gz
Vendor:				Gerhard Khuny <snorre@users.sourceforge.net>
URL:				http://loggrep.sourceforge.net/
BuildRoot:			/tmp/loggrep-broot


%description
Loggrep greps kernel logfiles on ipchains or iptables packet log entries
and features the posibility to filter against given entries (date, IP,
port, ..). It also features a quasi-detection of portscans, line count
and html output.



%changelog
* Tue May 14 2002 William Stearns <wstearns@pobox.com>
- first rpm against 0.4.1 sources


%prep
%setup


%build
./configure --with-ipchains --with-iptables --with-xml
make


%install
if [ "$RPM_BUILD_ROOT" = "/tmp/loggrep-broot" ]; then
	rm -rf $RPM_BUILD_ROOT

	make prefix=$RPM_BUILD_ROOT/usr install
	gzip -9 $RPM_BUILD_ROOT/usr/man/man1/loggrep.1

else
	echo Invalid Build root \'"$RPM_BUILD_ROOT"\'
	exit 1
fi

						
%clean
if [ "$RPM_BUILD_ROOT" = "/tmp/loggrep-broot" ]; then
	rm -rf $RPM_BUILD_ROOT
else
	echo Invalid Build root \'"$RPM_BUILD_ROOT"\'
	exit 1
fi


%files
%defattr(-,root,root)
%attr(755,root,root)			/usr/bin/loggrep
%attr(644,root,root)			/usr/share/loggrep/logfile.dtd
%attr(644,root,root)			/usr/share/loggrep/logfile.xml
%attr(644,root,root)			/usr/man/man1/loggrep.1.gz
				%doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO