From 2f31abbb652857947e97bdc1cd11973694d89d2aa8bd189aeee0083c9785019b Mon Sep 17 00:00:00 2001 From: Pascal Bleser Date: Mon, 12 Dec 2011 19:58:01 +0000 Subject: [PATCH] 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 --- apsw-3.6.16-r1.zip | 3 ++ apsw-3.6.23.1-r1.zip | 3 ++ apsw-3.6.3-r1.zip | 3 ++ apsw-3.7.0.1-r1.tar.bz2 | 3 -- apsw-3.7.5-r1.zip | 3 ++ apsw-3.7.6.3-r1.zip | 3 ++ apsw-3.7.8-r1.zip | 3 ++ python-apsw.changes | 7 +++ python-apsw.spec | 66 +++++++++++++++++------------ sqlite-amalgamation-3.7.0.1.tar.bz2 | 3 -- sqlite-fix_pointer_casts.patch | 20 --------- 11 files changed, 64 insertions(+), 53 deletions(-) create mode 100644 apsw-3.6.16-r1.zip create mode 100644 apsw-3.6.23.1-r1.zip create mode 100644 apsw-3.6.3-r1.zip delete mode 100644 apsw-3.7.0.1-r1.tar.bz2 create mode 100644 apsw-3.7.5-r1.zip create mode 100644 apsw-3.7.6.3-r1.zip create mode 100644 apsw-3.7.8-r1.zip delete mode 100644 sqlite-amalgamation-3.7.0.1.tar.bz2 delete mode 100644 sqlite-fix_pointer_casts.patch diff --git a/apsw-3.6.16-r1.zip b/apsw-3.6.16-r1.zip new file mode 100644 index 0000000..780eaeb --- /dev/null +++ b/apsw-3.6.16-r1.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7d3ca44893b44e5381bd121565e63806266c1cb9b82a0a7855be2d4c2523813 +size 422108 diff --git a/apsw-3.6.23.1-r1.zip b/apsw-3.6.23.1-r1.zip new file mode 100644 index 0000000..3ae642d --- /dev/null +++ b/apsw-3.6.23.1-r1.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2aa4dc1ecded3620add62ded442840faa114c6c6fe6987bdf7a3ab6c84cd8b7e +size 541009 diff --git a/apsw-3.6.3-r1.zip b/apsw-3.6.3-r1.zip new file mode 100644 index 0000000..e641802 --- /dev/null +++ b/apsw-3.6.3-r1.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a174df5433f93fa2724c8f5654c7eba679d2ba1ea19b7b53e1c02ad70ab2965 +size 140399 diff --git a/apsw-3.7.0.1-r1.tar.bz2 b/apsw-3.7.0.1-r1.tar.bz2 deleted file mode 100644 index b94a1bf..0000000 --- a/apsw-3.7.0.1-r1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6b80c4f5e524726c250ddbcd4f74148af2d4385d331c2828117d2ed71832e93d -size 373695 diff --git a/apsw-3.7.5-r1.zip b/apsw-3.7.5-r1.zip new file mode 100644 index 0000000..53797d1 --- /dev/null +++ b/apsw-3.7.5-r1.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b37a486bf6904cb2f04aa5fc1daab1fef64f04260625633d9552f92b8b6dfe1 +size 590294 diff --git a/apsw-3.7.6.3-r1.zip b/apsw-3.7.6.3-r1.zip new file mode 100644 index 0000000..658bb7c --- /dev/null +++ b/apsw-3.7.6.3-r1.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92ce49d75f23ed16d58ef3be09c5b2dd4083cf1c25b560ba93aea248cbf2226a +size 604017 diff --git a/apsw-3.7.8-r1.zip b/apsw-3.7.8-r1.zip new file mode 100644 index 0000000..0967ad5 --- /dev/null +++ b/apsw-3.7.8-r1.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:818bb96680829c8dedb7db5453596e4f02dd7ad6e5b58e9e3b5f00e5c74a7ea4 +size 607540 diff --git a/python-apsw.changes b/python-apsw.changes index bf90bc2..018b5a3 100644 --- a/python-apsw.changes +++ b/python-apsw.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Dec 12 19:35:39 UTC 2011 - pascal.bleser@opensuse.org + +- build for all supported versions from a single spec +- link dynamically against the sqlite3 version that ships with each distro + version, rather than using amalgamation: this is required by s3ql + ------------------------------------------------------------------- Mon Aug 9 15:40:35 UTC 2010 - pascal.bleser@opensuse.org diff --git a/python-apsw.spec b/python-apsw.spec index b80d97d..5380d45 100644 --- a/python-apsw.spec +++ b/python-apsw.spec @@ -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 diff --git a/sqlite-amalgamation-3.7.0.1.tar.bz2 b/sqlite-amalgamation-3.7.0.1.tar.bz2 deleted file mode 100644 index 569de15..0000000 --- a/sqlite-amalgamation-3.7.0.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fa83857ec7e698cce862b45e16ec2c2e6feee5ef4804d68a28d8884c97952a3d -size 1107921 diff --git a/sqlite-fix_pointer_casts.patch b/sqlite-fix_pointer_casts.patch deleted file mode 100644 index 44d4eb7..0000000 --- a/sqlite-fix_pointer_casts.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- sqlite3.c.orig 2010-08-09 17:30:07.000000000 +0200 -+++ sqlite3.c 2010-08-09 17:30:56.000000000 +0200 -@@ -570,6 +570,8 @@ - #define _SQLITE3_H_ - #include /* Needed for the definition of va_list */ - -+#include /* Needed for intptr_t */ -+ - /* - ** Make sure we can call this stuff from C++. - */ -@@ -117745,7 +117747,7 @@ - Rtree *pRtree; - int nDb; /* Length of string argv[1] */ - int nName; /* Length of string argv[2] */ -- int eCoordType = (int)pAux; -+ intptr_t eCoordType = (intptr_t)pAux; - - const char *aErrMsg[] = { - 0, /* 0 */