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