%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 - 1.0.19-1.13 - Init package for bsfilter