]> git.pld-linux.org Git - packages/spamassassin.git/blob - spamassassin.spec
- more R
[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 Requires:       perl-Sys-Hostname-Long
137 Requires:       perl-Mail-SPF-Query
138
139 %description -n perl-Mail-SpamAssassin
140 Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
141 analysis and several internet-based realtime blacklists. Using its
142 rule base, it uses a wide range of heuristic tests on mail headers and
143 body text to identify ``spam'', also known as unsolicited commercial
144 email. Once identified, the mail can then be optionally tagged as spam
145 for later filtering using the user's own mail user-agent application.
146
147 %description -n perl-Mail-SpamAssassin -l pl
148 Mail::SpamAssassin jest pluginem dla Mail::Audit, s³u¿±cym do
149 identyfikacji spamu przy u¿yciu analizy zawarto¶ci i/lub internetowych
150 czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
151 zakres testów heurystycznych na nag³ówkach i tre¶ci, posi³kuj±c siê
152 stworzon± wcze¶niej baz± regu³. Po zidentyfikowaniu, poczta mo¿e byæ
153 oznaczona jako spam w celu pó¼niejszego wyfiltrowania, np. przy u¿yciu
154 aplikacji do czytania poczty.
155
156 %prep
157 %setup -q -n %{pdir}-%{pnam}-%{version}
158
159 %build
160 echo "postmaster@localhost" | \
161 %{__perl} Makefile.PL \
162         INSTALLDIRS=vendor \
163         PREFIX=%{_prefix} \
164         SYSCONFDIR=%{_sysconfdir} \
165         ENABLE_SSL=yes \
166         PERL_BIN=%{__perl}
167 %{__make} \
168         CC="%{__cc}" \
169         OPTIMIZE="%{rpmcflags}"
170
171 %{?with_tests:%{__make} test}
172
173 %install
174 rm -rf $RPM_BUILD_ROOT
175 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin}
176
177 %{__make} install \
178         DESTDIR=$RPM_BUILD_ROOT
179
180 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamassassin
181
182 # shouldn't this script be called `spamd' instead?
183 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamassassin
184
185 rm -f spamd/{*.sh,*.conf,spam*} contrib/snp.tar.gz
186
187 %clean
188 rm -rf $RPM_BUILD_ROOT
189
190 %post spamd
191 /sbin/chkconfig --add spamassassin
192 if [ -f /var/lock/subsys/spamd ]; then
193         /etc/rc.d/init.d/spamassassin restart 1>&2
194 else
195         echo 'Run "/etc/rc.d/init.d/spamassassin start" to start the spamd daemon.'
196 fi
197
198 %preun spamd
199 if [ "$1" = "0" ]; then
200         if [ -f /var/lock/subsys/spamd ]; then
201                 /etc/rc.d/init.d/spamassassin stop 1>&2
202         fi
203         /sbin/chkconfig --del spamassassin
204 fi
205
206 %files
207 %defattr(644,root,root,755)
208 %doc BUGS CREDITS Changes INSTALL README STATUS TRADEMARK UPGRADE USAGE
209 %doc procmailrc.example sample*.txt
210 %attr(755,root,root) %{_bindir}/sa-learn
211 %attr(755,root,root) %{_bindir}/spamassassin
212 %{_mandir}/man1/sa-learn*
213 %{_mandir}/man1/spamassassin*
214
215 %files tools
216 %defattr(644,root,root,755)
217 %doc sql tools masses contrib
218
219 %files spamd
220 %defattr(644,root,root,755)
221 %doc spamd/README*
222 %attr(754,root,root) /etc/rc.d/init.d/spamassassin
223 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/spamassassin
224 %attr(755,root,root) %{_bindir}/spamd
225 %{_mandir}/man1/spamd*
226
227 %files spamc
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_bindir}/spamc
230 %{_mandir}/man1/spamc*
231
232 %files -n perl-Mail-SpamAssassin
233 %defattr(644,root,root,755)
234 %doc sample-nonspam.txt sample-spam.txt
235 %dir %{_sysconfdir}/mail/spamassassin
236 %config(noreplace) %{_sysconfdir}/mail/spamassassin/*
237 %dir %{_datadir}/spamassassin
238 %config(noreplace) %{_datadir}/spamassassin/*
239 %{perl_vendorlib}/Mail/*
240 %{_mandir}/man3/*
This page took 0.049056 seconds and 4 git commands to generate.