+# TODO: (maybe ;)
+# - pgsql support
+# - sqlite support
Summary: ULOGD - the Userspace Logging Daemon for iptables
+Summary(pl): Demon loguj±cy w trybie u¿ytkownika dla iptables
Name: ulogd
-Version: 0.95
-Release: 1
+Version: 1.22
+Release: 1.1
License: GPL
Group: Networking/Daemons
-Group(de): Netzwerkwesen/Server
-Group(pl): Sieciowe/Serwery
-Source0: ftp://ftp.sunbeam.franken.de/pub/netfilter/%{name}-%{version}.tar.gz
+Source0: ftp://ftp.netfilter.org/pub/ulogd/%{name}-%{version}.tar.bz2
+# Source0-md5: 2593dfc51c0bc1d8f86519fb13dd5f34
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.logrotate
-Source4: %{name}.conf
-Patch0: %{name}-DESTDIR.patch
-BuildRequires: sgml-tools
-BuildRequires: sgmls
+Patch0: %{name}-includes.patch
+URL: http://gnumonks.org/projects/ulogd/
+BuildRequires: autoconf
BuildRequires: mysql-devel
+PreReq: rc-scripts
+Requires(post,preun): /sbin/chkconfig
+Requires(post): fileutils
#Requires: kernel >= 2.4.0test9
Requires: iptables
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _sysconfdir /etc
-
%description
This packages is intended for passing packets from the kernel to
userspace to do some logging there. It should work like that:
-
-- Register a target called ULOG with netfilter
+- register a target called ULOG with netfilter
- if the target is hit:
- - send the packet out using netlink multicast facility
- - return NF_ACCEPT immediately
+ - send the packet out using netlink multicast facility
+ - return NF_ACCEPT immediately.
+
+%description -l pl
+Ten pakiet ma s³u¿yæ do wysy³ania pakietów z j±dra do przestrzeni
+u¿ytkownika w celu logowania. Powinien dzia³aæ tak:
+- zarejestrowaæ w netfilterze cel o nazwie ULOG
+- je¿eli cel zosta³ osi±gniêty:
+ - wys³aæ pakiet poprzez netlink
+ - zwróciæ natychmiast NF_ACCEPT.
%package mysql
-Summary: Mysql plugin for ulogd
+Summary: MySQL plugin for ulogd
+Summary(pl): Wtyczka MySQL dla ulogd
Group: Networking/Daemons
-Group(de): Netzwerkwesen/Server
-Group(pl): Sieciowe/Serwery
-Requires: mysql
Obsoletes: iptables-ulogd-mysql
%description mysql
-mysql plugin for ulogd
+MySQL plugin for ulogd.
+
+%description mysql -l pl
+Wtyczka MySQL dla ulogd.
%prep
%setup -q
%patch0 -p1
%build
+%if "%{_lib}" != "lib"
+sed -e 's@lib/@%{_lib}/@g' -i configure.in
+sed -e 's@${MYSQLLIBS}@%{_libdir}@g' -i configure.in
+%endif
+
+%{__autoconf}
%configure \
--with-mysql
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
+install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/{sysconfig,logrotate.d,rc.d/init.d,ulogd}} \
$RPM_BUILD_ROOT/var/log
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ulogd
install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ulogd
install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/ulogd
-install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/
-
-gzip -9nf Changes doc/*.{ps,txt,table}
+install -D %{name}.8 $RPM_BUILD_ROOT/%{_mandir}/man8/%{name}.8
touch $RPM_BUILD_ROOT/var/log/ulogd{,.pktlog}
%files
%defattr(644,root,root,755)
-%doc Changes.gz doc/*.{ps,txt}.gz
-%attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/ulogd
-%attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) %{_sysconfdir}/ulogd.conf
-%attr(640,root,root) /etc/logrotate.d/ulogd
+%doc Changes doc/*.{ps,txt,html}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ulogd
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ulogd.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ulogd
+%dir(750,root,root) %{_sysconfdir}/ulogd
%attr(754,root,root) /etc/rc.d/init.d/ulogd
%attr(755,root,root) %{_sbindir}/*
-%attr(755,root,root) %{_libdir}/ulogd/ulogd_[BLOP]*.so
+%dir %{_libdir}/ulogd
+%attr(755,root,root) %{_libdir}/ulogd/ulogd_[BLOPS]*.so
%attr(640,root,root) %ghost /var/log/*
+%{_mandir}/man?/%{name}.*
%files mysql
%defattr(644,root,root,755)