]> git.pld-linux.org Git - packages/spamassassin.git/blob - spamassassin.spec
- added Requires: perl-Cache-DB_File - it couldn't learn without it.
[packages/spamassassin.git] / spamassassin.spec
1 # TODO:
2 # - SECURITY: http://securitytracker.com/alerts/2004/Aug/1010903.html
3 #
4 # Conditional build:
5 %bcond_with  tests      # perform "make test"
6 #
7 %include        /usr/lib/rpm/macros.perl
8 %define pdir    Mail
9 %define pnam    SpamAssassin
10 Summary:        A spam filter for email which can be invoked from mail delivery agents
11 Summary(pl):    Filtr antyspamowy, przeznaczony dla programów dostarczaj±cych pocztê (MDA)
12 Name:           spamassassin
13 Version:        2.64
14 Release:        0.2
15 License:        GPL v1+ or Artistic
16 Group:          Applications/Mail
17 Source0:        http://old.spamassassin.org/released/%{pdir}-%{pnam}-%{version}.tar.gz
18 # Source0-md5:  a82a9dab95462d102e253edb99091fdd
19 Source1:        %{name}.sysconfig
20 Patch0:         %{name}-rc-script.patch
21 URL:            http://spamassassin.org/
22 BuildRequires:  openssl-devel >= 0.9.6m
23 BuildRequires:  perl-devel >= 5.6
24 %if %{with tests}
25 BuildRequires:  perl-HTML-Parser >= 3
26 # are these really needed?
27 BuildRequires:  perl-MailTools
28 BuildRequires:  perl-Mail-Audit
29 BuildRequires:  perl-MIME-Base64
30 BuildRequires:  perl-MIME-tools
31 %endif
32 BuildRequires:  rpm-perlprov >= 4.0.2-104
33 PreReq:         rc-scripts
34 Requires(post,preun):   /sbin/chkconfig
35 Requires:       perl-Mail-SpamAssassin >= %{version}
36 Obsoletes:      SpamAssassin
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         _noautoreq      'perl(Razor2::Client::Agent)' 'perl(Razor::Agent)' 'perl(Razor::Client)' 'perl(DBI)'
40
41 %description
42 SpamAssassin provides you with a way to reduce if not completely
43 eliminate Unsolicited Commercial Email (SPAM) from your incoming
44 email. It can be invoked by a MDA such as sendmail or postfix, or can
45 be called from a procmail script, .forward file, etc. It uses a
46 genetic-algorithm evolved scoring system to identify messages which
47 look spammy, then adds headers to the message so they can be filtered
48 by the user's mail reading software. This distribution includes the
49 spamd/spamc components which create a server that considerably speeds
50 processing of mail.
51
52 %description -l pl
53 SpamAssassin udostêpnia Ci mo¿liwo¶æ zredukowania, je¶li nie
54 kompletnego wyeliminowania Niezamawianej Komercyjnej Poczty
55 (Unsolicited Commercial Email, spamu) z Twojej poczty. Mo¿e byæ
56 wywo³ywany z MDA, np. Sendmaila czy Postfixa, lub z pliku ~/.forward
57 itp. U¿ywa ogólnego algorytmu oceniania w celu identyfikacji
58 wiadomo¶ci, które wygl±daj± na SPAM, po czym dodaje nag³ówki do
59 wiadomo¶ci, umo¿liwiaj±c filtrowanie przez oprogramowanie u¿ytkownika.
60 Ta dystrybucja zawiera programy spamd/spamc, umo¿liwiaj±ce
61 uruchomienie serwera, co znacznie przyspieszy proces przetwarzania
62 poczty.
63
64 %package tools
65 Summary:        Miscleanous tools for SpamAssassin
66 Summary(pl):    Przeró¿ne narzêdzia zwi±zane z SpamAssassin
67 Group:          Applications/Mail
68 Obsoletes:      SpamAssassin-tools
69
70 %description tools
71 Miscleanous tools from various authors, distributed with SpamAssassin.
72 See /usr/share/doc/spamassassin-tools-*/.
73
74 %description tools -l pl
75 Przeró¿ne narzêdzia, dystrybuowane razem z SpamAssassin. Zobacz
76 /usr/share/doc/spamassassin-tools-*/.
77
78 %package spamd
79 Summary:        spamd - daemonized version of spamassassin
80 Summary(pl):    spamd - spamassassin w postaci demona
81 Group:          Applications/Mail
82
83 %description spamd
84 The purpose of this program is to provide a daemonized version of the
85 spamassassin executable. The goal is improving throughput performance
86 for automated mail checking.
87
88 This is intended to be used alongside "spamc", a fast, low-overhead C
89 client program.
90
91 %description spamd -l pl
92 Spamd jest "demoniczn±" wersj± spamassassina. Jego zadaniem jest
93 poprawa wydajno¶ci automatycznego sprawdzania poczty.
94
95 Spamd powinien byæ u¿ywany wespó³ ze "spamc", który jest szybkim i
96 wydajnym programem klienckim.
97
98 %package spamc
99 Summary:        spamc - client for spamd
100 Summary(pl):    spamc - klient dla spamd
101 Group:          Applications/Mail
102
103 %description spamc
104 Spamc is the client half of the spamc/spamd pair. It should be used in
105 place of "spamassassin" in scripts to process mail. It will read the
106 mail from STDIN, and spool it to its connection to spamd, then read
107 the result back and print it to STDOUT. Spamc has extremely low
108 overhead in loading, so it should be much faster to load than the
109 whole spamassassin program.
110
111 %description spamc -l pl
112 Spamc powinien byæ u¿ywany zamiast "spamassassina" w skryptach
113 przetwarzaj±cych pocztê. Zczytuje pocztê ze STDIN, kolejkuje j± a
114 nastêpnie przekazuje spamd'owi, odczytuje wynik i podaje go na STDOUT.
115 Spamc stara siê nie obci±¿aæ zbytnio procesora podczas ³adowania,
116 dziêki czemu powinien dzia³aæ szybciej ni¿ sam spamassassin.
117
118 %package -n perl-Mail-SpamAssassin
119 Summary:        Mail::SpamAssassin - SpamAssassin e-mail filter libraries
120 Summary(pl):    Mail::SpamAssassin - biblioteki filtra poczty SpamAssassin
121 Group:          Development/Languages/Perl
122 Requires:       perl-HTML-Parser >= 3
123 Requires:       perl-Cache-DB_File >= 0.2
124
125 %description -n perl-Mail-SpamAssassin
126 Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
127 analysis and several internet-based realtime blacklists. Using its
128 rule base, it uses a wide range of heuristic tests on mail headers and
129 body text to identify ``spam'', also known as unsolicited commercial
130 email. Once identified, the mail can then be optionally tagged as spam
131 for later filtering using the user's own mail user-agent application.
132
133 %description -n perl-Mail-SpamAssassin -l pl
134 Mail::SpamAssassin jest pluginem dla Mail::Audit, s³u¿±cym do
135 identyfikacji spamu przy u¿yciu analizy zawarto¶ci i/lub internetowych
136 czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
137 zakres testów heurystycznych na nag³ówkach i tre¶ci, posi³kuj±c siê
138 stworzon± wcze¶niej baz± regu³. Po zidentyfikowaniu, poczta mo¿e byæ
139 oznaczona jako spam w celu pó¼niejszego wyfiltrowania, np. przy u¿yciu
140 aplikacji do czytania poczty.
141
142 %prep
143 %setup -q -n %{pdir}-%{pnam}-%{version}
144 %patch0 -p0
145
146 %build
147 echo "postmaster@localhost" | \
148 %{__perl} Makefile.PL \
149         PREFIX=%{_prefix} \
150         SYSCONFDIR=%{_sysconfdir} \
151         RUN_RAZOR1_TESTS=0 \
152         RUN_RAZOR2_TESTS=0
153 %{__make} OPTIMIZE="%{rpmcflags}"
154
155 %{?with_tests:%{__make} test}
156
157 %install
158 rm -rf $RPM_BUILD_ROOT
159 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin}
160
161 %{__make} install \
162         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
163         INSTALLMAN1DIR=$RPM_BUILD_ROOT%{_mandir}/man1 \
164         INSTALLMAN3DIR=$RPM_BUILD_ROOT%{_mandir}/man3
165
166 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/spamassassin
167
168 install rules/local.cf $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin
169
170 # shouldn't this script be called `spamd' instead?
171 install spamd/pld-rc-script.sh $RPM_BUILD_ROOT/etc/rc.d/init.d/spamassassin
172
173 rm -f spamd/{*.sh,*.conf,spam*} contrib/snp.tar.gz
174
175 %post spamd
176 /sbin/chkconfig --add spamassassin
177 if [ -f /var/lock/subsys/spamd ]; then
178         /etc/rc.d/init.d/spamassassin restart 1>&2
179 else
180         echo 'Run "/etc/rc.d/init.d/spamassassin start" to start the spamd daemon.'
181 fi
182
183 %preun spamd
184 if [ "$1" = "0" ]; then
185         if [ -f /var/lock/subsys/spamd ]; then
186                 /etc/rc.d/init.d/spamassassin stop 1>&2
187         fi
188         /sbin/chkconfig --del spamassassin
189 fi
190
191 %clean
192 rm -rf $RPM_BUILD_ROOT
193
194 %files
195 %defattr(644,root,root,755)
196 %doc BUGS Changes COPYRIGHT INSTALL README TRADEMARK USAGE
197 %doc procmailrc.example
198 %attr(755,root,root) %{_bindir}/sa-learn
199 %attr(755,root,root) %{_bindir}/spamassassin
200 %{_mandir}/man1/sa-learn*
201 %{_mandir}/man1/spamassassin*
202
203 %files tools
204 %defattr(644,root,root,755)
205 %doc sql tools masses contrib
206
207 %files spamd
208 %defattr(644,root,root,755)
209 %doc spamd/*
210 %attr(754,root,root) /etc/rc.d/init.d/spamassassin
211 %attr(600,root,root) %config(noreplace) /etc/sysconfig/spamassassin
212 %attr(755,root,root) %{_bindir}/spamd
213 %{_mandir}/man1/spamd*
214
215 %files spamc
216 %defattr(644,root,root,755)
217 %attr(755,root,root) %{_bindir}/spamc
218 %{_mandir}/man1/spamc*
219
220 %files -n perl-Mail-SpamAssassin
221 %defattr(644,root,root,755)
222 %doc sample-nonspam.txt sample-spam.txt
223 %dir %{_sysconfdir}/mail/spamassassin
224 %config(noreplace) %{_sysconfdir}/mail/spamassassin/*
225 %dir %{_datadir}/spamassassin
226 %config(noreplace) %{_datadir}/spamassassin/*
227 %{perl_sitelib}/Mail/*
228 %{_mandir}/man3/*
This page took 0.080989 seconds and 4 git commands to generate.