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