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