]>
Commit | Line | Data |
---|---|---|
3ff9a7b2 PG |
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 | # | |
0d4db366 | 7 | Summary: Bayesian Spam Filter |
189cc5a8 | 8 | Summary(pl.UTF-8): Bayesowski Filtr Antyspamowy |
0d4db366 | 9 | Name: bogofilter |
6ec0bd43 JB |
10 | Version: 1.2.5 |
11 | Release: 1 | |
4acdcea1 | 12 | License: GPL v2 |
3334b3fc | 13 | Group: Applications/Mail |
6ec0bd43 JB |
14 | Source0: https://downloads.sourceforge.net/bogofilter/%{name}-%{version}.tar.xz |
15 | # Source0-md5: 8763f87adfff7b802ced177d8c654539 | |
84736e10 | 16 | Patch0: %{name}-home_etc.patch |
6ec0bd43 JB |
17 | URL: https://bogofilter.sourceforge.net/ |
18 | BuildRequires: autoconf >= 2.68 | |
19 | BuildRequires: automake >= 1:1.11 | |
20 | # alternatives (--with-database=): qdbm,sqlite3,tokyocabinet,kyotocabinet,lmdb | |
fcf1f336 | 21 | BuildRequires: db-devel |
90a63b02 | 22 | BuildRequires: flex |
dfebae87 | 23 | BuildRequires: gettext-tools |
e0aeda16 | 24 | BuildRequires: gsl-devel >= 1.4 |
6ec0bd43 JB |
25 | BuildRequires: tar >= 1:1.22 |
26 | BuildRequires: xz | |
a4a8224c | 27 | Requires: gsl >= 1.4 |
0d4db366 | 28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
9cb714ea TP |
30 | %define specflags_ia32 -fomit-frame-pointer |
31 | ||
0d4db366 | 32 | %description |
9bb51500 | 33 | Bogofilter is a Bayesian spam filter. In its normal mode of operation, |
34 | it takes an email message or other text on standard input, does a | |
35 | statistical check against lists of "good" and "bad" words, and returns | |
36 | a status code indicating whether or not the message is spam. | |
37 | Bogofilter is designed with fast algorithms (including Berkeley DB | |
38 | system), coded directly in C, and tuned for speed, so it can be used | |
39 | for production by sites that process a lot of mail. | |
0d4db366 | 40 | |
c142ae50 | 41 | %description -l pl.UTF-8 |
d5731178 | 42 | Bogofilter jest bayesowski filtrem antyspamowym. W podstawowym trybie |
c142ae50 JR |
43 | działania na emailu lub innym tekście odczytanym na wejściu wykonuje |
44 | statystyczne testy na występowanie "dobrych" i "złych" słów i zwraca | |
45 | kod powrotu wskazujący czy wiadomość jest spamem, czy też nie. | |
46 | Bogofilter jest zaprojektowany z użyciem szybkich algorytmów | |
47 | (włączając w to Berkeley DB), napisany w czystym C i "podkręcony" pod | |
48 | kątem szybkości, a więc może być używany na systemach "produkcyjnych", | |
49 | które przetwarzają duże ilości poczty. | |
0d4db366 | 50 | |
51 | %prep | |
52 | %setup -q | |
84736e10 | 53 | %patch0 -p1 |
0d4db366 | 54 | |
55 | %build | |
e7a6ab45 | 56 | %{__aclocal} |
d822b5c4 | 57 | %{__autoconf} |
33cc7414 | 58 | %{__autoheader} |
d822b5c4 | 59 | %{__automake} |
60 | %configure | |
0d4db366 | 61 | %{__make} |
62 | ||
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
0d4db366 | 65 | |
3334b3fc JB |
66 | %{__make} install \ |
67 | DESTDIR=$RPM_BUILD_ROOT | |
33cc7414 | 68 | |
6ec0bd43 | 69 | cp -p $RPM_BUILD_ROOT%{_sysconfdir}/bogofilter.cf.example $RPM_BUILD_ROOT%{_sysconfdir}/bogofilter.cf |
3387ff4e | 70 | |
3ff9a7b2 PG |
71 | install bogogrep $RPM_BUILD_ROOT%{_bindir} |
72 | # Some apps from contrib: | |
73 | install contrib/bfproxy.pl $RPM_BUILD_ROOT%{_bindir} | |
74 | install contrib/bogominitrain.pl $RPM_BUILD_ROOT%{_bindir} | |
75 | install contrib/mime.get.rfc822.pl $RPM_BUILD_ROOT%{_bindir} | |
76 | install contrib/printmaildir.pl $RPM_BUILD_ROOT%{_bindir} | |
77 | install contrib/spamitarium.pl $RPM_BUILD_ROOT%{_bindir} | |
78 | install contrib/stripsearch.pl $RPM_BUILD_ROOT%{_bindir} | |
79 | install contrib/trainbogo.sh $RPM_BUILD_ROOT%{_bindir} | |
80 | ||
0d4db366 | 81 | %clean |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
3ff9a7b2 PG |
84 | # That banner is bogus - no sense to have it _while_ upgrading... |
85 | # It should be some trigger... | |
031bd315 | 86 | # It makes at least sense that someone will read this file |
87 | # before running bogofilter after upgrade and corrupt his db as | |
88 | # it happened before. Bogofilter is not service/daemon by default | |
89 | # so its not run automaticaly after upgrade. One can still backup | |
90 | # his db. | |
3ff9a7b2 | 91 | %pre |
d223a011 SP |
92 | %banner %{name} -e <<'EOF' |
93 | ||
94 | WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | |
95 | ------------------------------------------------------------------------ | |
96 | POTENTIAL FOR DATA CORRUPTION DURING UPDATES | |
97 | ||
98 | If you plan to upgrade your database library, if only as a side effect | |
99 | of an operating system upgrade, DO HEED the relevant documentation, for | |
5fb31f75 | 100 | instance, the %{_docdir}/%{name}-%{version}/README.db file. |
d223a011 SP |
101 | You may need to prepare the upgrade with the old version of the software. |
102 | ||
103 | Otherwise, you may cause irrecoverable damage to your databases. | |
104 | ||
105 | DO backup your databases before making the upgrade. | |
106 | ------------------------------------------------------------------------ | |
107 | WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | |
108 | ||
109 | EOF | |
110 | ||
0d4db366 | 111 | %files |
112 | %defattr(644,root,root,755) | |
e0aeda16 JB |
113 | %doc AUTHORS GETTING.STARTED NEWS* README RELEASE.NOTES TODO doc/{README.*,bogofilter-SA*,bogofilter-faq.html,bogofilter-tuning.HOWTO.html,bogotune-faq.html,integrating*} |
114 | %lang(bg) %doc doc/bogofilter-faq-bg.xhtml | |
115 | %lang(fr) %doc doc/bogofilter-faq-fr.html | |
116 | %lang(it) %doc doc/bogofilter-faq-it.html | |
6ec0bd43 | 117 | %doc contrib/{README.*,bogo.R,bogofilter-qfe.sh,bogofilter-milter.pl,dot-qmail-bogofilter-default,*.example,parmtest.sh,randomtrain.sh,scramble.sh,vm-bogofilter.el} |
6ccbee8a | 118 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/bogofilter.cf |
e0aeda16 JB |
119 | %attr(755,root,root) %{_bindir}/bf_compact |
120 | %attr(755,root,root) %{_bindir}/bf_copy | |
121 | %attr(755,root,root) %{_bindir}/bf_tar | |
122 | %attr(755,root,root) %{_bindir}/bfproxy.pl | |
123 | %attr(755,root,root) %{_bindir}/bogofilter | |
124 | %attr(755,root,root) %{_bindir}/bogogrep | |
125 | %attr(755,root,root) %{_bindir}/bogolexer | |
126 | %attr(755,root,root) %{_bindir}/bogominitrain.pl | |
127 | %attr(755,root,root) %{_bindir}/bogotune | |
128 | %attr(755,root,root) %{_bindir}/bogoupgrade | |
129 | %attr(755,root,root) %{_bindir}/bogoutil | |
130 | %attr(755,root,root) %{_bindir}/mime.get.rfc822.pl | |
131 | %attr(755,root,root) %{_bindir}/printmaildir.pl | |
132 | %attr(755,root,root) %{_bindir}/spamitarium.pl | |
133 | %attr(755,root,root) %{_bindir}/stripsearch.pl | |
134 | %attr(755,root,root) %{_bindir}/trainbogo.sh | |
135 | %{_mandir}/man1/bf_compact.1* | |
136 | %{_mandir}/man1/bf_copy.1* | |
137 | %{_mandir}/man1/bf_tar.1* | |
138 | %{_mandir}/man1/bogofilter.1* | |
139 | %{_mandir}/man1/bogolexer.1* | |
140 | %{_mandir}/man1/bogotune.1* | |
141 | %{_mandir}/man1/bogoupgrade.1* | |
142 | %{_mandir}/man1/bogoutil.1* |