]> git.pld-linux.org Git - packages/spamassassin.git/blob - spamassassin.spec
- add documentation; rel 4
[packages/spamassassin.git] / spamassassin.spec
1 #
2 # Conditional build:
3 # _without_tests - do not perform "make test"
4 %include        /usr/lib/rpm/macros.perl
5 %define pdir    Mail
6 %define pnam    SpamAssassin
7 Summary:        A spam filter for email which can be invoked from mail delivery agents
8 Summary(pl):    Filtr antyspamowy, przeznaczony dla programów dostarczaj±cych pocztê (MDA)
9 Group:          Applications/Mail
10 Version:        2.41
11 Release:        4
12 Name:           spamassassin
13 License:        Artistic
14 Source0:        http://spamassassin.org/released/%{pdir}-%{pnam}-%{version}.tar.gz
15 Patch0:         spamassassin-rc-script.patch
16 URL:            http://spamassassin.org/
17 BuildRequires:  perl >= 5.6
18 BuildRequires:  rpm-perlprov >= 3.0.3-16
19 %if %{?_without_tests:0}%{!?_without_tests:1}
20 BuildRequires:  perl-HTML-Parser >= 3
21 # are these really needed?
22 BuildRequires:  perl-MailTools
23 BuildRequires:  perl-MIME-Base64
24 BuildRequires:  perl-MIME-tools
25 %endif
26 Prereq:         /sbin/chkconfig
27 Requires:       perl-Mail-SpamAssassin >= %{version}
28 Obsoletes:      SpamAssassin
29 Buildroot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _noautoreq      'perl(Razor2::Client::Agent)' 'perl(Razor::Agent)' 'perl(Razor::Client)' 'perl(DBI)'
32
33 %description
34 SpamAssassin provides you with a way to reduce if not completely
35 eliminate Unsolicited Commercial Email (SPAM) from your incoming
36 email. It can be invoked by a MDA such as sendmail or postfix, or can
37 be called from a procmail script, .forward file, etc. It uses a
38 genetic-algorithm evolved scoring system to identify messages which
39 look spammy, then adds headers to the message so they can be filtered
40 by the user's mail reading software. This distribution includes the
41 spamd/spamc components which create a server that considerably speeds
42 processing of mail.
43
44 %description -l pl
45 SpamAssassin udostêpnia Ci mo¿liwo¶æ zredukowania, je¶li nie
46 kompletnego wyeliminowania Niezamawianej Komercyjnej Poczty
47 (Unsolicited Commercial Email, spamu) z Twojej poczty. Mo¿e byæ
48 wywo³ywany z MDA, np. Sendmaila czy Postfixa, lub z pliku ~/.forward
49 itp. U¿ywa ogólnego algorytmu oceniania w celu identyfikacji
50 wiadomo¶ci, które wygl±daj± na SPAM, po czym dodaje nag³ówki do
51 wiadomo¶ci, umo¿liwiaj±c filtrowanie przez oprogramowanie u¿ytkownika.
52 Ta dystrybucja zawiera programy spamd/spamc, umo¿liwiaj±ce
53 uruchomienie serwera, co znacznie przyspieszy proces przetwarzania
54 poczty.
55
56 %package tools
57 Summary:        Miscleanous tools for SpamAssassin
58 Summary(pl):    Przeró¿ne narzêdzia zwi±zane z SpamAssassin
59 Group:          Applications/Mail
60 Obsoletes:      SpamAssassin-tools
61
62 %description tools
63 Miscleanous tools from various authors, distributed with SpamAssassin.
64 See /usr/share/doc/spamassassin-tools-*/.
65
66 %description tools -l pl
67 Przeró¿ne narzêdzia, dystrybuowane razem z SpamAssassin. Zobacz
68 /usr/share/doc/spamassassin-tools-*/.
69
70 %package -n perl-Mail-SpamAssassin
71 Summary:        %{pdir}::%{pnam} -- SpamAssassin e-mail filter Perl modules
72 Summary(pl):    %{pdir}::%{pnam} -- modu³y Perla filtru poczty SpamAssassin
73 Group:          Development/Languages/Perl
74 Requires:       perl-HTML-Parser >= 3
75
76
77 %description -n perl-Mail-SpamAssassin
78 Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
79 analysis and several internet-based realtime blacklists. Using its
80 rule base, it uses a wide range of heuristic tests on mail headers and
81 body text to identify ``spam'', also known as unsolicited commercial
82 email. Once identified, the mail can then be optionally tagged as spam
83 for later filtering using the user's own mail user-agent application.
84
85 %description -n perl-Mail-SpamAssassin -l pl
86 Mail::SpamAssassin jest pluginem dla Mail::Audit, s³u¿±cym do
87 identyfikacji spamu przy u¿yciu analizy zawarto¶ci i/lub internetowych
88 czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
89 zakres testów heurystycznych na nag³ówkach i tre¶ci, posi³kuj±c siê
90 stworzon± wcze¶niej baz± regu³. Po zidentyfikowaniu, poczta mo¿e byæ
91 oznaczona jako spam w celu pó¼niejszego wyfiltrowania, np. przy u¿yciu
92 aplikacji do czytania poczty.
93
94 %define         sa_confdir      $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin
95
96 %prep -q
97 %setup -q -n %{pdir}-%{pnam}-%{version}
98 %patch0 -p0
99
100 %build
101 %{__perl} Makefile.PL PREFIX=%{_prefix} SYSCONFDIR=%{_sysconfdir}
102 %{__make} OPTIMIZE="%{rpmcflags}" PREFIX=%{_prefix}
103
104 %{!?_without_tests:%{__make} test}
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT{%{sa_confdir},/etc/rc.d/init.d}
109
110 %{__make} install \
111         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
112         INSTALLMAN1DIR=$RPM_BUILD_ROOT%{_mandir}/man1 \
113         INSTALLMAN3DIR=$RPM_BUILD_ROOT%{_mandir}/man3 \
114         LOCAL_RULES_DIR=$RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin
115
116 install rules/local.cf $RPM_BUILD_ROOT%{sa_confdir}
117
118 # shouldn't this script be called `spamd' instead?
119 install spamd/pld-rc-script.sh $RPM_BUILD_ROOT/etc/rc.d/init.d/spamassassin
120
121 rm -f spamd/{*.sh,*.conf,spam*} contrib/snp.tar.gz
122
123 %post
124 if [ $1 = 1 ]; then
125         /sbin/chkconfig --add spamassassin
126 fi
127 if [ -f /var/lock/subsys/spamassassin ]; then
128         /etc/rc.d/init.d/spamassassin restart 1>&2
129 else
130         echo 'Run "/etc/rc.d/init.d/spamassassin start" to start the spamd daemon.'
131 fi
132
133 %preun
134 if [ $1 = 0 ]; then
135         if [ -f /var/lock/subsys/spamassassin ]; then
136                 /etc/rc.d/init.d/spamassassin stop 1>&2
137         fi
138         /sbin/chkconfig --del spamassassin
139 fi
140
141 %clean
142 rm -rf $RPM_BUILD_ROOT
143
144 %files
145 %defattr(644,root,root,755)
146 %doc BUGS Changes COPYRIGHT INSTALL README TRADEMARK
147 %doc spamd procmailrc.example
148 %attr(755,root,root) %{_bindir}/*
149 %attr(755,root,root) %{_sysconfdir}/rc.d/init.d/spamassassin
150 %{_mandir}/man1/*
151
152 %files tools
153 %defattr(644,root,root,755)
154 %doc sql tools masses contrib
155
156 %files -n perl-Mail-SpamAssassin
157 %defattr(644,root,root,755)
158 %doc sample-nonspam.txt sample-spam.txt doc/*.html
159 %dir %{_sysconfdir}/mail/spamassassin
160 %config(noreplace) %{_sysconfdir}/mail/spamassassin/*
161 %dir %{_datadir}/spamassassin
162 %config(noreplace) %{_datadir}/spamassassin/*
163 %{perl_sitelib}/Mail/*
164 %{_mandir}/man3/*
This page took 0.06503 seconds and 4 git commands to generate.