# $Id: $ %define ver 0.5.0 %define rel 1 %define V_python 2.0.0 # package information Name: pysqlite Summary: A DB API v2.0 compatible interface to SQLite URL: http://pysqlite.sourceforge.net/ Vendor: Michael Owens & Gerhard Haering Packager: Paul Vlaar Group: Language License: GPL Version: %{ver} Release: %{rel} # list of sources Source0: pysqlite-%{ver}.tar.gz # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 2.0.0, python >= %{V_python}, sqlite PreReq: OpenPKG, openpkg >= 2.0.0, python >= %{V_python}, sqlite AutoReq: no AutoReqProv: no %description This is an extension module for the SQLite embedded relational database. It tries to conform to the Python DB-API Spec v2 as far as possible. One problem is that SQLite returns everything as text. This is a result of SQLite's internal representation of data, however it still may be possible to return data in the type specified by the table definitions. I am still working on that, and will require some study of the SQLite source. %prep %setup -n pysqlite # take care of hardcoded paths %{l_shtool} subst \ -e 's;/usr/include/sqlite;%{l_prefix}/include/;' \ setup.py %{l_shtool} subst \ -e 's;/usr/lib/;%{l_prefix}/lib/;' \ setup.py %build %{l_prefix}/bin/python setup.py build %install rm -rf $RPM_BUILD_ROOT %{l_prefix}/bin/python setup.py install -O1 --prefix %{l_prefix} --root $RPM_BUILD_ROOT # determine installation files %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ %{l_files_std} %files -f files # cleanup build root %clean [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] \ && rm -rf $RPM_BUILD_ROOT %post %postun