]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - make separate package linked with sqlite | |
3 | # - make milter subpackage | |
4 | # - maybe make some separate package with contrib perl scripts? | |
5 | # - remove bogus banner | |
6 | # | |
7 | Summary: Bayesian Spam Filter | |
8 | Summary(pl.UTF-8): Bayesowski Filtr Antyspamowy | |
9 | Name: bogofilter | |
10 | Version: 1.2.2 | |
11 | Release: 6 | |
12 | License: GPL v2 | |
13 | Group: Applications/Mail | |
14 | Source0: http://dl.sourceforge.net/bogofilter/%{name}-%{version}.tar.bz2 | |
15 | # Source0-md5: 4bcabdf8c5e7efefcb508eda7e80eebc | |
16 | Patch0: %{name}-home_etc.patch | |
17 | Patch1: lexer.patch | |
18 | URL: http://bogofilter.sourceforge.net/ | |
19 | BuildRequires: autoconf >= 2.53 | |
20 | BuildRequires: automake | |
21 | BuildRequires: db-devel | |
22 | BuildRequires: flex | |
23 | BuildRequires: gettext-tools | |
24 | BuildRequires: gsl-devel | |
25 | Requires: gsl >= 1.4 | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %define specflags_ia32 -fomit-frame-pointer | |
29 | ||
30 | %description | |
31 | Bogofilter is a Bayesian spam filter. In its normal mode of operation, | |
32 | it takes an email message or other text on standard input, does a | |
33 | statistical check against lists of "good" and "bad" words, and returns | |
34 | a status code indicating whether or not the message is spam. | |
35 | Bogofilter is designed with fast algorithms (including Berkeley DB | |
36 | system), coded directly in C, and tuned for speed, so it can be used | |
37 | for production by sites that process a lot of mail. | |
38 | ||
39 | %description -l pl.UTF-8 | |
40 | Bogofilter jest bayesowski filtrem antyspamowym. W podstawowym trybie | |
41 | działania na emailu lub innym tekście odczytanym na wejściu wykonuje | |
42 | statystyczne testy na występowanie "dobrych" i "złych" słów i zwraca | |
43 | kod powrotu wskazujący czy wiadomość jest spamem, czy też nie. | |
44 | Bogofilter jest zaprojektowany z użyciem szybkich algorytmów | |
45 | (włączając w to Berkeley DB), napisany w czystym C i "podkręcony" pod | |
46 | kątem szybkości, a więc może być używany na systemach "produkcyjnych", | |
47 | które przetwarzają duże ilości poczty. | |
48 | ||
49 | %prep | |
50 | %setup -q | |
51 | %patch0 -p1 | |
52 | %patch1 -p1 | |
53 | ||
54 | %build | |
55 | %{__aclocal} | |
56 | %{__autoconf} | |
57 | %{__autoheader} | |
58 | %{__automake} | |
59 | %configure | |
60 | %{__make} | |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %{__make} install \ | |
66 | DESTDIR=$RPM_BUILD_ROOT | |
67 | ||
68 | cp $RPM_BUILD_ROOT%{_sysconfdir}/bogofilter.cf.example $RPM_BUILD_ROOT%{_sysconfdir}/bogofilter.cf | |
69 | ||
70 | install bogogrep $RPM_BUILD_ROOT%{_bindir} | |
71 | # Some apps from contrib: | |
72 | install contrib/bfproxy.pl $RPM_BUILD_ROOT%{_bindir} | |
73 | install contrib/bogominitrain.pl $RPM_BUILD_ROOT%{_bindir} | |
74 | install contrib/mime.get.rfc822.pl $RPM_BUILD_ROOT%{_bindir} | |
75 | install contrib/printmaildir.pl $RPM_BUILD_ROOT%{_bindir} | |
76 | install contrib/spamitarium.pl $RPM_BUILD_ROOT%{_bindir} | |
77 | install contrib/stripsearch.pl $RPM_BUILD_ROOT%{_bindir} | |
78 | install contrib/trainbogo.sh $RPM_BUILD_ROOT%{_bindir} | |
79 | ||
80 | # Some final cleanups: | |
81 | rm -f $RPM_BUILD_ROOT%{_bindir}/lexertest | |
82 | ||
83 | %clean | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
86 | # That banner is bogus - no sense to have it _while_ upgrading... | |
87 | # It should be some trigger... | |
88 | # It makes at least sense that someone will read this file | |
89 | # before running bogofilter after upgrade and corrupt his db as | |
90 | # it happened before. Bogofilter is not service/daemon by default | |
91 | # so its not run automaticaly after upgrade. One can still backup | |
92 | # his db. | |
93 | %pre | |
94 | %banner %{name} -e <<'EOF' | |
95 | ||
96 | WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | |
97 | ------------------------------------------------------------------------ | |
98 | POTENTIAL FOR DATA CORRUPTION DURING UPDATES | |
99 | ||
100 | If you plan to upgrade your database library, if only as a side effect | |
101 | of an operating system upgrade, DO HEED the relevant documentation, for | |
102 | instance, the %{_docdir}/%{name}-%{version}/README.db file. | |
103 | You may need to prepare the upgrade with the old version of the software. | |
104 | ||
105 | Otherwise, you may cause irrecoverable damage to your databases. | |
106 | ||
107 | DO backup your databases before making the upgrade. | |
108 | ------------------------------------------------------------------------ | |
109 | WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | |
110 | ||
111 | EOF | |
112 | ||
113 | %files | |
114 | %defattr(644,root,root,755) | |
115 | %doc AUTHORS GETTING.STARTED RELEASE* NEWS* README doc/{README.*,bogofilter-SA*,integrating*} TODO | |
116 | %doc contrib/{bogofilter-qfe.sh,bogofilter-milter.pl,dot-qmail-bogofilter-default,*.example,parmtest.sh} | |
117 | %doc contrib/{README.*,randomtrain.sh,scramble.sh} | |
118 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/bogofilter.cf | |
119 | %attr(755,root,root) %{_bindir}/* | |
120 | %{_mandir}/man1/* |