]> git.pld-linux.org Git - packages/spamassassin.git/blob - spamassassin.spec
- separate package for sa-update (spamassassin-update)
[packages/spamassassin.git] / spamassassin.spec
1 # TODO
2 # - build lib{,ssl}spamc.so (if there is a point)
3 # - ATTN: http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5058
4 #
5 # Conditional build:
6 %bcond_without  tests           # perform "make test"
7 #
8 %include        /usr/lib/rpm/macros.perl
9 %define         pdir    Mail
10 %define         pnam    SpamAssassin
11 Summary:        A spam filter for email which can be invoked from mail delivery agents
12 Summary(pl):    Filtr antyspamowy, przeznaczony dla programów dostarczaj±cych pocztê (MDA)
13 Name:           spamassassin
14 Version:        3.1.4
15 Release:        1.2
16 License:        Apache Software License v2
17 Group:          Applications/Mail
18 Source0:        http://www.apache.org/dist/spamassassin/source/%{pdir}-%{pnam}-%{version}.tar.bz2
19 # Source0-md5:  c620b0a20791999a8f8091b0888e0195
20 Source1:        %{name}.sysconfig
21 Source2:        %{name}-spamd.init
22 URL:            http://spamassassin.apache.org/
23 BuildRequires:  openssl-devel >= 0.9.7d
24 BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.16
25 BuildRequires:  perl-Archive-Tar
26 BuildRequires:  perl-DBI
27 BuildRequires:  perl-DB_File
28 BuildRequires:  perl-Digest-SHA1 >= 2.10
29 BuildRequires:  perl-HTML-Parser >= 3
30 BuildRequires:  perl-IO-Socket-INET6 >= 2.51
31 BuildRequires:  perl-IO-Socket-SSL
32 BuildRequires:  perl-IO-Zlib
33 BuildRequires:  perl-IP-Country
34 BuildRequires:  perl-Mail-SPF-Query
35 BuildRequires:  perl-Net-DNS
36 BuildRequires:  perl-Net-Ident
37 #BuildRequires: perl-Razor2
38 BuildRequires:  perl-devel >= 1:5.8.0
39 BuildRequires:  perl-libwww
40 BuildRequires:  rpmbuild(macros) >= 1.310
41 %if %{with tests}
42 # are these really needed?
43 BuildRequires:  perl-MIME-Base64
44 BuildRequires:  perl-MIME-tools
45 BuildRequires:  perl-MailTools
46 %endif
47 BuildRequires:  rpm-perlprov >= 4.1-13
48 Requires:       perl-Mail-SpamAssassin = %{version}-%{release}
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 Group:          Applications/Mail
136 Requires:       gnupg
137 Requires:       perl-Archive-Tar
138 Requires:       perl-Mail-SpamAssassin = %{version}-%{release}
139
140 %description update
141 sa-update automates the process of downloading and installing new
142 rules and configuration, based on channels. The default channel is
143 updates.spamassassin.org, which has updated rules since the previous
144 release.
145
146 Update archives are verified by default using SHA1 hashes and GPG
147 signatures.
148
149 %package -n perl-Mail-SpamAssassin
150 Summary:        Mail::SpamAssassin - SpamAssassin e-mail filter libraries
151 Summary(pl):    Mail::SpamAssassin - biblioteki filtra poczty SpamAssassin
152 Group:          Development/Languages/Perl
153 Requires:       perl-Cache-DB_File >= 0.2
154 Requires:       perl-HTML-Parser >= 3
155 Requires:       perl-IO-Socket-INET6 >= 2.51
156 Requires:       perl-Mail-SPF-Query
157 Requires:       perl-Sys-Hostname-Long
158 Conflicts:      perl-Net-DNS < 0.50
159
160 %description -n perl-Mail-SpamAssassin
161 Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
162 analysis and several internet-based realtime blacklists. Using its
163 rule base, it uses a wide range of heuristic tests on mail headers and
164 body text to identify ``spam'', also known as unsolicited commercial
165 email. Once identified, the mail can then be optionally tagged as spam
166 for later filtering using the user's own mail user-agent application.
167
168 %description -n perl-Mail-SpamAssassin -l pl
169 Mail::SpamAssassin jest pluginem dla Mail::Audit, s³u¿±cym do
170 identyfikacji spamu przy u¿yciu analizy zawarto¶ci i/lub internetowych
171 czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
172 zakres testów heurystycznych na nag³ówkach i tre¶ci, posi³kuj±c siê
173 stworzon± wcze¶niej baz± regu³. Po zidentyfikowaniu, poczta mo¿e byæ
174 oznaczona jako spam w celu pó¼niejszego wyfiltrowania, np. przy u¿yciu
175 aplikacji do czytania poczty.
176
177 %prep
178 %setup -q -n %{pdir}-%{pnam}-%{version}
179
180 %build
181 %{__perl} Makefile.PL \
182         INSTALLDIRS=vendor \
183         PREFIX=%{_prefix} \
184         SYSCONFDIR=%{_sysconfdir} \
185         ENABLE_SSL=yes \
186         CONTACT_ADDRESS="postmaster@localhost" \
187         PERL_BIN=%{__perl} < /dev/null
188 %{__make} \
189         CC="%{__cc}" \
190         OPTIMIZE="%{rpmcflags}"
191
192 %{?with_tests:%{__make} test}
193
194 %install
195 rm -rf $RPM_BUILD_ROOT
196 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin}
197
198 %{__make} install \
199         DESTDIR=$RPM_BUILD_ROOT
200
201 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamd
202 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamd
203
204 # sa-update dir
205 install -d $RPM_BUILD_ROOT/var/lib/spamassassin/$(printf %d.%03d%03d $(echo %{version} | tr '.' ' '))
206
207 rm -f $RPM_BUILD_ROOT{%{perl_archlib}/perllocal.pod,%{perl_vendorarch}/auto/Mail/SpamAssassin/.packlist,%{_mandir}/man3/spamassassin-run.*}
208 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/spamassassin-run.pod
209
210 %clean
211 rm -rf $RPM_BUILD_ROOT
212
213 %post spamd
214 /sbin/chkconfig --add spamd
215 %service spamd restart
216
217 %preun spamd
218 if [ "$1" = "0" ]; then
219         %service spamd stop
220         /sbin/chkconfig --del spamd
221 fi
222
223 %triggerpostun spamd -- spamassassin-spamd < 3.1.0-5.3
224 # temp hack, should we care of the dead link?
225 ln -s spamd /etc/rc.d/init.d/spamassassin
226 /sbin/chkconfig --del spamassassin
227 rm -f /etc/rc.d/init.d/spamassassin
228 if [ -f /etc/sysconfig/spamassassin.rpmsave ]; then
229         mv -f /etc/sysconfig/spamassassin.rpmsave /etc/sysconfig/spamd
230 fi
231
232 %files
233 %defattr(644,root,root,755)
234 %doc BUGS CREDITS Changes INSTALL README STATUS TRADEMARK UPGRADE USAGE
235 %doc procmailrc.example
236 %attr(755,root,root) %{_bindir}/sa-learn
237 %attr(755,root,root) %{_bindir}/spamassassin
238 %{_mandir}/man1/sa-learn*
239 %{_mandir}/man1/spamassassin*
240
241 %files tools
242 %defattr(644,root,root,755)
243 %doc sql ldap tools masses contrib
244
245 %files spamd
246 %defattr(644,root,root,755)
247 %doc spamd/README*
248 %attr(754,root,root) /etc/rc.d/init.d/spamd
249 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/spamd
250 %attr(755,root,root) %{_bindir}/spamd
251 %{_mandir}/man1/spamd*
252
253 %files spamc
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_bindir}/spamc
256 %{_mandir}/man1/spamc*
257
258 %files update
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{_bindir}/sa-update
261 %{_mandir}/man1/sa-update*
262 %dir /var/lib/spamassassin
263 %dir /var/lib/spamassassin/*
264
265 %files -n perl-Mail-SpamAssassin
266 %defattr(644,root,root,755)
267 %doc sample-nonspam.txt sample-spam.txt
268 %dir %{_sysconfdir}/mail/spamassassin
269 %config(noreplace) %{_sysconfdir}/mail/spamassassin/*
270 %dir %{_datadir}/spamassassin
271 %config(noreplace) %{_datadir}/spamassassin/*
272 %{perl_vendorlib}/Mail/*
273 %{_mandir}/man3/*
This page took 0.054018 seconds and 3 git commands to generate.