2 # - build lib{,ssl}spamc.so (if there is a point)
3 # - ATTN: http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5058
6 %bcond_without tests # perform "make test"
8 %include /usr/lib/rpm/macros.perl
10 %define pnam SpamAssassin
11 Summary: A spam filter for email which can be invoked from mail delivery agents
12 Summary(pl): Filtr antyspamowy, przeznaczony dla programów dostarczaj±cych pocztê (MDA)
16 License: Apache Software License v2
17 Group: Applications/Mail
18 Source0: http://www.apache.org/dist/spamassassin/source/%{pdir}-%{pnam}-%{version}.tar.bz2
19 # Source0-md5: c620b0a20791999a8f8091b0888e0195
20 Source1: %{name}.sysconfig
21 Source2: %{name}-spamd.init
22 URL: http://spamassassin.apache.org/
23 BuildRequires: openssl-devel >= 0.9.7d
24 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.16
25 BuildRequires: perl-Archive-Tar
26 BuildRequires: perl-DBI
27 BuildRequires: perl-DB_File
28 BuildRequires: perl-Digest-SHA1 >= 2.10
29 BuildRequires: perl-HTML-Parser >= 3
30 BuildRequires: perl-IO-Socket-INET6 >= 2.51
31 BuildRequires: perl-IO-Socket-SSL
32 BuildRequires: perl-IO-Zlib
33 BuildRequires: perl-IP-Country
34 BuildRequires: perl-Mail-SPF-Query
35 BuildRequires: perl-Net-DNS
36 BuildRequires: perl-Net-Ident
37 #BuildRequires: perl-Razor2
38 BuildRequires: perl-devel >= 1:5.8.0
39 BuildRequires: perl-libwww
40 BuildRequires: rpmbuild(macros) >= 1.310
42 # are these really needed?
43 BuildRequires: perl-MIME-Base64
44 BuildRequires: perl-MIME-tools
45 BuildRequires: perl-MailTools
47 BuildRequires: rpm-perlprov >= 4.1-13
48 Requires: perl-Mail-SpamAssassin = %{version}-%{release}
49 Obsoletes: SpamAssassin
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 %define _noautoreq 'perl(Razor2::Client::Agent)' 'perl(Razor::Agent)' 'perl(Razor::Client)' 'perl(DBI)' 'perl(Net::Ident)'
55 SpamAssassin provides you with a way to reduce if not completely
56 eliminate Unsolicited Commercial Email (SPAM) from your incoming
57 email. It can be invoked by a MDA such as sendmail or postfix, or can
58 be called from a procmail script, .forward file, etc. It uses a
59 genetic-algorithm evolved scoring system to identify messages which
60 look spammy, then adds headers to the message so they can be filtered
61 by the user's mail reading software. This distribution includes the
62 spamd/spamc components which create a server that considerably speeds
66 SpamAssassin daje mo¿liwo¶æ zredukowania, je¶li nie kompletnego
67 wyeliminowania niezamawianej komercyjnej poczty (Unsolicited
68 Commercial Email, spamu) z poczty. Mo¿e byæ wywo³ywany z MDA, np.
69 Sendmaila czy Postfiksa, lub z pliku ~/.forward itp. U¿ywa ogólnego
70 algorytmu oceniania w celu identyfikacji wiadomo¶ci, które wygl±daj±
71 na SPAM, po czym dodaje nag³ówki do wiadomo¶ci, umo¿liwiaj±c
72 filtrowanie przez oprogramowanie u¿ytkownika. Ta dystrybucja zawiera
73 programy spamd/spamc, umo¿liwiaj±ce uruchomienie serwera, co znacznie
74 przyspieszy proces przetwarzania poczty.
77 Summary: Miscleanous tools for SpamAssassin
78 Summary(pl): Przeró¿ne narzêdzia zwi±zane z SpamAssassin
79 Group: Applications/Mail
80 Obsoletes: SpamAssassin-tools
83 Miscleanous tools from various authors, distributed with SpamAssassin.
84 See /usr/share/doc/spamassassin-tools-*/.
86 %description tools -l pl
87 Przeró¿ne narzêdzia, dystrybuowane razem ze SpamAssassinem. Wiêcej
88 informacji w /usr/share/doc/spamassassin-tools-*/.
91 Summary: spamd - daemonized version of spamassassin
92 Summary(pl): spamd - spamassassin w postaci demona
93 Group: Applications/Mail
94 Requires(post,preun): /sbin/chkconfig
95 Requires: perl-Mail-SpamAssassin = %{version}-%{release}
99 The purpose of this program is to provide a daemonized version of the
100 spamassassin executable. The goal is improving throughput performance
101 for automated mail checking.
103 This is intended to be used alongside "spamc", a fast, low-overhead C
106 %description spamd -l pl
107 Spamd jest "demoniczn±" wersj± spamassassina. Jego zadaniem jest
108 poprawa wydajno¶ci automatycznego sprawdzania poczty.
110 Spamd powinien byæ u¿ywany wespó³ ze "spamc", który jest szybkim i
111 wydajnym programem klienckim.
114 Summary: spamc - client for spamd
115 Summary(pl): spamc - klient dla spamd
116 Group: Applications/Mail
119 Spamc is the client half of the spamc/spamd pair. It should be used in
120 place of "spamassassin" in scripts to process mail. It will read the
121 mail from STDIN, and spool it to its connection to spamd, then read
122 the result back and print it to STDOUT. Spamc has extremely low
123 overhead in loading, so it should be much faster to load than the
124 whole spamassassin program.
126 %description spamc -l pl
127 Spamc powinien byæ u¿ywany zamiast "spamassassina" w skryptach
128 przetwarzaj±cych pocztê. Zczytuje pocztê ze STDIN, kolejkuje j± a
129 nastêpnie przekazuje spamdowi, odczytuje wynik i podaje go na STDOUT.
130 Spamc stara siê nie obci±¿aæ zbytnio procesora podczas ³adowania,
131 dziêki czemu powinien dzia³aæ szybciej ni¿ sam spamassassin.
134 Summary: sa-update - automate SpamAssassin rule updates
135 Group: Applications/Mail
137 Requires: perl-Archive-Tar
138 Requires: perl-Mail-SpamAssassin = %{version}-%{release}
141 sa-update automates the process of downloading and installing new
142 rules and configuration, based on channels. The default channel is
143 updates.spamassassin.org, which has updated rules since the previous
146 Update archives are verified by default using SHA1 hashes and GPG
149 %package -n perl-Mail-SpamAssassin
150 Summary: Mail::SpamAssassin - SpamAssassin e-mail filter libraries
151 Summary(pl): Mail::SpamAssassin - biblioteki filtra poczty SpamAssassin
152 Group: Development/Languages/Perl
153 Requires: perl-Cache-DB_File >= 0.2
154 Requires: perl-HTML-Parser >= 3
155 Requires: perl-IO-Socket-INET6 >= 2.51
156 Requires: perl-Mail-SPF-Query
157 Requires: perl-Sys-Hostname-Long
158 Conflicts: perl-Net-DNS < 0.50
160 %description -n perl-Mail-SpamAssassin
161 Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
162 analysis and several internet-based realtime blacklists. Using its
163 rule base, it uses a wide range of heuristic tests on mail headers and
164 body text to identify ``spam'', also known as unsolicited commercial
165 email. Once identified, the mail can then be optionally tagged as spam
166 for later filtering using the user's own mail user-agent application.
168 %description -n perl-Mail-SpamAssassin -l pl
169 Mail::SpamAssassin jest pluginem dla Mail::Audit, s³u¿±cym do
170 identyfikacji spamu przy u¿yciu analizy zawarto¶ci i/lub internetowych
171 czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
172 zakres testów heurystycznych na nag³ówkach i tre¶ci, posi³kuj±c siê
173 stworzon± wcze¶niej baz± regu³. Po zidentyfikowaniu, poczta mo¿e byæ
174 oznaczona jako spam w celu pó¼niejszego wyfiltrowania, np. przy u¿yciu
175 aplikacji do czytania poczty.
178 %setup -q -n %{pdir}-%{pnam}-%{version}
181 %{__perl} Makefile.PL \
184 SYSCONFDIR=%{_sysconfdir} \
186 CONTACT_ADDRESS="postmaster@localhost" \
187 PERL_BIN=%{__perl} < /dev/null
190 OPTIMIZE="%{rpmcflags}"
192 %{?with_tests:%{__make} test}
195 rm -rf $RPM_BUILD_ROOT
196 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin}
199 DESTDIR=$RPM_BUILD_ROOT
201 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamd
202 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamd
205 install -d $RPM_BUILD_ROOT/var/lib/spamassassin/$(printf %d.%03d%03d $(echo %{version} | tr '.' ' '))
207 rm -f $RPM_BUILD_ROOT{%{perl_archlib}/perllocal.pod,%{perl_vendorarch}/auto/Mail/SpamAssassin/.packlist,%{_mandir}/man3/spamassassin-run.*}
208 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/spamassassin-run.pod
211 rm -rf $RPM_BUILD_ROOT
214 /sbin/chkconfig --add spamd
215 %service spamd restart
218 if [ "$1" = "0" ]; then
220 /sbin/chkconfig --del spamd
223 %triggerpostun spamd -- spamassassin-spamd < 3.1.0-5.3
224 # temp hack, should we care of the dead link?
225 ln -s spamd /etc/rc.d/init.d/spamassassin
226 /sbin/chkconfig --del spamassassin
227 rm -f /etc/rc.d/init.d/spamassassin
228 if [ -f /etc/sysconfig/spamassassin.rpmsave ]; then
229 mv -f /etc/sysconfig/spamassassin.rpmsave /etc/sysconfig/spamd
233 %defattr(644,root,root,755)
234 %doc BUGS CREDITS Changes INSTALL README STATUS TRADEMARK UPGRADE USAGE
235 %doc procmailrc.example
236 %attr(755,root,root) %{_bindir}/sa-learn
237 %attr(755,root,root) %{_bindir}/spamassassin
238 %{_mandir}/man1/sa-learn*
239 %{_mandir}/man1/spamassassin*
242 %defattr(644,root,root,755)
243 %doc sql ldap tools masses contrib
246 %defattr(644,root,root,755)
248 %attr(754,root,root) /etc/rc.d/init.d/spamd
249 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/spamd
250 %attr(755,root,root) %{_bindir}/spamd
251 %{_mandir}/man1/spamd*
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_bindir}/spamc
256 %{_mandir}/man1/spamc*
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{_bindir}/sa-update
261 %{_mandir}/man1/sa-update*
262 %dir /var/lib/spamassassin
263 %dir /var/lib/spamassassin/*
265 %files -n perl-Mail-SpamAssassin
266 %defattr(644,root,root,755)
267 %doc sample-nonspam.txt sample-spam.txt
268 %dir %{_sysconfdir}/mail/spamassassin
269 %config(noreplace) %{_sysconfdir}/mail/spamassassin/*
270 %dir %{_datadir}/spamassassin
271 %config(noreplace) %{_datadir}/spamassassin/*
272 %{perl_vendorlib}/Mail/*