]> git.pld-linux.org Git - packages/spamassassin.git/blame_incremental - spamassassin.spec
- up to 3.4.1
[packages/spamassassin.git] / spamassassin.spec
... / ...
CommitLineData
1# TODO
2# - build lib{,ssl}spamc.so (if there is a point)
3# - sa-check_spamd into nagios-plugin-check_spamd subpackage
4#
5# Conditional build:
6%bcond_without tests # do not perform "make test"
7
8%define pdir Mail
9%define pnam SpamAssassin
10%define sa_version %(printf %d.%03d%03d $(echo %{version} | tr '.' ' '))
11%include /usr/lib/rpm/macros.perl
12Summary: A spam filter for email which can be invoked from mail delivery agents
13Summary(pl.UTF-8): Filtr antyspamowy, przeznaczony dla programów dostarczających pocztę (MDA)
14Name: spamassassin
15Version: 3.4.1
16Release: 1
17License: Apache v2.0
18Group: Applications/Mail
19Source0: http://ftp.ps.pl/pub/apache//spamassassin/source/%{pdir}-%{pnam}-%{version}.tar.bz2
20# Source0-md5: 0db5d27d7b782ff5eadee12b95eae84c
21Source1: %{name}.sysconfig
22Source2: %{name}-spamd.init
23Source3: %{name}-default.rc
24Source4: %{name}-spamc.rc
25Source5: sa-update.sh
26Source6: sa-update.cron
27Source7: spamassassin-official.conf
28Source8: sought.conf
29URL: http://spamassassin.apache.org/
30BuildRequires: openssl-devel >= 0.9.7d
31BuildRequires: perl(ExtUtils::MakeMaker) >= 6.16
32BuildRequires: perl-Archive-Tar
33BuildRequires: perl-DBI
34BuildRequires: perl-DB_File
35BuildRequires: perl-Digest-SHA1 >= 2.10
36BuildRequires: perl-HTML-Parser >= 3
37BuildRequires: perl-IO-Socket-INET6 >= 2.51
38BuildRequires: perl-IO-Socket-SSL
39BuildRequires: perl-IO-Zlib
40BuildRequires: perl-IP-Country
41BuildRequires: perl-Mail-SPF-Query
42BuildRequires: perl-Net-DNS >= 0.65-3
43BuildRequires: perl-Net-Ident
44BuildRequires: perl-NetAddr-IP >= 4.000
45#BuildRequires: perl-Razor2
46BuildRequires: perl-devel >= 1:5.8.0
47BuildRequires: perl-libwww
48BuildRequires: re2c
49BuildRequires: rpm-perlprov >= 4.1-13
50BuildRequires: rpmbuild(macros) >= 1.453
51%if %{with tests}
52# are these really needed?
53#BuildRequires: perl-Compress-Zlib
54BuildRequires: perl-Encode-Detect
55BuildRequires: perl-MIME-Base64
56BuildRequires: perl-MIME-tools
57BuildRequires: perl-Mail-DKIM
58BuildRequires: perl-Mail-DomainKeys
59BuildRequires: perl-Mail-SPF
60BuildRequires: perl-MailTools
61BuildRequires: perl-Razor > 2.61
62%endif
63Requires: perl-Mail-SpamAssassin = %{version}-%{release}
64Obsoletes: SpamAssassin
65Obsoletes: spamassassin-tools
66BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68%define _noautoreq 'perl(Razor2::Client::Agent)' 'perl(Razor::Agent)' 'perl(Razor::Client)' 'perl(DBI)' 'perl(Net::Ident)'
69
70%description
71Apache SpamAssassin provides you with a way to reduce if not
72completely eliminate Unsolicited Commercial Email (SPAM) from your
73incoming email. It can be invoked by a MDA such as sendmail or
74postfix, or can be called from a procmail script, .forward file, etc.
75It uses a genetic-algorithm evolved scoring system to identify
76messages which look spammy, then adds headers to the message so they
77can be filtered by the user's mail reading software. This distribution
78includes the spamd/spamc components which create a server that
79considerably speeds processing of mail.
80
81To enable spamassassin, if you are receiving mail locally, simply add
82this line to your ~/.procmailrc:
83INCLUDERC=/etc/mail/spamassassin/spamassassin-default.rc
84
85To filter spam for all users, add that line to /etc/procmailrc
86(creating if necessary).
87
88%description -l pl.UTF-8
89Apache SpamAssassin daje możliwość zredukowania, jeśli nie kompletnego
90wyeliminowania niezamawianej komercyjnej poczty (Unsolicited
91Commercial Email, spamu) z poczty. Może być wywoływany z MDA, np.
92Sendmaila czy Postfiksa, lub z pliku ~/.forward itp. Używa ogólnego
93algorytmu oceniania w celu identyfikacji wiadomości, które wyglądają
94na SPAM, po czym dodaje nagłówki do wiadomości, umożliwiając
95filtrowanie przez oprogramowanie użytkownika. Ta dystrybucja zawiera
96programy spamd/spamc, umożliwiające uruchomienie serwera, co znacznie
97przyspieszy proces przetwarzania poczty.
98
99Aby uruchomić spamassassina dla lokalnie przychodzącej poczty,
100wystarczy dodać do własnego ~/.procmailrc linię:
101INCLUDERC=/etc/mail/spamassassin/spamassassin-default.rc
102
103Aby filtrować spam dla wszystkich użytkowników, należy dodać tę linię
104do pliku /etc/procmailrc (tworząc go w razie potrzeby).
105
106%package spamd
107Summary: spamd - daemonized version of spamassassin
108Summary(pl.UTF-8): spamd - spamassassin w postaci demona
109Group: Applications/Mail
110Requires(post,preun): /sbin/chkconfig
111Requires: perl-Mail-SpamAssassin = %{version}-%{release}
112Requires: rc-scripts
113Suggests: perl-Apache-Test
114Suggests: perl-IO-Socket-IP
115Suggests: perl-IO-Socket-SSL
116Suggests: perl-IO-Socket-INET6
117Suggests: perl-Net-Ident
118
119%description spamd
120The purpose of this program is to provide a daemonized version of the
121spamassassin executable. The goal is improving throughput performance
122for automated mail checking.
123
124This is intended to be used alongside "spamc", a fast, low-overhead C
125client program.
126
127%description spamd -l pl.UTF-8
128Spamd jest "demoniczną" wersją spamassassina. Jego zadaniem jest
129poprawa wydajności automatycznego sprawdzania poczty.
130
131Spamd powinien być używany wespół ze "spamc", który jest szybkim i
132wydajnym programem klienckim.
133
134%package spamc
135Summary: spamc - client for spamd
136Summary(pl.UTF-8): spamc - klient dla spamd
137Group: Applications/Mail
138Suggests: perl-Compress-Zlib
139
140%description spamc
141Spamc is the client half of the spamc/spamd pair. It should be used in
142place of "spamassassin" in scripts to process mail. It will read the
143mail from STDIN, and spool it to its connection to spamd, then read
144the result back and print it to STDOUT. Spamc has extremely low
145overhead in loading, so it should be much faster to load than the
146whole spamassassin program.
147
148To enable spamassassin, if you are receiving mail locally, simply add
149this line to your ~/.procmailrc:
150INCLUDERC=/etc/mail/spamassassin/spamassassin-spamc.rc
151
152To filter spam for all users, add that line to /etc/procmailrc
153(creating if necessary).
154
155%description spamc -l pl.UTF-8
156Spamc powinien być używany zamiast "spamassassina" w skryptach
157przetwarzających pocztę. Zczytuje pocztę ze STDIN, kolejkuje ją a
158następnie przekazuje spamdowi, odczytuje wynik i podaje go na STDOUT.
159Spamc stara się nie obciążać zbytnio procesora podczas ładowania,
160dzięki czemu powinien działać szybciej niż sam spamassassin.
161
162Aby uruchomić spamassassina dla lokalnie przychodzącej poczty,
163wystarczy dodać do własnego ~/.procmailrc linię:
164INCLUDERC=/etc/mail/spamassassin/spamassassin-spamc.rc
165
166Aby filtrować spam dla wszystkich użytkowników, należy dodać tę linię
167do pliku /etc/procmailrc (tworząc go w razie potrzeby).
168
169%package compile
170Summary: sa-compile - compile SpamAssassin ruleset into native code
171Summary(pl.UTF-8): sa-compile - kompilowanie reguł SpamAssasina do kodu natywnego
172Group: Applications/Mail
173Requires: gcc
174Requires: glibc-devel
175Requires: make
176Requires: perl(ExtUtils::MakeMaker)
177Requires: perl-Mail-SpamAssassin = %{version}-%{release}
178Requires: perl-devel
179Requires: re2c >= 0.10
180
181%description compile
182sa-compile uses "re2c" to compile the SpamAssassin ruleset. This is
183then used by the "Mail::SpamAssassin::Plugin::Rule2XSBody" plugin to
184speed up SpamAssassin's operation, where possible, and when that
185plugin is loaded.
186
187%description compile -l pl.UTF-8
188sa-compile wykorzystuje re2c do kompilacji reguł SpamAssassina. Służy
189to do przyspieszenia operacji SpamAssassina w miarę możliwości, kiedy
190ta wtyczka jest wczytana.
191
192%package update
193Summary: sa-update - automate SpamAssassin rule updates
194Summary(pl.UTF-8): sa-update - automatyczne uaktualnianie regułek SpamAssassina
195Group: Applications/Mail
196Requires: crondaemon
197Requires: gnupg
198Requires: perl-Archive-Tar
199Requires: perl-Mail-SpamAssassin = %{version}-%{release}
200Requires: perl-libwww
201
202%description update
203sa-update automates the process of downloading and installing new
204rules and configuration, based on channels. The default channel is
205updates.spamassassin.org, which has updated rules since the previous
206release.
207
208Update archives are verified by default using SHA1 hashes and GPG
209signatures.
210
211%description update -l pl.UTF-8
212sa-update automatyzuje proces ściągania i instalowania nowych regułek
213i konfiguracji w oparciu o kanały. Domyślny kanał to
214updates.spamassassin.org, który ma uaktualnione regułki od czasu
215poprzedniego wydania.
216
217Archiwa uaktualnień są sprawdzane domyślnie przy użyciu skrótów SHA1 i
218podpisów GPG.
219
220%package -n perl-Mail-SpamAssassin
221Summary: Mail::SpamAssassin - SpamAssassin e-mail filter libraries
222Summary(pl.UTF-8): Mail::SpamAssassin - biblioteki filtra poczty SpamAssassin
223Group: Development/Languages/Perl
224Requires: perl-HTML-Parser >= 3
225# what for this one?
226#Requires: perl-Sys-Hostname-Long
227Suggests: Razor
228Suggests: perl-Cache-DB_File >= 0.2
229Suggests: perl-DBD-mysql
230Suggests: perl-Encode-Detect
231Suggests: perl-Geo-IP
232Suggests: perl-IO-Socket-INET6 >= 2.51
233Suggests: perl-IP-Country
234Suggests: perl-Mail-DKIM
235#Suggests: perl-Mail-DomainKeys
236#Suggests: perl-Mail-SPF
237Suggests: perl-Mail-SPF-Query
238Suggests: perl-Net-DNS >= 0.34
239Suggests: perl-Net-Patricia
240Suggests: spamassassin-compile
241Suggests: spamassassin-plugin-fuzzyocr
242Suggests: spamassassin-update
243
244%description -n perl-Mail-SpamAssassin
245Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
246analysis and several internet-based realtime blacklists. Using its
247rule base, it uses a wide range of heuristic tests on mail headers and
248body text to identify ``spam'', also known as unsolicited commercial
249email. Once identified, the mail can then be optionally tagged as spam
250for later filtering using the user's own mail user-agent application.
251
252%description -n perl-Mail-SpamAssassin -l pl.UTF-8
253Mail::SpamAssassin jest pluginem dla Mail::Audit, służącym do
254identyfikacji spamu przy użyciu analizy zawartości i/lub internetowych
255czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
256zakres testów heurystycznych na nagłówkach i treści, posiłkując się
257stworzoną wcześniej bazą reguł. Po zidentyfikowaniu, poczta może być
258oznaczona jako spam w celu późniejszego wyfiltrowania, np. przy użyciu
259aplikacji do czytania poczty.
260
261%prep
262%setup -q -n %{pdir}-%{pnam}-%{version}
263
264%build
265# for spamc/configure
266export CFLAGS="%{rpmcflags}"
267%{__perl} Makefile.PL \
268 INSTALLDIRS=vendor \
269 PREFIX=%{_prefix} \
270 SYSCONFDIR=%{_sysconfdir} \
271 DATADIR=%{_datadir}/spamassassin \
272 ENABLE_SSL=yes \
273 CONTACT_ADDRESS="postmaster@localhost" \
274 PERL_BIN=%{__perl} < /dev/null
275%{__make} \
276 CC="%{__cc}" \
277 OPTIMIZE="%{rpmcflags}"
278
279%{__sed} -e "s,@@LOCAL_STATE_DIR@@,$(pwd)," sa-compile.raw > sa-compile.pl
280%{__perl} -T sa-compile.pl --siteconfigpath=rules
281
282%{?with_tests:%{__make} -j1 test}
283
284%install
285rm -rf $RPM_BUILD_ROOT
286install -d $RPM_BUILD_ROOT{/etc/{cron.d,sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin/channel.d}
287
288%{__make} install \
289 DESTDIR=$RPM_BUILD_ROOT
290
291install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamd
292install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamd
293install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin
294install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin
295install %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/spamassassin/sa-update.cron
296install %{SOURCE6} $RPM_BUILD_ROOT/etc/cron.d/sa-update
297install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/channel.d
298install %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/channel.d
299
300# sa-update, sa-compile
301install -d $RPM_BUILD_ROOT/var/lib/spamassassin/{%{sa_version},compiled/%{sa_version}}
302install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/sa-update-keys
303touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/sa-update-keys/{pubring,secring,trustdb}.gpg
304
305rm -f $RPM_BUILD_ROOT{%{perl_archlib}/perllocal.pod,%{perl_vendorarch}/auto/Mail/SpamAssassin/.packlist,%{_mandir}/man3/spamassassin-run.*}
306
307cat > $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/channels << 'EOF'
308# Use %{_sysconfdir}/mail/spamassassin/channel.d/*.conf for new channels
309EOF
310
311%clean
312rm -rf $RPM_BUILD_ROOT
313
314%post spamd
315/sbin/chkconfig --add spamd
316%service spamd restart
317
318%preun spamd
319if [ "$1" = "0" ]; then
320 %service spamd stop
321 /sbin/chkconfig --del spamd
322fi
323
324%triggerpostun spamd -- spamassassin-spamd < 3.1.0-5.3
325# temp hack, should we care of the dead link?
326ln -s spamd /etc/rc.d/init.d/spamassassin
327/sbin/chkconfig --del spamassassin
328rm -f /etc/rc.d/init.d/spamassassin
329if [ -f /etc/sysconfig/spamassassin.rpmsave ]; then
330 mv -f /etc/sysconfig/spamassassin.rpmsave /etc/sysconfig/spamd
331fi
332
333%files
334%defattr(644,root,root,755)
335%doc CREDITS Changes INSTALL README TRADEMARK UPGRADE USAGE
336%doc procmailrc.example sql/ ldap/
337%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/spamassassin-default.rc
338%attr(755,root,root) %{_bindir}/sa-learn
339%attr(755,root,root) %{_bindir}/sa-awl
340%attr(755,root,root) %{_bindir}/spamassassin
341%attr(755,root,root) %{_bindir}/sa-check_spamd
342
343# It's needed for help of spamassassin command.
344%{perl_vendorlib}/spamassassin-run.pod
345%{_mandir}/man1/sa-learn.1*
346%{_mandir}/man1/spamassassin.1*
347%{_mandir}/man1/spamassassin-run.1*
348%{_mandir}/man1/sa-awl.1*
349
350%files spamd
351%defattr(644,root,root,755)
352%doc spamd/README*
353%attr(754,root,root) /etc/rc.d/init.d/spamd
354%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/spamd
355%attr(755,root,root) %{_bindir}/spamd
356%{_mandir}/man1/spamd.1*
357
358%files spamc
359%defattr(644,root,root,755)
360%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/spamassassin-spamc.rc
361%attr(755,root,root) %{_bindir}/spamc
362%{_mandir}/man1/spamc.1*
363
364%files compile
365%defattr(644,root,root,755)
366%attr(755,root,root) %{_bindir}/sa-compile
367%{_mandir}/man1/sa-compile.1*
368%dir /var/lib/spamassassin/compiled
369%dir /var/lib/spamassassin/compiled/%{sa_version}
370
371%files update
372%defattr(644,root,root,755)
373%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/channels
374%dir %{_sysconfdir}/mail/spamassassin/channel.d
375%{_sysconfdir}/mail/spamassassin/channel.d/spamassassin-official.conf
376%{_sysconfdir}/mail/spamassassin/channel.d/sought.conf
377%attr(700,root,root) %dir %{_sysconfdir}/mail/spamassassin/sa-update-keys
378%attr(700,root,root) %ghost %{_sysconfdir}/mail/spamassassin/sa-update-keys/*
379%config(noreplace) %verify(not md5 mtime size) /etc/cron.d/sa-update
380%attr(755,root,root) %{_bindir}/sa-update
381%attr(755,root,root) %{_datadir}/spamassassin/sa-update.cron
382%{_datadir}/spamassassin/sa-update-pubkey.txt
383%dir /var/lib/spamassassin/%{sa_version}
384%{_mandir}/man1/sa-update.1*
385
386%files -n perl-Mail-SpamAssassin
387%defattr(644,root,root,755)
388%doc sample-nonspam.txt sample-spam.txt
389%dir %{_sysconfdir}/mail/spamassassin
390%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/*.pre
391%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/*.cf
392%exclude %{_sysconfdir}/mail/spamassassin/sa-update-keys
393%dir %{_datadir}/spamassassin
394%config(noreplace) %{_datadir}/spamassassin/languages
395%config(noreplace) %{_datadir}/spamassassin/user_prefs.template
396%exclude %{_datadir}/spamassassin/sa-update-pubkey.txt
397
398%dir /var/lib/spamassassin
399
400%{perl_vendorlib}/Mail/*
401%{_mandir}/man3/*.3*
This page took 0.161908 seconds and 4 git commands to generate.