#%%define rlibdir ruby -r rbconfig -e 'print Config::CONFIG["rubylibdir"]'

Summary: a binary search library for Ruby
Name: ruby-bsearch
Version: 1.5
Release: 1%{?_dist_release}
License: Ruby's
Group: Development/Libraries
Source0: http://0xcc.net/ruby-bsearch/ruby-bsearch-%{version}.tar.gz
URL: http://0xcc.net/ruby-bsearch/
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: libruby >= 1.8.0
BuildRequires: ruby >= 1.8.0, rpm >=  3.0.6-0vl16

%description
Ruby/Bsearch is a binary search library for Ruby. It can search the FIRST or
LAST occurrence in an array with a condition given by a block.

%prep
%setup -q

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{rlibdir}
install -m 644 bsearch.rb $RPM_BUILD_ROOT%{rlibdir}

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%doc ChangeLog bsearch.en.rd bsearch.ja.rd tests
%{rlibdir}/bsearch.rb

%changelog
* Tue Sep 16 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.5-1
- applied new versioning policy
- updated Source0 URL, URL:

* Wed Oct 08 2003 akira yamada <akira@vinelinux.org> 1.5-0vl4
- rebuild with ruby-1.8.0.
- Requires: libruby >= 1.8.0.
- BuildRequires: ruby >= 1.8.0.
- removed Prefix:.  this package is not relocatable.

* Fri Mar 21 2003 IWAI Masaharu <iwai@alib.jp> 1.5-0vl3
- rebuild

* Wed Feb  6 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.5-0vl2
- moved the directory installed the ruby library
    - sitelibdir -> rubylibdir
- changed  rpm version in BuildRequires: 3.0.6-0vl19 -> rpm-3.0.6-0vl16

* Wed Jan  2 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.5-0vl1
- upstream release
- first release for Vine Linux

* Fri Oct 19 2001 IWAI Masaharu <iwaim@cc.mbn.or.jp>
- 1.4-1
- upstream release

* Tue Sep 18 2001 IWAI Masaharu <iwaim@cc.mbn.or.jp>
- 1.3-1
- upstream release

* Fri Sep  7 2001 IWAI Masaharu <iwaim@cc.mbn.or.jp>
- 1.2-1
- first release
