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