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