]> git.pld-linux.org Git - packages/spamassassin.git/blob - spamassassin.spec
a17d29ca4e4dd6bc99c0b8f1ea2c6b3c174be5cb
[packages/spamassassin.git] / spamassassin.spec
1 # TODO
2 # - build lib{,ssl}spamc.so (if there is a point)
3 #
4 # Conditional build:
5 %bcond_without  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.UTF-8):      Filtr antyspamowy, przeznaczony dla programów dostarczających pocztę (MDA)
12 Name:           spamassassin
13 Version:        3.1.8
14 Release:        0.1
15 License:        Apache Software License v2
16 Group:          Applications/Mail
17 Source0:        http://www.apache.net.pl/spamassassin/source/%{pdir}-%{pnam}-%{version}.tar.bz2
18 # Source0-md5:  6daf599fe9a4fc0d979ee9cac9a8d256
19 Source1:        %{name}.sysconfig
20 Source2:        %{name}-spamd.init
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 BuildRequires:  rpmbuild(macros) >= 1.310
40 %if %{with tests}
41 # are these really needed?
42 BuildRequires:  perl-MIME-Base64
43 BuildRequires:  perl-MIME-tools
44 BuildRequires:  perl-MailTools
45 %endif
46 BuildRequires:  rpm-perlprov >= 4.1-13
47 Requires:       perl-Mail-SpamAssassin = %{version}-%{release}
48 Obsoletes:      SpamAssassin
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %define         _noautoreq      'perl(Razor2::Client::Agent)' 'perl(Razor::Agent)' 'perl(Razor::Client)' 'perl(DBI)' 'perl(Net::Ident)'
52
53 %description
54 SpamAssassin provides you with a way to reduce if not completely
55 eliminate Unsolicited Commercial Email (SPAM) from your incoming
56 email. It can be invoked by a MDA such as sendmail or postfix, or can
57 be called from a procmail script, .forward file, etc. It uses a
58 genetic-algorithm evolved scoring system to identify messages which
59 look spammy, then adds headers to the message so they can be filtered
60 by the user's mail reading software. This distribution includes the
61 spamd/spamc components which create a server that considerably speeds
62 processing of mail.
63
64 %description -l pl.UTF-8
65 SpamAssassin daje możliwość zredukowania, jeśli nie kompletnego
66 wyeliminowania niezamawianej komercyjnej poczty (Unsolicited
67 Commercial Email, spamu) z poczty. Może być wywoływany z MDA, np.
68 Sendmaila czy Postfiksa, lub z pliku ~/.forward itp. Używa ogólnego
69 algorytmu oceniania w celu identyfikacji wiadomości, które wyglądają
70 na SPAM, po czym dodaje nagłówki do wiadomości, umożliwiając
71 filtrowanie przez oprogramowanie użytkownika. Ta dystrybucja zawiera
72 programy spamd/spamc, umożliwiające uruchomienie serwera, co znacznie
73 przyspieszy proces przetwarzania poczty.
74
75 %package tools
76 Summary:        Miscleanous tools for SpamAssassin
77 Summary(pl.UTF-8):      Przeróżne narzędzia związane z SpamAssassin
78 Group:          Applications/Mail
79 Obsoletes:      SpamAssassin-tools
80
81 %description tools
82 Miscleanous tools from various authors, distributed with SpamAssassin.
83 See /usr/share/doc/spamassassin-tools-*/.
84
85 %description tools -l pl.UTF-8
86 Przeróżne narzędzia, dystrybuowane razem ze SpamAssassinem. Więcej
87 informacji w /usr/share/doc/spamassassin-tools-*/.
88
89 %package spamd
90 Summary:        spamd - daemonized version of spamassassin
91 Summary(pl.UTF-8):      spamd - spamassassin w postaci demona
92 Group:          Applications/Mail
93 Requires(post,preun):   /sbin/chkconfig
94 Requires:       perl-Mail-SpamAssassin = %{version}-%{release}
95 Requires:       rc-scripts
96 #Suggests:      perl-IO-Socket-SSL
97
98 %description spamd
99 The purpose of this program is to provide a daemonized version of the
100 spamassassin executable. The goal is improving throughput performance
101 for automated mail checking.
102
103 This is intended to be used alongside "spamc", a fast, low-overhead C
104 client program.
105
106 %description spamd -l pl.UTF-8
107 Spamd jest "demoniczną" wersją spamassassina. Jego zadaniem jest
108 poprawa wydajności automatycznego sprawdzania poczty.
109
110 Spamd powinien być używany wespół ze "spamc", który jest szybkim i
111 wydajnym programem klienckim.
112
113 %package spamc
114 Summary:        spamc - client for spamd
115 Summary(pl.UTF-8):      spamc - klient dla spamd
116 Group:          Applications/Mail
117
118 %description spamc
119 Spamc is the client half of the spamc/spamd pair. It should be used in
120 place of "spamassassin" in scripts to process mail. It will read the
121 mail from STDIN, and spool it to its connection to spamd, then read
122 the result back and print it to STDOUT. Spamc has extremely low
123 overhead in loading, so it should be much faster to load than the
124 whole spamassassin program.
125
126 %description spamc -l pl.UTF-8
127 Spamc powinien być używany zamiast "spamassassina" w skryptach
128 przetwarzających pocztę. Zczytuje pocztę ze STDIN, kolejkuje ją a
129 następnie przekazuje spamdowi, odczytuje wynik i podaje go na STDOUT.
130 Spamc stara się nie obciążać zbytnio procesora podczas ładowania,
131 dzięki czemu powinien działać szybciej niż sam spamassassin.
132
133 %package update
134 Summary:        sa-update - automate SpamAssassin rule updates
135 Summary(pl.UTF-8):      sa-update - automatyczne uaktualnianie regułek SpamAssassina
136 Group:          Applications/Mail
137 Requires:       gnupg
138 Requires:       perl-Archive-Tar
139 Requires:       perl-libwww
140 Requires:       perl-Mail-SpamAssassin = %{version}-%{release}
141
142 %description update
143 sa-update automates the process of downloading and installing new
144 rules and configuration, based on channels. The default channel is
145 updates.spamassassin.org, which has updated rules since the previous
146 release.
147
148 Update archives are verified by default using SHA1 hashes and GPG
149 signatures.
150
151 %description update -l pl.UTF-8
152 sa-update automatyzuje proces ściągania i instalowania nowych regułek
153 i konfiguracji w oparciu o kanały. Domyślny kanał to
154 updates.spamassassin.org, który ma uaktualnione regułki od czasu
155 poprzedniego wydania.
156
157 Archiwa uaktualnień są sprawdzane domyślnie przy użyciu skrótów SHA1 i
158 podpisów GPG.
159
160 %package -n perl-Mail-SpamAssassin
161 Summary:        Mail::SpamAssassin - SpamAssassin e-mail filter libraries
162 Summary(pl.UTF-8):      Mail::SpamAssassin - biblioteki filtra poczty SpamAssassin
163 Group:          Development/Languages/Perl
164 Requires:       perl-Cache-DB_File >= 0.2
165 Requires:       perl-HTML-Parser >= 3
166 Requires:       perl-IO-Socket-INET6 >= 2.51
167 Requires:       perl-Mail-SPF-Query
168 Requires:       perl-Sys-Hostname-Long
169 Conflicts:      perl-Net-DNS < 0.50
170
171 %description -n perl-Mail-SpamAssassin
172 Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
173 analysis and several internet-based realtime blacklists. Using its
174 rule base, it uses a wide range of heuristic tests on mail headers and
175 body text to identify ``spam'', also known as unsolicited commercial
176 email. Once identified, the mail can then be optionally tagged as spam
177 for later filtering using the user's own mail user-agent application.
178
179 %description -n perl-Mail-SpamAssassin -l pl.UTF-8
180 Mail::SpamAssassin jest pluginem dla Mail::Audit, służącym do
181 identyfikacji spamu przy użyciu analizy zawartości i/lub internetowych
182 czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
183 zakres testów heurystycznych na nagłówkach i treści, posiłkując się
184 stworzoną wcześniej bazą reguł. Po zidentyfikowaniu, poczta może być
185 oznaczona jako spam w celu późniejszego wyfiltrowania, np. przy użyciu
186 aplikacji do czytania poczty.
187
188 %prep
189 %setup -q -n %{pdir}-%{pnam}-%{version}
190
191 %build
192 # for spamc/configure
193 export CFLAGS="%{rpmcflags}"
194 %{__perl} Makefile.PL \
195         INSTALLDIRS=vendor \
196         PREFIX=%{_prefix} \
197         SYSCONFDIR=%{_sysconfdir} \
198         ENABLE_SSL=yes \
199         CONTACT_ADDRESS="postmaster@localhost" \
200         PERL_BIN=%{__perl} < /dev/null
201 %{__make} \
202         CC="%{__cc}" \
203         OPTIMIZE="%{rpmcflags}"
204
205 %{?with_tests:%{__make} test}
206
207 %install
208 rm -rf $RPM_BUILD_ROOT
209 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin}
210
211 %{__make} install \
212         DESTDIR=$RPM_BUILD_ROOT
213
214 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamd
215 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamd
216
217 # sa-update dirs
218 install -d $RPM_BUILD_ROOT/var/lib/spamassassin/$(printf %d.%03d%03d $(echo %{version} | tr '.' ' '))
219 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/sa-update-keys
220 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/sa-update-keys/{pubring,secring,trustdb}.gpg
221
222 rm -f $RPM_BUILD_ROOT{%{perl_archlib}/perllocal.pod,%{perl_vendorarch}/auto/Mail/SpamAssassin/.packlist,%{_mandir}/man3/spamassassin-run.*}
223
224 %clean
225 rm -rf $RPM_BUILD_ROOT
226
227 %post spamd
228 /sbin/chkconfig --add spamd
229 %service spamd restart
230
231 %preun spamd
232 if [ "$1" = "0" ]; then
233         %service spamd stop
234         /sbin/chkconfig --del spamd
235 fi
236
237 %triggerpostun spamd -- spamassassin-spamd < 3.1.0-5.3
238 # temp hack, should we care of the dead link?
239 ln -s spamd /etc/rc.d/init.d/spamassassin
240 /sbin/chkconfig --del spamassassin
241 rm -f /etc/rc.d/init.d/spamassassin
242 if [ -f /etc/sysconfig/spamassassin.rpmsave ]; then
243         mv -f /etc/sysconfig/spamassassin.rpmsave /etc/sysconfig/spamd
244 fi
245
246 %files
247 %defattr(644,root,root,755)
248 %doc BUGS CREDITS Changes INSTALL README STATUS TRADEMARK UPGRADE USAGE
249 %doc procmailrc.example
250 %attr(755,root,root) %{_bindir}/sa-learn
251 %attr(755,root,root) %{_bindir}/spamassassin
252 # It's needed for help of spamassassin command.
253 %{perl_vendorlib}/spamassassin-run.pod
254 %{_mandir}/man1/sa-learn*
255 %{_mandir}/man1/spamassassin*
256
257 %files tools
258 %defattr(644,root,root,755)
259 %doc sql ldap tools masses contrib
260
261 %files spamd
262 %defattr(644,root,root,755)
263 %doc spamd/README*
264 %attr(754,root,root) /etc/rc.d/init.d/spamd
265 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/spamd
266 %attr(755,root,root) %{_bindir}/spamd
267 %{_mandir}/man1/spamd*
268
269 %files spamc
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{_bindir}/spamc
272 %{_mandir}/man1/spamc*
273
274 %files update
275 %defattr(644,root,root,755)
276 %attr(700,root,root) %dir %{_sysconfdir}/mail/spamassassin/sa-update-keys
277 %attr(700,root,root) %ghost %{_sysconfdir}/mail/spamassassin/sa-update-keys/*
278 %attr(755,root,root) %{_bindir}/sa-update
279 %{_datadir}/spamassassin/sa-update-pubkey.txt
280 %dir /var/lib/spamassassin
281 %dir /var/lib/spamassassin/*
282 %{_mandir}/man1/sa-update*
283
284 %files -n perl-Mail-SpamAssassin
285 %defattr(644,root,root,755)
286 %doc sample-nonspam.txt sample-spam.txt
287 %dir %{_sysconfdir}/mail/spamassassin
288 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/*.pre
289 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/*.cf
290 %exclude %{_sysconfdir}/mail/spamassassin/sa-update-keys
291
292 %dir %{_datadir}/spamassassin
293 %config(noreplace) %{_datadir}/spamassassin/*
294 %exclude %{_datadir}/spamassassin/sa-update-pubkey.txt
295
296 %{perl_vendorlib}/Mail/*
297 %{_mandir}/man3/*
This page took 0.112879 seconds and 2 git commands to generate.