diff --git a/bogofilter-1.2.5.tar.xz b/bogofilter-1.2.5.tar.xz new file mode 100644 index 0000000..dd8b5fe Binary files /dev/null and b/bogofilter-1.2.5.tar.xz differ diff --git a/bogofilter.spec b/bogofilter.spec new file mode 100644 index 0000000..68554d0 --- /dev/null +++ b/bogofilter.spec @@ -0,0 +1,80 @@ +Summary: Fast anti-spam filtering by Bayesian statistical analysis +Name: bogofilter +Version: 1.2.5 +Release: 6 +License: GPLv2 +URL: http://bogofilter.sourceforge.net/ +Source0: http://downloads.sourceforge.net/bogofilter/bogofilter-%{version}.tar.xz +BuildRequires: gcc +BuildRequires: flex libdb-devel gsl-devel +BuildRequires: /usr/bin/iconv +BuildRequires: perl-generators +BuildRequires: make + +%description +Bogofilter is a Bayesian spam filter. In its normal mode of +operation, it takes an email message or other text on standard input, +does a statistical check against lists of "good" and "bad" words, and +returns a status code indicating whether or not the message is spam. +Bogofilter is designed with fast algorithms (including Berkeley DB system), +coded directly in C, and tuned for speed, so it can be used for production +by sites that process a lot of mail. + +%package bogoupgrade +Summary: Upgrades bogofilter database to current version +Requires: %{name} = %{version}-%{release} + +%description bogoupgrade +bogoupgrade is a command to upgrade bogofilter’s databases from an old +format to the current format. Since the format of the database changes +once in a while, the utility is designed to make the upgrade easy. + +bogoupgrade is in an extra package to remove the perl dependency on the +main bogofilter package. + +%prep +%setup -q +iconv -f iso-8859-1 -t utf-8 \ + doc/bogofilter-faq-fr.html > doc/bogofilter-faq-fr.html.utf8 +%{__mv} -f doc/bogofilter-faq-fr.html.utf8 \ + doc/bogofilter-faq-fr.html + +%build +%configure --disable-rpath +%{__make} %{?_smp_mflags} + +%install +%{__make} DESTDIR=%{buildroot} install + +%{__mv} -f %{buildroot}%{_sysconfdir}/bogofilter.cf.example \ + %{buildroot}%{_sysconfdir}/bogofilter.cf + +%{__install} -d -m0755 rpm-doc/xml/ rpm-doc/html/ +%{__install} -m644 doc/*.xml rpm-doc/xml/ +%{__install} -m644 doc/*.html rpm-doc/html/ + +%{__chmod} -x contrib/* + +%check +%{__make} %{?_smp_mflags} check + +%files bogoupgrade +%{_bindir}/bogoupgrade +%{_mandir}/man1/bogoupgrade* + +%files +%doc AUTHORS COPYING NEWS README* RELEASE.NOTES* TODO bogofilter.cf.example +%doc doc/bogofilter-SA* doc/bogofilter-tuning.HOWTO* doc/integrating* doc/programmer/ +%doc rpm-doc/html/ rpm-doc/xml/ contrib +%{_mandir}/man1/bogo*.1* +%{_mandir}/man1/bf_*.1* +%config(noreplace) %{_sysconfdir}/bogofilter.cf +%{_bindir}/bogo* +%{_bindir}/bf_* +%exclude %{_bindir}/bogoupgrade +%exclude %{_mandir}/man1/bogoupgrade* + +%changelog +* Sun Oct 09 2022 peijiankang - 1.2.5-6 +- Init package for bogofilter +