OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   06-Aug-2006 10:59:24
  Branch: HEAD                             Handle: 2006080609592300

  Modified files:
    openpkg-src/python-db   python-db.patch python-db.spec

  Log:
    upgrade PgSQL binding; fix Oracle binding; add a second contributed
    Oracle binding (untested)

  Summary:
    Revision    Changes     Path
    1.7         +6  -6      openpkg-src/python-db/python-db.patch
    1.13        +28 -4      openpkg-src/python-db/python-db.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/python-db/python-db.patch
  ============================================================================
  $ cvs diff -u -r1.6 -r1.7 python-db.patch
  --- openpkg-src/python-db/python-db.patch     11 Jun 2006 19:59:18 -0000      
1.6
  +++ openpkg-src/python-db/python-db.patch     6 Aug 2006 08:59:23 -0000       
1.7
  @@ -1,6 +1,6 @@
  -Index: psycopg2-2.0.2/psycopg/config.h
  ---- psycopg2-2.0.2/psycopg/config.h.orig     2006-02-11 19:56:19 +0100
  -+++ psycopg2-2.0.2/psycopg/config.h  2006-03-07 21:54:38 +0100
  +Index: psycopg2-2.0.4/psycopg/config.h
  +--- psycopg2-2.0.4/psycopg/config.h.orig     2006-02-11 19:56:19 +0100
  ++++ psycopg2-2.0.4/psycopg/config.h  2006-03-07 21:54:38 +0100
   @@ -104,10 +104,11 @@
    
    #if defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__)
  @@ -14,9 +14,9 @@
    #endif
    
    /* postgresql < 7.4 does not have PQfreemem */
  -Index: psycopg2-2.0.2/setup.py
  ---- psycopg2-2.0.2/setup.py.orig     2006-02-11 19:58:38 +0100
  -+++ psycopg2-2.0.2/setup.py  2006-03-07 21:54:38 +0100
  +Index: psycopg2-2.0.4/setup.py
  +--- psycopg2-2.0.4/setup.py.orig     2006-02-11 19:58:38 +0100
  ++++ psycopg2-2.0.4/setup.py  2006-03-07 21:54:38 +0100
   @@ -143,6 +143,9 @@
    
            self.include_dirs.append(".")        
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/python-db/python-db.spec
  ============================================================================
  $ cvs diff -u -r1.12 -r1.13 python-db.spec
  --- openpkg-src/python-db/python-db.spec      4 Jul 2006 22:22:08 -0000       
1.12
  +++ openpkg-src/python-db/python-db.spec      6 Aug 2006 08:59:23 -0000       
1.13
  @@ -28,9 +28,10 @@
   %define       V_python         2.4
   %define       V_pysqlite_major 2.3
   %define       V_pysqlite       2.3.2
  -%define       V_psycopg2       2.0.2
  +%define       V_psycopg2       2.0.4
   %define       V_dcoracle2      1.2
   %define       V_mysql_python   1.2.1_p2
  +%define       V_cx_oracle      4.2
   
   #   package information
   Name:         python-db
  @@ -43,7 +44,7 @@
   Group:        Language
   License:      GPL
   Version:      %{V_python}
  -Release:      20060705
  +Release:      20060806
   
   #   package options
   %option       with_sqlite     yes
  @@ -56,6 +57,7 @@
   Source1:      
http://initd.org/pub/software/psycopg/psycopg2-%{V_psycopg2}.tar.gz
   Source2:      
http://www.zope.org/Members/matt/dco2/%{V_dcoracle2}/DCOracle2-%{V_dcoracle2}.tgz
   Source3:      
http://switch.dl.sourceforge.net/mysql-python/MySQL-python-%{V_mysql_python}.tar.gz
  +Source4:      
http://switch.dl.sourceforge.net/cx-oracle/cx_Oracle-%{V_cx_oracle}.tar.gz
   Patch0:       python-db.patch
   
   #   build information
  @@ -112,12 +114,18 @@
           url       = http://www.zope.org/Members/matt/dco2/
           regex     = DCOracle2-(\d+\.[\d\.]+)\.tgz
       }
  +    prog python-db:cx_oracle = {
  +        version   = %{V_cx_oracle}
  +        url       = http://prdownloads.sourceforge.net/cx-oracle/
  +        regex     = cx_Oracle-(__VER__)\.tar\.gz
  +    }
   
   %prep
       %setup -q -c
       %setup -q -T -D -a 1
       %setup -q -T -D -a 2
       %setup -q -T -D -a 3
  +    %setup -q -T -D -a 4
       %patch -p0
   
   %build
  @@ -141,7 +149,7 @@
       ) || exit $?
   %endif
   %if "%{with_oracle}" == "yes"
  -    ( cd DCOracle2-%{V_dcoracle2}
  +    ( cd DCOracle2
         %{l_shtool} subst \
             -e 's;^\(PYTHON=\).*$;\1 %{l_prefix}/bin/python;' \
             Makefile
  @@ -150,6 +158,14 @@
         %{l_prefix}/bin/python setup.py build
         MAKE="%{l_make}" %{l_make} %{l_mflags -O} DCOracle2/dco2.so
       ) || exit $?
  +    ( cd cx_Oracle-%{V_cx_oracle}
  +      %{l_shtool} subst \
  +          -e 's;^\(PYTHON=\).*$;\1 %{l_prefix}/bin/python;' \
  +          Makefile
  +      ORACLE_HOME="`%{l_rc} --query oracle_home`"
  +      export ORACLE_HOME
  +      %{l_prefix}/bin/python setup.py build
  +    ) || exit $?
   %endif
   
   %install
  @@ -182,7 +198,15 @@
       ) || exit $?
   %endif
   %if "%{with_oracle}" == "yes"
  -    ( cd DCOracle2-%{V_dcoracle2}
  +    ( cd DCOracle2
  +      ORACLE_HOME="`%{l_rc} --query oracle_home`"
  +      export ORACLE_HOME
  +      %{l_prefix}/bin/python setup.py install \
  +          --skip-build \
  +          --root=$RPM_BUILD_ROOT \
  +          --prefix=%{l_prefix}
  +    ) || exit $?
  +    ( cd cx_Oracle-%{V_cx_oracle}
         ORACLE_HOME="`%{l_rc} --query oracle_home`"
         export ORACLE_HOME
         %{l_prefix}/bin/python setup.py install \
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to