forked from pool/python-apsw
dynamic linkage rather than amalgamation, required by s3ql
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-apsw?expand=0&rev=3
This commit is contained in:
committed by
Git OBS Bridge
parent
10e260fc3e
commit
2f31abbb65
@@ -1,27 +1,43 @@
|
||||
# vim: set sw=4 ts=4 et nu:
|
||||
# norootforbuild
|
||||
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
|
||||
Name: python-apsw
|
||||
Version: 3.7.0.1+r1
|
||||
%define pkg_version 3.7.0.1-r1
|
||||
%define sqlite_version 3.7.0.1
|
||||
%if 0%{?suse_version} >= 1210
|
||||
Version: 3.7.8+r1
|
||||
%define pkg_version 3.7.8-r1
|
||||
%define sqlite_version 3.7.8
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1140 && 0%{?suse_version} < 1210
|
||||
Version: 3.7.5+r1
|
||||
%define pkg_version 3.7.5-r1
|
||||
%define sqlite_version 3.7.5
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1130 && 0%{?suse_version} < 1140
|
||||
Version: 3.6.23.1+r1
|
||||
%define pkg_version 3.6.23.1-r1
|
||||
%define sqlite_version 3.6.23
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1120 && 0%{?suse_version} < 1130
|
||||
Version: 3.6.16+r1
|
||||
%define pkg_version 3.6.16-r1
|
||||
%define sqlite_version 3.6.16
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1110 && 0%{?suse_version} < 1120
|
||||
Version: 3.6.3+r1
|
||||
%define pkg_version 3.6.3-r1
|
||||
%define sqlite_version 3.6.3
|
||||
%define nodoc 1
|
||||
%endif
|
||||
Release: 0
|
||||
Summary: Another Python SQLite Wrapper
|
||||
# http://apsw.googlecode.com/files/apsw-%{pkg_version}.zip
|
||||
Source: apsw-%{pkg_version}.tar.bz2
|
||||
# http://www.sqlite.org/sqlite-amalgamation-%{sqlite_version}.tar.gz
|
||||
Source1: sqlite-amalgamation-%{sqlite_version}.tar.bz2
|
||||
Patch11: sqlite-fix_pointer_casts.patch
|
||||
Source: http://apsw.googlecode.com/files/apsw-%{pkg_version}.zip
|
||||
URL: http://code.google.com/p/apsw/
|
||||
Group: Development/Libraries/Python
|
||||
License: zlib/libpng License
|
||||
BuildRoot: %{_tmppath}/build-%{name}-%{version}
|
||||
BuildRequires: python python-devel
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: gcc glibc-devel make pkgconfig autoconf automake libtool
|
||||
BuildConflicts: sqlite3-devel
|
||||
BuildRequires: unzip
|
||||
BuildRequires: sqlite3-devel >= %{sqlite_version}
|
||||
%py_requires
|
||||
|
||||
%description
|
||||
@@ -30,6 +46,7 @@ engine. In contrast to other wrappers such as pysqlite it focuses on
|
||||
being a minimal layer over SQLite attempting just to translate the
|
||||
complete SQLite API into Python.
|
||||
|
||||
%if !0%{?nodoc}
|
||||
%package doc
|
||||
Summary: Another Python SQLite Wrapper - Documentation
|
||||
Group: Development/Libraries/Python
|
||||
@@ -43,23 +60,12 @@ APSW is a Python wrapper for the SQLite embedded relational database
|
||||
engine. In contrast to other wrappers such as pysqlite it focuses on
|
||||
being a minimal layer over SQLite attempting just to translate the
|
||||
complete SQLite API into Python.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -T -b 1 -n "sqlite-%{sqlite_version}"
|
||||
%setup -q -n "apsw-%{pkg_version}"
|
||||
%__mv ../sqlite-%{sqlite_version} ./sqlite3
|
||||
pushd sqlite3
|
||||
%patch11
|
||||
popd #sqlite3
|
||||
|
||||
%build
|
||||
pushd sqlite3
|
||||
CFLAGS="%{optflags} -fPIC -fstack-protector" \
|
||||
%configure --enable-threadsafe
|
||||
%__make %{?jobs:-j%jobs}
|
||||
%__ln_s .libs/*.a .
|
||||
popd #sqlite3
|
||||
|
||||
CFLAGS="%{optflags} -fno-strict-aliasing" \
|
||||
%__python ./setup.py build
|
||||
|
||||
@@ -70,20 +76,26 @@ CFLAGS="%{optflags} -fno-strict-aliasing" \
|
||||
--root="%{buildroot}" \
|
||||
--record-rpm=files.lst
|
||||
|
||||
%__rm doc/.buildinfo
|
||||
%__rm -f doc/.buildinfo
|
||||
|
||||
%__install -d "%{buildroot}%{_docdir}/%{name}"
|
||||
%if !0%{?nodoc}
|
||||
%__cp -a doc/* "%{buildroot}%{_docdir}/%{name}/"
|
||||
%endif
|
||||
|
||||
%clean
|
||||
%{?buildroot:%__rm -rf "%{buildroot}"}
|
||||
|
||||
%files -f files.lst
|
||||
%defattr(-,root,root)
|
||||
%if !0%{?nodoc}
|
||||
%dir %{_docdir}/%{name}
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
%dir %{_docdir}/%{name}
|
||||
%doc %{_docdir}/%{name}/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
||||
|
||||
Reference in New Issue
Block a user