!2 [sync] PR-1: Init package for bogofilter

From: @openeuler-sync-bot 
Reviewed-by: @hua_yadong 
Signed-off-by: @hua_yadong
This commit is contained in:
openeuler-ci-bot 2022-10-12 09:21:07 +00:00 committed by Gitee
commit 7d6958bd3d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 80 additions and 0 deletions

BIN
bogofilter-1.2.5.tar.xz Normal file

Binary file not shown.

80
bogofilter.spec Normal file
View File

@ -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 bogofilters 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 <peijiankang@kylinos.cn> - 1.2.5-6
- Init package for bogofilter