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