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