# HG changeset patch # User Michael Schloh von Bennewitz # Date 1300819580 -3600 # Node ID 1f760a8355e2acb4db39cc5d8ee568ab924648af # Parent fc0449ec63bb94347f7d8fe53467a5cf8c33b73f Backport RPM boilerplate logic for legacy OpenPKG and update versions. diff -r fc0449ec63bb -r 1f760a8355e2 python-db/python-db.patch --- a/python-db/python-db.patch Tue Mar 22 19:33:14 2011 +0100 +++ b/python-db/python-db.patch Tue Mar 22 19:46:20 2011 +0100 @@ -1,7 +1,8 @@ -Index: psycopg2-2.0.14/psycopg/config.h ---- psycopg2-2.0.14/psycopg/config.h.orig 2009-04-26 14:09:21 +0200 -+++ psycopg2-2.0.14/psycopg/config.h 2009-10-08 22:31:01 +0200 -@@ -140,10 +140,11 @@ +Index: psycopg2-2.4/psycopg/config.h +diff -Nau psycopg2-2.4psycopg/config.h.orig/ psycopg2-2.4/psycopg/config.h +--- psycopg2-2.4/psycopg/config.h.orig 2011-02-27 12:44:55.000000000 +0100 ++++ psycopg2-2.4/psycopg/config.h 2011-03-22 19:19:11.648184363 +0100 +@@ -141,10 +141,11 @@ #if (defined(__FreeBSD__) && __FreeBSD_version < 503000) || (defined(_WIN32) && !defined(__GNUC__)) || defined(__sun__) || defined(sun) /* what's this, we have no round function either? */ @@ -14,10 +15,11 @@ #endif /* postgresql < 7.4 does not have PQfreemem */ -Index: psycopg2-2.0.14/setup.py ---- psycopg2-2.0.14/setup.py.orig 2009-10-04 23:37:14 +0200 -+++ psycopg2-2.0.14/setup.py 2009-10-08 23:15:48 +0200 -@@ -203,6 +203,9 @@ +Index: psycopg2-2.4/setup.py +diff -Nau psycopg2-2.4/setup.py.orig/ psycopg2-2.4/setup.py +--- psycopg2-2.4/setup.py.orig 2011-02-27 12:46:47.000000000 +0100 ++++ psycopg2-2.4/setup.py 2011-03-22 19:36:51.906859031 +0100 +@@ -269,6 +269,9 @@ os.path.join(self.get_pg_config("libdir"), "libpq.a")) else: self.libraries.append("pq") diff -r fc0449ec63bb -r 1f760a8355e2 python-db/python-db.spec --- a/python-db/python-db.spec Tue Mar 22 19:33:14 2011 +0100 +++ b/python-db/python-db.spec Tue Mar 22 19:46:20 2011 +0100 @@ -21,16 +21,14 @@ ## SUCH DAMAGE. ## -# FIXME: rse: Oracle module was blindly packaged - # package version -%define V_python 2.5 -%define V_pysqlite_major 2.4 -%define V_pysqlite 2.4.1 -%define V_psycopg2 2.0.14 -%define V_mysql_python 1.2.3c1 -%define V_cx_oracle 5.0.3 -%define V_sqlobject 0.12.4 +%define V_python 2.7 +%define V_pysqlite 2.6.3 +%define V_psycopg2 2.4 +%define V_psycopg_maj 2-4 +%define V_mysql_python 1.2.3 +%define V_cx_oracle 5.1 +%define V_sqlobject 0.15.1 # package information Name: python-db @@ -43,7 +41,7 @@ Group: Language License: GPL Version: %{V_python} -Release: 20100506 +Release: 20110322 # package options %option with_sqlite yes @@ -52,16 +50,18 @@ %option with_oracle no # list of sources -Source0: http://initd.org/pub/software/pysqlite/releases/%{V_pysqlite_major}/%{V_pysqlite}/pysqlite-%{V_pysqlite}.tar.gz -Source1: http://initd.org/pub/software/psycopg/psycopg2-%{V_psycopg2}.tar.gz +Source0: http://pysqlite.googlecode.com/files/pysqlite-%{V_pysqlite}.tar.gz +Source1: http://www.psycopg.org/psycopg/tarballs/PSYCOPG-%{V_psycopg_maj}/psycopg2-%{V_psycopg2}.tar.gz Source2: http://switch.dl.sourceforge.net/mysql-python/MySQL-python-%{V_mysql_python}.tar.gz Source3: http://switch.dl.sourceforge.net/cx-oracle/cx_Oracle-%{V_cx_oracle}.tar.gz Source4: http://pypi.python.org/packages/source/S/SQLObject/SQLObject-%{V_sqlobject}.tar.gz Patch0: python-db.patch # build information -BuildPreReq: OpenPKG, openpkg >= 20100101, python >= %{V_python} -PreReq: OpenPKG, openpkg >= 20100101, python >= %{V_python} +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20060823, python >= %{V_python} +PreReq: OpenPKG, openpkg >= 20060823, python >= %{V_python} BuildPreReq: python-setup %if "%{with_sqlite}" == "yes" BuildPreReq: sqlite @@ -79,6 +79,8 @@ BuildPreReq: oracle PreReq: oracle %endif +AutoReq: no +AutoReqProv: no %description This packages provides Python DB-API 2.0 compliant bindings to @@ -159,6 +161,7 @@ ) || exit $? %install + rm -rf $RPM_BUILD_ROOT %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix} %if "%{with_sqlite}" == "yes" @@ -207,4 +210,5 @@ %files -f files %clean + rm -rf $RPM_BUILD_ROOT