]> git.pld-linux.org Git - packages/spamassassin.git/blob - spamassassin.spec
- prefork alghoritm inspired by apache, please test it!
[packages/spamassassin.git] / spamassassin.spec
1 #
2 # Conditional build:
3 %bcond_with  tests      # perform "make test"
4 #
5 %include        /usr/lib/rpm/macros.perl
6 %define         pdir    Mail
7 %define         pnam    SpamAssassin
8 Summary:        A spam filter for email which can be invoked from mail delivery agents
9 Summary(pl):    Filtr antyspamowy, przeznaczony dla programów dostarczaj±cych pocztê (MDA)
10 Name:           spamassassin
11 Version:        3.0.1
12 Release:        3
13 License:        Apache Software License v2
14 Group:          Applications/Mail
15 Source0:        http://www.apache.org/dist/spamassassin/%{pdir}-%{pnam}-%{version}.tar.bz2
16 # Source0-md5:  83f60f97c823d9b8df19309247fe33eb
17 Source1:        %{name}.sysconfig
18 Source2:        %{name}-spamd.init
19 Patch0:         %{name}-prefork.patch
20 URL:            http://spamassassin.apache.org/
21 BuildRequires:  openssl-devel >= 0.9.7d
22 BuildRequires:  perl-devel >= 1:5.8.0
23 BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.16
24 BuildRequires:  perl-Digest-SHA1 >= 2.10
25 %if %{with tests}
26 BuildRequires:  perl-HTML-Parser >= 3
27 # are these really needed?
28 BuildRequires:  perl-MailTools
29 BuildRequires:  perl-MIME-Base64
30 BuildRequires:  perl-MIME-tools
31 %endif
32 BuildRequires:  rpm-perlprov >= 4.1-13
33 Requires:       perl-Mail-SpamAssassin >= %{version}
34 Obsoletes:      SpamAssassin
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         _noautoreq      'perl(Razor2::Client::Agent)' 'perl(Razor::Agent)' 'perl(Razor::Client)' 'perl(DBI)'
38
39 %description
40 SpamAssassin provides you with a way to reduce if not completely
41 eliminate Unsolicited Commercial Email (SPAM) from your incoming
42 email. It can be invoked by a MDA such as sendmail or postfix, or can
43 be called from a procmail script, .forward file, etc. It uses a
44 genetic-algorithm evolved scoring system to identify messages which
45 look spammy, then adds headers to the message so they can be filtered
46 by the user's mail reading software. This distribution includes the
47 spamd/spamc components which create a server that considerably speeds
48 processing of mail.
49
50 %description -l pl
51 SpamAssassin daje mo¿liwo¶æ zredukowania, je¶li nie kompletnego
52 wyeliminowania niezamawianej komercyjnej poczty (Unsolicited
53 Commercial Email, spamu) z poczty. Mo¿e byæ wywo³ywany z MDA, np.
54 Sendmaila czy Postfiksa, lub z pliku ~/.forward itp. U¿ywa ogólnego
55 algorytmu oceniania w celu identyfikacji wiadomo¶ci, które wygl±daj±
56 na SPAM, po czym dodaje nag³ówki do wiadomo¶ci, umo¿liwiaj±c
57 filtrowanie przez oprogramowanie u¿ytkownika. Ta dystrybucja zawiera
58 programy spamd/spamc, umo¿liwiaj±ce uruchomienie serwera, co znacznie
59 przyspieszy proces przetwarzania poczty.
60
61 %package tools
62 Summary:        Miscleanous tools for SpamAssassin
63 Summary(pl):    Przeró¿ne narzêdzia zwi±zane z SpamAssassin
64 Group:          Applications/Mail
65 Obsoletes:      SpamAssassin-tools
66
67 %description tools
68 Miscleanous tools from various authors, distributed with SpamAssassin.
69 See /usr/share/doc/spamassassin-tools-*/.
70
71 %description tools -l pl
72 Przeró¿ne narzêdzia, dystrybuowane razem ze SpamAssassinem. Wiêcej
73 informacji w /usr/share/doc/spamassassin-tools-*/.
74
75 %package spamd
76 Summary:        spamd - daemonized version of spamassassin
77 Summary(pl):    spamd - spamassassin w postaci demona
78 Group:          Applications/Mail
79 PreReq:         rc-scripts
80 Requires(post,preun):   /sbin/chkconfig
81
82 %description spamd
83 The purpose of this program is to provide a daemonized version of the
84 spamassassin executable. The goal is improving throughput performance
85 for automated mail checking.
86
87 This is intended to be used alongside "spamc", a fast, low-overhead C
88 client program.
89
90 %description spamd -l pl
91 Spamd jest "demoniczn±" wersj± spamassassina. Jego zadaniem jest
92 poprawa wydajno¶ci automatycznego sprawdzania poczty.
93
94 Spamd powinien byæ u¿ywany wespó³ ze "spamc", który jest szybkim i
95 wydajnym programem klienckim.
96
97 %package spamc
98 Summary:        spamc - client for spamd
99 Summary(pl):    spamc - klient dla spamd
100 Group:          Applications/Mail
101
102 %description spamc
103 Spamc is the client half of the spamc/spamd pair. It should be used in
104 place of "spamassassin" in scripts to process mail. It will read the
105 mail from STDIN, and spool it to its connection to spamd, then read
106 the result back and print it to STDOUT. Spamc has extremely low
107 overhead in loading, so it should be much faster to load than the
108 whole spamassassin program.
109
110 %description spamc -l pl
111 Spamc powinien byæ u¿ywany zamiast "spamassassina" w skryptach
112 przetwarzaj±cych pocztê. Zczytuje pocztê ze STDIN, kolejkuje j± a
113 nastêpnie przekazuje spamdowi, odczytuje wynik i podaje go na STDOUT.
114 Spamc stara siê nie obci±¿aæ zbytnio procesora podczas ³adowania,
115 dziêki czemu powinien dzia³aæ szybciej ni¿ sam spamassassin.
116
117 %package -n perl-Mail-SpamAssassin
118 Summary:        Mail::SpamAssassin - SpamAssassin e-mail filter libraries
119 Summary(pl):    Mail::SpamAssassin - biblioteki filtra poczty SpamAssassin
120 Group:          Development/Languages/Perl
121 Requires:       perl-HTML-Parser >= 3
122 Requires:       perl-Cache-DB_File >= 0.2
123
124 %description -n perl-Mail-SpamAssassin
125 Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
126 analysis and several internet-based realtime blacklists. Using its
127 rule base, it uses a wide range of heuristic tests on mail headers and
128 body text to identify ``spam'', also known as unsolicited commercial
129 email. Once identified, the mail can then be optionally tagged as spam
130 for later filtering using the user's own mail user-agent application.
131
132 %description -n perl-Mail-SpamAssassin -l pl
133 Mail::SpamAssassin jest pluginem dla Mail::Audit, s³u¿±cym do
134 identyfikacji spamu przy u¿yciu analizy zawarto¶ci i/lub internetowych
135 czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
136 zakres testów heurystycznych na nag³ówkach i tre¶ci, posi³kuj±c siê
137 stworzon± wcze¶niej baz± regu³. Po zidentyfikowaniu, poczta mo¿e byæ
138 oznaczona jako spam w celu pó¼niejszego wyfiltrowania, np. przy u¿yciu
139 aplikacji do czytania poczty.
140
141 %prep
142 %setup -q -n %{pdir}-%{pnam}-%{version}
143 %patch0 -p0
144
145 %build
146 echo "postmaster@localhost" | \
147 %{__perl} Makefile.PL \
148         INSTALLDIRS=vendor \
149         PREFIX=%{_prefix} \
150         SYSCONFDIR=%{_sysconfdir} \
151         ENABLE_SSL=yes \
152         RUN_NET_TESTS=0 \
153         PERL_BIN=%{__perl}
154 %{__make} \
155         CC="%{__cc}" \
156         OPTIMIZE="%{rpmcflags}"
157
158 %{?with_tests:%{__make} test}
159
160 %install
161 rm -rf $RPM_BUILD_ROOT
162 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin}
163
164 %{__make} install \
165         DESTDIR=$RPM_BUILD_ROOT
166
167 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamassassin
168
169 # shouldn't this script be called `spamd' instead?
170 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamassassin
171
172 rm -f spamd/{*.sh,*.conf,spam*} contrib/snp.tar.gz
173
174 %clean
175 rm -rf $RPM_BUILD_ROOT
176
177 %post spamd
178 /sbin/chkconfig --add spamassassin
179 if [ -f /var/lock/subsys/spamd ]; then
180         /etc/rc.d/init.d/spamassassin restart 1>&2
181 else
182         echo 'Run "/etc/rc.d/init.d/spamassassin start" to start the spamd daemon.'
183 fi
184
185 %preun spamd
186 if [ "$1" = "0" ]; then
187         if [ -f /var/lock/subsys/spamd ]; then
188                 /etc/rc.d/init.d/spamassassin stop 1>&2
189         fi
190         /sbin/chkconfig --del spamassassin
191 fi
192
193 %files
194 %defattr(644,root,root,755)
195 %doc BUGS CREDITS Changes INSTALL README STATUS TRADEMARK UPGRADE USAGE
196 %doc procmailrc.example sample*.txt
197 %attr(755,root,root) %{_bindir}/sa-learn
198 %attr(755,root,root) %{_bindir}/spamassassin
199 %{_mandir}/man1/sa-learn*
200 %{_mandir}/man1/spamassassin*
201
202 %files tools
203 %defattr(644,root,root,755)
204 %doc sql tools masses contrib
205
206 %files spamd
207 %defattr(644,root,root,755)
208 %doc spamd/README*
209 %attr(754,root,root) /etc/rc.d/init.d/spamassassin
210 %attr(600,root,root) %config(noreplace) /etc/sysconfig/spamassassin
211 %attr(755,root,root) %{_bindir}/spamd
212 %{_mandir}/man1/spamd*
213
214 %files spamc
215 %defattr(644,root,root,755)
216 %attr(755,root,root) %{_bindir}/spamc
217 %{_mandir}/man1/spamc*
218
219 %files -n perl-Mail-SpamAssassin
220 %defattr(644,root,root,755)
221 %doc sample-nonspam.txt sample-spam.txt
222 %dir %{_sysconfdir}/mail/spamassassin
223 %config(noreplace) %{_sysconfdir}/mail/spamassassin/*
224 %dir %{_datadir}/spamassassin
225 %config(noreplace) %{_datadir}/spamassassin/*
226 %{perl_vendorlib}/Mail/*
227 %{_mandir}/man3/*
This page took 0.058519 seconds and 3 git commands to generate.