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