1 |
ahmad |
59198 |
%define _requires_exceptions perl |
2 |
|
|
|
3 |
|
|
Summary: Fast anti-spam filtering by Bayesian statistical analysis |
4 |
|
|
Name: bogofilter |
5 |
|
|
Version: 1.2.2 |
6 |
luigiwalser |
338232 |
%define subrel 1 |
7 |
ahmad |
59198 |
Release: %mkrel 2 |
8 |
|
|
License: GPLv2+ |
9 |
|
|
Group: Networking/Mail |
10 |
|
|
URL: http://bogofilter.sourceforge.net |
11 |
luigiwalser |
338232 |
Source0: http://prdownloads.sourceforge.net/bogofilter/%{name}-%{version}.tar.bz2 |
12 |
|
|
Patch0: bogofilter-1.2.2-CVE-2012-5468.diff |
13 |
ahmad |
59198 |
BuildRequires: db4-devel |
14 |
|
|
BuildRequires: gsl-devel |
15 |
|
|
BuildRequires: valgrind |
16 |
|
|
BuildRequires: flex |
17 |
|
|
BuildRequires: xmlto |
18 |
|
|
BuildRequires: openjade |
19 |
|
|
|
20 |
|
|
%description |
21 |
|
|
Bogofilter is a Bayesian spam filter. In its normal mode of |
22 |
|
|
operation, it takes an email message or other text on standard |
23 |
|
|
input, does a statistical check against lists of "good" and |
24 |
|
|
"bad" words, and returns a status code indicating whether or not |
25 |
|
|
the message is spam. Bogofilter is designed with fast algorithms |
26 |
|
|
(including Berkeley DB system), coded directly in C, and tuned for |
27 |
|
|
speed, so it can be used for production by sites that process a |
28 |
|
|
lot of mail. |
29 |
|
|
|
30 |
|
|
%prep |
31 |
|
|
|
32 |
|
|
%setup -q |
33 |
luigiwalser |
338232 |
%patch0 -p1 |
34 |
ahmad |
59198 |
|
35 |
|
|
%build |
36 |
|
|
|
37 |
|
|
%configure2_5x \ |
38 |
|
|
--disable-rpath \ |
39 |
|
|
--disable-transactions \ |
40 |
|
|
--with-database=db \ |
41 |
|
|
--without-included-gsl |
42 |
|
|
|
43 |
|
|
%make |
44 |
|
|
|
45 |
|
|
%check |
46 |
|
|
make DESTDIR="%{buildroot}" check |
47 |
|
|
|
48 |
|
|
%install |
49 |
|
|
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} |
50 |
|
|
|
51 |
|
|
%makeinstall_std |
52 |
|
|
|
53 |
|
|
mv %{buildroot}%{_sysconfdir}/bogofilter.cf.example %{buildroot}%{_sysconfdir}/bogofilter.cf |
54 |
|
|
|
55 |
|
|
##include contrib...some my find it usefull |
56 |
|
|
for d in contrib ; do |
57 |
|
|
install -d %{buildroot}%{_datadir}/%{name}/$d |
58 |
|
|
files=$(find "$d" -maxdepth 1 -type f -print) |
59 |
|
|
for f in $files ; do |
60 |
|
|
case $f in |
61 |
|
|
*.c|*.o|*.obj|*/Makefile*) continue ;; |
62 |
|
|
*.1) |
63 |
|
|
cp -p $f %{buildroot}%{_mandir}/man1 ;; |
64 |
|
|
*) |
65 |
|
|
cp -p $f %{buildroot}%{_datadir}/%{name}/$d ;; |
66 |
|
|
esac |
67 |
|
|
done |
68 |
|
|
done |
69 |
|
|
|
70 |
|
|
# it gets built, so why not install it? |
71 |
|
|
##it is only needed to run check during build and does not need to be installed CAE |
72 |
|
|
#install -m755 contrib/bogogrep %{buildroot}%{_bindir}/ |
73 |
|
|
|
74 |
|
|
# prepare for doc inclusion |
75 |
|
|
for n in xml html ; do |
76 |
|
|
install -d .inst/$n |
77 |
|
|
install -m644 doc/*.$n .inst/$n |
78 |
|
|
done |
79 |
|
|
|
80 |
|
|
%clean |
81 |
|
|
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} |
82 |
|
|
|
83 |
|
|
%files |
84 |
|
|
%doc AUTHORS GETTING.STARTED Doxyfile NEWS |
85 |
|
|
%doc README* RELEASE.NOTES |
86 |
|
|
%doc RELEASE.NOTES* TODO bogofilter.cf.example |
87 |
|
|
%doc doc/README* doc/bogofilter-SA* |
88 |
|
|
%doc doc/integrating-* |
89 |
|
|
%doc doc/rpm.notes.BerkeleyDB |
90 |
|
|
%doc .inst/html .inst/xml |
91 |
|
|
%doc trio/AUTHORS trio/CHANGES trio/README |
92 |
|
|
%doc contrib/README* |
93 |
|
|
%config(noreplace) %{_sysconfdir}/bogofilter.cf |
94 |
|
|
%{_bindir}/* |
95 |
|
|
%{_datadir}/bogofilter |
96 |
|
|
%{_mandir}/man1/* |