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