%define pkg_version 1.2.4
%define pkg_release 1%{?_dist_release}

Summary:       SQLite3/Ruby Interface
Name:          sqlite3-ruby
Version:       %{pkg_version}
Release:       %{pkg_release}
Source0:       %{name}-%{version}.tar.bz2
License:       MIT
Group:         Development/Languages
URL:           http://rubyforge.org/projects/sqlite-ruby

Requires:      ruby, sqlite3
BuildRequires: ruby, sqlite3-devel
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

Vendor:        Project Vine
Distribution:  Vine Linux


%description
This module allows Ruby programs to interface with the SQLite3
database engine (http://www.sqlite.org).  You must have the
SQLite engine installed in order to build this module.

Note that this module is NOT compatible with SQLite 2.x.

%prep
%setup -q

%build
ruby setup.rb config --site-ruby=%{rarchdir} --so-dir=%{rarchdir}
ruby setup.rb setup

%install
%{__rm} -rf ${RPM_BUILD_ROOT}
ruby setup.rb install --prefix=${RPM_BUILD_ROOT}

%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%files
%defattr(-,root,root)
%doc CHANGELOG.rdoc README.rdoc LICENSE doc api 
%{rarchdir}/sqlite3_api.so
%{rarchdir}/sqlite3.rb
%{rarchdir}/sqlite3

%changelog
* Sat Mar  7 2009 IWAI, Masaharu <iwai@alib.jp> 0.8.4-1
- initial release
