%define pyexeclib %(python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)')
%define name pysqlite
%define major 2.6
%define version 2.6.1
%define release 1%{?_dist_release}

Summary: Python DB-API 2.0 interface for SQLite
Summary(ja): SQLite の Python バインディング
Name: %{name}
Version: %{version}
Release: %{release}
Source0: http://initd.org/pub/software/pysqlite/releases/%{major}/%{version}/%{name}-%{version}.tar.gz
License: redistributable
Group: Development/Libraries
URL: http://initd.org/tracker/pysqlite

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

Vendor: Project Vine
Distribution: Vine Linux

%description
pysqlite is a DB-API 2.0-compliant database interface for SQLite.

%description -l ja
pysqlite は DB-API 2.0 に準拠した SQLite 用の Python バインディングです。

%prep
%setup -q


%build
%{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --prefix=${RPM_BUILD_ROOT}%{_prefix} --install-data=${RPM_BUILD_ROOT}%{_docdir}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc LICENSE doc
%{pyexeclib}/pysqlite2/
%{pyexeclib}/pysqlite-%{version}-py2.6.egg-info
%{_docdir}/pysqlite2-doc/

%changelog
* Mon Feb 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.6.1-1
- new upstream release

* Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> 2.4.1-1vl5
- rebuilt with python-2.5.2
- added pyexeclib macro
- applied new versioning policy and spec in utf-8

* Wed Feb 6 2008 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.4.1-0vl2
- upstream release

* Mon Aug 27 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.3.5-0vl2
- initial build for Vine Linux
