File fwlogwatch.spec of Package fwlogwatch

# vim: set sw=4 ts=4 et nu:
#
# spec file for package fwlogwatch
#
# Copyright (C) 2000-2013 Boris Wesslowski
# Copyright (c) 2013 Bruno Friedmann <tigerfoot@opensuse.org>
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# $Id: fwlogwatch.spec 723 2011-11-11 15:31:16Z bw $
#
# 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/
#
#
# @TODOS : 
#	create patch for Licence
#	create patch for removing and adapting all /usr/local references

Name: 		fwlogwatch
Summary: 	Firewall log analyzer, report generator and realtime response agent
Version: 	1.5
Release: 	0
Group: 		Productivity/Networking/Security
Url: 		http://fwlogwatch.inside-security.de/
License: 	GPL-2.0
Source: 	%{name}-%{version}.tar.bz2
Patch:		gpl-license.patch
BuildRoot: 	%_tmppath/%{name}-%{version}-buildroot
BuildRequires: 	flex
BuildRequires:  gcc
BuildRequires:  make
BuildRequires:  pkgconfig
BuildRequires:  libtool
BuildRequires:  zlib-devel
BuildRequires:	gettext-devel
%if %suse_version < 1220
BuildRequires:  iptables-devel
%else
BuildRequires:  libiptc-devel
BuildRequires:  libxtables-devel
%endif
Requires:	gettext
PreReq:         %fillup_prereq
PreReq:         %insserv_prereq
Recommends:	apache2
%define        cgidir /srv/www/cgi-bin

%description
fwlogwatch produces Linux ipchains, Linux netfilter/iptables,
Solaris/BSD/IRIX/HP-UX ipfilter, Cisco IOS, Cisco PIX/ASA, NetScreen, Elsa
Lancom router and Snort IDS log summary reports in plain text and HTML form
and has a lot of options to analyze and display relevant patterns. It also
can run as daemon (with web interface) doing realtime log monitoring and
reporting anomalies or starting attack countermeasures.

%prep
%setup -q -n %{name}-%{version}
%patch

%build
%__make %{?_smp_mflags} CC="%__cc" OPTFLAGS="%{optflags}"

%install
%__install -d "%{buildroot}%{_sbindir}"
%__install -d "%{buildroot}%{_sysconfdir}/init.d"
%__install -d "%{buildroot}%{_mandir}/man8"
%__install -d "%{buildroot}%{_datadir}/locale/de/LC_MESSAGES"
%__install -d "%{buildroot}%{_datadir}/locale/ja/LC_MESSAGES"
%__install -d "%{buildroot}%{_datadir}/locale/pt/LC_MESSAGES"
%__install -d "%{buildroot}%{_datadir}/locale/sv/LC_MESSAGES"
%__install -d "%{buildroot}%{_datadir}/locale/zh_CN/LC_MESSAGES"
%__install -d "%{buildroot}%{_datadir}/locale/zh_TW/LC_MESSAGES"
%__make install INSTALL_DIR="%{buildroot}%{_prefix}"
%__make install-config CONF_DIR="%{buildroot}%{_sysconfdir}"
%__make install-i18n LOCALE_DIR="%{buildroot}%{_prefix}"
%if %suse_version < 1210
%__install -m contrib/fwlogwatch.init.suse "%{buildroot}%{_sysconfdir}/init.d/fwlogwatch"
%endif

%preun
%stop_on_removal

%postun
%insserv_cleanup

%files
%defattr(-,root,root)
%doc AUTHORS COPYING CREDITS ChangeLog README
%doc contrib/fwlogsummary.cgi contrib/fwlogsummary_small.cgi
%doc contrib/fwlogwatch.php
%config(noreplace) %{_sysconfdir}/fwlogwatch.config
%if %suse_version < 1210
%config(noreplace) %{_sysconfdir}/init.d/fwlogwatch
%endif
%{_sbindir}/fwlw_notify
%{_sbindir}/fwlw_respond
%{_sbindir}/fwlogwatch
%{_mandir}/man8/fwlogwatch.8.gz
%lang(de) %{_datadir}/locale/de/LC_MESSAGES/fwlogwatch.mo
%lang(ja) %{_datadir}/locale/ja/LC_MESSAGES/fwlogwatch.mo
%lang(pt) %{_datadir}/locale/pt/LC_MESSAGES/fwlogwatch.mo
%lang(sv) %{_datadir}/locale/sv/LC_MESSAGES/fwlogwatch.mo
%lang(zh_CN) %{_datadir}/locale/zh_CN/LC_MESSAGES/fwlogwatch.mo
%lang(zh_TW) %{_datadir}/locale/zh_TW/LC_MESSAGES/fwlogwatch.mo

%changelog