-%include /usr/lib/rpm/macros.perl
Summary: INN spam filter
-Summary(pl): Filtr spamu dla INN
+Summary(pl.UTF-8): Filtr spamu dla INN-a
Name: cleanfeed
-Version: 0.95.7b
-Release: 12
-License: distributable
+Version: 20100602
+Release: 1
+License: Artistic v2.0
Group: Networking/Daemons
-Group(de): Netzwerkwesen/Server
-Group(pl): Sieciowe/Serwery
-Source0: ftp://ftp.exit109.com/users/jeremy/%{name}-%{version}.tar.gz
+#originally: http://www.bofh.it/~md/cleanfeed/%{name}-%{src_ver}.tgz
+# later maintained version:
+#Source0Download: http://www.mixmin.net/cleanfeed/install.html
+Source0: http://www.mixmin.net/cleanfeed/%{name}.tar.gz
+# Source0-md5: 8e14b5e306a9f875b8fcd6488584675a
+Source1: %{name}.8
Patch0: %{name}-conf.patch
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+URL: http://www.mixmin.net/cleanfeed/
+BuildRequires: rpm-perlprov
Requires: perl-Digest-MD5
Conflicts: inn < 2.3
-Buildarch: noarch
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _sysconfdir /etc/news
Cleanfeed is an automatic filter for INN that removes spam from
incoming newsfeeds.
-%description -l pl
-Automatyczny filtr spamu dla serwerów news.
+%description -l pl.UTF-8
+Automatyczny filtr spamu dla serwera news INN. Usuwa spam z
+przychodzących "feedów".
%prep
-%setup -q
-%patch -p1
-
-%build
-# INN 2.3.x hack
-sed -e "s|\$lines = \$hdr{'__BODY__'} =~ tr/\\\n/\\\n/;|\$lines = \$hdr{'__LINES__'};|g" \
- cleanfeed > cleanfeed.new
+%setup -q -n %{name}
+%patch0 -p1
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man8,%{_datadir}/news/filter}
-install -d $RPM_BUILD_ROOT/{%{_sysconfdir},%{_mandir}/man8,%{_datadir}/news/filter}
-
-install cleanfeed.conf $RPM_BUILD_ROOT%{_sysconfdir}
-install cleanfeed.8 $RPM_BUILD_ROOT%{_mandir}/man8/
-install cleanfeed.new $RPM_BUILD_ROOT%{_datadir}/news/filter/filter_innd.pl
+install -p etc/bad_* etc/cleanfeed.local $RPM_BUILD_ROOT%{_sysconfdir}
-gzip -9nf README
+install -p cleanfeed $RPM_BUILD_ROOT%{_datadir}/news/filter/filter_innd.pl
+install %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man8
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README.gz
-%attr(640,root,news) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
+%attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_adult_paths
+%attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_body
+%attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_cancel_paths
+%attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_from
+%attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_groups
+%attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_hosts
+%attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_paths
+%attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_subject
+%attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_url
+%attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cleanfeed.local
%{_datadir}/news/filter/filter_innd.pl
-%{_mandir}/man8/*
+%{_mandir}/man8/cleanfeed.8*