%define number 49795

Name: bsfilter
Version: 1.0.18.ruby1.9.rc1
Release: 1%{?_dist_release}
Summary: bsfilter - bayesian spam filter
Group: Applications/Other
License: GPL
BuildArch: noarch
URL: http://sourceforge.jp/projects/bsfilter/
Source0: http://prdownloads.sourceforge.jp/bsfilter/%{number}/%{name}-%{version}.tgz
# Patch to fix "incompatible encoding regexp match" error.
Patch0:  bsfilter-ruby1.9.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: ruby >= 1.9.0
Summary(ja): bsfilter - ベイジアンスパムフィルタ

%description
bsfilter(bayesian spam filter) is a filter which distinguishes spam 
and non-spam mail, which supports mails written in japanese language,
IMAP, POP3, and also work as traditional unix-style filter.

%description -l ja
bsfilter(bayesian spam filter) はspamメールとそうでないメールを区別する
フィルターです。日本語で書かれたメールやIMAP、POP3プロトコルに対応し、
伝統的なUNIXスタイルのフィルタとしても動作します。

%prep
%setup -q
pushd bsfilter
%patch0 -p0
popd

%install
rm -rf $RPM_BUILD_ROOT
%{__install} -D -m 755 bsfilter/bsfilter ${RPM_BUILD_ROOT}%{_bindir}/%{name}
%{__install} -d ${RPM_BUILD_ROOT}%{_datadir}/%{name}
%{__cp} -rp mda mua ${RPM_BUILD_ROOT}%{_datadir}/%{name}

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc COPYING htdocs/*
%{_bindir}/%{name}
%{_datadir}/%{name}

%changelog
* Sat Dec 01 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.18.ruby1.9.rc1-1
- new upstream release.

* Sun Apr  3 2011 IWAI, Masaharu <iwai@alib.jp> 1.0.17-1
- new upstream release

* Fri Sep 19 2008 Shu KONNO <owa@bg.wakwak.com> 1.0.16-1vl5
- applied new versioning policy, spec in utf-8

* Sat Mar 8 2008 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.16-0vl2
- upstream release

* Sat Dec 16 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.15-0vl2
- upstream release

* Tue Sep 5 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.14-0vl3
- add BuildArch: noarch

* Tue May 30 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.14-0vl2
- upstream release
- drop Patch0 (merged into upstream source)

* Sun Apr 16 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.13-0vl2
- upstream release
- update Patch0 from upstream cvs repository
- drop Source1: bsfilter-actionsrc
  (because Sylpheed supports bsfilter natively)
- Change Group: to Applications/Other

* Fri Mar 31 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.12-0vl3
- add Patch0 to work correctly with ruby-mecab 0.90

* Tue Jan 31 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.12-0vl2
- upstream release

* Tue Dec 13 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.10-0vl2
- upstream release

* Sat Jul 23 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.9-0vl2
- upstream release

* Wed Jul 20 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.8-0vl2
- upstream release

* Thu May 19 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.7-0vl2
- upstream release

* Wed Dec 22 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.6-0vl2
- upstream release

* Fri Oct 29 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.5-0vl2
- upstream release

* Sat Aug 21 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.4-0vl2
- upstream release
- removed unnecessary 'env' command from %prep script
- moved doc install from %install script to %doc
- added COPYING to %doc
- changed install, rm and cp to use macros

* Sun Aug 8 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.3-0vl0.1
- upstream release
- added Sylpheed actionsrc sample

* Wed Mar 31 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.1-0vl0.3
- modified Group

* Tue Mar 30 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.1-0vl0.2
- modified %defattr 644 to none

* Tue Mar 30 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.1-0vl0.1
- initial build for Vine Linux 2.6r1
