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