1 %include /usr/lib/rpm/macros.perl
2 Summary: INN spam filter
3 Summary(pl.UTF-8): Filtr spamu dla INN-a
5 %define src_ver 20020501
8 License: Artistic License 2.0
9 Group: Networking/Daemons
10 Source0: http://www.bofh.it/~md/cleanfeed/%{name}-%{src_ver}.tgz
11 # Source0-md5: 8535cc55d63a1932a447d09829b6aa97
13 # http://groups.google.pl/group/news.software.nntp/msg/e652742ab7ff0f0a
14 # http://www.mixmin.net/cleanfeed.diff
15 Patch0: %{name}-%{version}.diff
16 Patch1: %{name}-conf.patch
17 URL: http://www.bofh.it/~md/cleanfeed/
18 BuildRequires: rpm-perlprov
19 Requires: perl-Digest-MD5
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _sysconfdir /etc/news
27 Cleanfeed is an automatic filter for INN that removes spam from
30 %description -l pl.UTF-8
31 Automatyczny filtr spamu dla serwera news INN. Usuwa spam z
32 przychodzących "feedów".
35 %setup -q -n %{name}-%{src_ver}
41 sed -i -e "s|\$lines = \$hdr{'__BODY__'} =~ tr/\\\n/\\\n/;|\$lines = \$hdr{'__LINES__'};|g" cleanfeed
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man8,%{_datadir}/news/filter}
47 install bad_adult_paths bad_hosts bad_cancel_paths bad_paths $RPM_BUILD_ROOT%{_sysconfdir}
48 install cleanfeed.local.sample $RPM_BUILD_ROOT%{_sysconfdir}/cleanfeed.local
50 install cleanfeed $RPM_BUILD_ROOT%{_datadir}/news/filter/filter_innd.pl
51 install %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man8
54 rm -rf $RPM_BUILD_ROOT
57 %defattr(644,root,root,755)
58 %doc CHANGES HACKING README TODO cleanfeed.local.sample-it highwind.pl tools
59 %attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_adult_paths
60 %attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_cancel_paths
61 %attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_hosts
62 %attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bad_paths
63 %attr(640,root,news) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cleanfeed.local
64 %{_datadir}/news/filter/filter_innd.pl
65 %{_mandir}/man8/cleanfeed.8*