bsfilter
(cherry picked from commit 5ced046145fcbe9dcc993b8089709207a3dc8143)
This commit is contained in:
parent
ea4815d8dd
commit
38f224501c
BIN
bsfilter-1.0.19.tgz
Normal file
BIN
bsfilter-1.0.19.tgz
Normal file
Binary file not shown.
64
bsfilter.spec
Normal file
64
bsfilter.spec
Normal file
@ -0,0 +1,64 @@
|
||||
%global repoid 59804
|
||||
|
||||
%global mainver 1.0.19
|
||||
%undefine prever
|
||||
|
||||
%global fedorarel 1
|
||||
|
||||
Name: bsfilter
|
||||
Version: %{mainver}
|
||||
Release: %{?prever:0.}%{fedorarel}%{?prever:.%prever}.13
|
||||
Summary: Bayesian spam filter
|
||||
|
||||
# bsfilter script
|
||||
License: GPLv2+
|
||||
URL: http://sourceforge.jp/projects/bsfilter/
|
||||
Source0: http://dl.sourceforge.jp/%{name}/%{repoid}/%{name}-%{version}%{?prever:.%prever}.tgz
|
||||
|
||||
%if 0%{?fedora} >= 19
|
||||
BuildRequires: ruby(release)
|
||||
Requires: ruby(release)
|
||||
%else
|
||||
BuildRequires: ruby
|
||||
# No abi specification needed
|
||||
Requires: ruby
|
||||
%endif
|
||||
# Below is for %%check
|
||||
BuildRequires: rubygem(minitest)
|
||||
BuildRequires: ruby(mecab)
|
||||
BuildRequires: mecab-ipadic
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Bayesian spam filter.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{mainver}%{?prever:.%prever}
|
||||
sed -i.shebang \
|
||||
-e '\@^#!@s|%{_bindir}/env ruby|%{_bindir}/ruby|' \
|
||||
bsfilter/bsfilter
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
install -cpm 0755 bsfilter/bsfilter %{buildroot}%{_bindir}/
|
||||
|
||||
%check
|
||||
cd test
|
||||
# Still some test fails, some of them are just dependency missing,
|
||||
# some of them "really" fails, need contact with the upstream...
|
||||
# rescue test failure for now
|
||||
ruby ./test.rb || :
|
||||
|
||||
%files
|
||||
# rpmlint warns about incorrect-fsf-address, need report to the upstream
|
||||
%doc COPYING
|
||||
%doc htdocs/
|
||||
|
||||
%{_bindir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Mon Oct 10 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.19-1.13
|
||||
- Init package for bsfilter
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user