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:   07-Mar-2006 18:34:01
  Branch: HEAD                             Handle: 2006030717340100

  Added files:
    openpkg-src/python-db   python-db.spec

  Log:
    new package: python-db 2.4 (Python DB-API 2.0 Modules)

  Summary:
    Revision    Changes     Path
    1.1         +203 -0     openpkg-src/python-db/python-db.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/python-db/python-db.spec
  ============================================================================
  $ cvs diff -u -r0 -r1.1 python-db.spec
  --- /dev/null 2006-03-07 18:33:35 +0100
  +++ python-db.spec    2006-03-07 18:34:01 +0100
  @@ -0,0 +1,203 @@
  +##
  +##  python-db.spec -- OpenPKG RPM Package Specification
  +##  Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  +##  Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
  +##
  +##  Permission to use, copy, modify, and distribute this software for
  +##  any purpose with or without fee is hereby granted, provided that
  +##  the above copyright notice and this permission notice appear in all
  +##  copies.
  +##
  +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  +##  SUCH DAMAGE.
  +##
  +
  +#   FIXME: rse: SQLite module still has some install problems
  +#   FIXME: rse: Oracle module was blindly packaged
  +
  +#   package version
  +%define       V_python         2.4
  +%define       V_pysqlite_major 2.1
  +%define       V_pysqlite       2.1.3
  +%define       V_psycopg2       2.0b8
  +%define       V_setuptools     0.6a9
  +%define       V_dcoracle2      1.2
  +%define       V_mysql_python   1.2.1c7
  +
  +#   package information
  +Name:         python-db
  +Summary:      Python DB-API 2.0 Modules
  +URL:          http://www.python.org/
  +Vendor:       Python Community
  +Packager:     OpenPKG
  +Distribution: OpenPKG
  +Class:        EVAL
  +Group:        Language
  +License:      GPL
  +Version:      %{V_python}
  +Release:      20060307
  +
  +#   package options
  +%option       with_sqlite     no
  +%option       with_pgsql      no
  +%option       with_mysql      no
  +%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
  +Source2:      
http://www.zope.org/Members/matt/dco2/%{V_dcoracle2}/DCOracle2-%{V_dcoracle2}.tgz
  +Source3:      
http://osdn.dl.sourceforge.net/mysql-python/MySQL-python-%{V_mysql_python}.tar.gz
  +Source4:      
http://cheeseshop.python.org/packages/%{V_python}/s/setuptools/setuptools-%{V_setuptools}-py%{V_python}.egg
  +Patch0:       python-db.patch
  +
  +#   build information
  +Prefix:       %{l_prefix}
  +BuildRoot:    %{l_buildroot}
  +BuildPreReq:  OpenPKG, openpkg >= 20040130, python
  +PreReq:       OpenPKG, openpkg >= 20040130, python
  +%if "%{with_sqlite}" == "yes"
  +BuildPreReq:  sqlite
  +PreReq:       sqlite
  +%endif
  +%if "%{with_pgsql}" == "yes"
  +BuildPreReq:  postgresql
  +PreReq:       postgresql
  +%endif
  +%if "%{with_mysql}" == "yes"
  +BuildPreReq:  mysql
  +PreReq:       mysql
  +%endif
  +%if "%{with_oracle}" == "yes"
  +BuildPreReq:  oracle
  +PreReq:       oracle
  +%endif
  +AutoReq:      no
  +AutoReqProv:  no
  +
  +%description
  +    This packages provides Python DB-API 2.0 compliant bindings to
  +    various RDBMS. It currently supports SQLite, PostgreSQL, MySQL and
  +    Oracle.
  +
  +%track
  +    prog python-db:pysqlite = {
  +        version   = %{V_pysqlite}
  +        url       = http://initd.org/pub/software/pysqlite/releases/
  +        regex     = (\d+\.\d+)/
  +        url       = 
http://initd.org/pub/software/pysqlite/releases/__NEWVER1__/
  +        regex     = (\d+\.\d+\.\d+)/
  +        url       = 
http://initd.org/pub/software/pysqlite/releases/__NEWVER1__/__NEWVER2__/
  +        regex     = pysqlite-(__VER__)\.tar\.gz
  +    }
  +    prog python-db:psycopg2 = {
  +        version   = %{V_psycopg2}
  +        url       = http://initd.org/pub/software/psycopg/
  +        regex     = psycopg2-(__VER__)\.tar\.gz
  +    }
  +    prog python-db:mysql-python = {
  +        version   = %{V_mysql_python}
  +        url       = http://prdownloads.sourceforge.net/mysql-python/
  +        regex     = MySQL-python-(__VER__)\.tar\.gz
  +    }
  +    prog python-db:dcoracle2 = {
  +        version   = %{V_dcoracle2}
  +        url       = http://www.zope.org/Members/matt/dco2/
  +        regex     = DCOracle2-(\d+\.[\d\.]+)\.tgz
  +    }
  +
  +%prep
  +    %setup -q -c
  +    %setup -q -T -D -a 1
  +    %setup -q -T -D -a 2
  +    %setup -q -T -D -a 3
  +    %patch -p0
  +
  +%build
  +%if "%{with_sqlite}" == "yes"
  +    ( cd pysqlite-%{V_pysqlite}
  +      cp %{SOURCE setuptools-%{V_setuptools}-py%{V_python}.egg} .
  +      %{l_shtool} subst \
  +          -e 's;/usr/local/include;%{l_prefix}/include;' \
  +          -e 's;/usr/local/lib;%{l_prefix}/lib;' \
  +          setup.cfg
  +      %{l_prefix}/bin/python setup.py build
  +    ) || exit $?
  +%endif
  +%if "%{with_pgsql}" == "yes"
  +    ( cd psycopg2-%{V_psycopg2}
  +      %{l_prefix}/bin/python setup.py build
  +    ) || exit $?
  +%endif
  +%if "%{with_mysql}" == "yes"
  +    ( cd MySQL-python-%{V_mysql_python}
  +      %{l_prefix}/bin/python setup.py build
  +    ) || exit $?
  +%endif
  +%if "%{with_oracle}" == "yes"
  +    ( cd DCOracle2-%{V_dcoracle2}
  +      %{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
  +      MAKE="%{l_make}" %{l_make} %{l_mflags -O} DCOracle2/dco2.so
  +    ) || exit $?
  +%endif
  +
  +%install
  +    rm -rf $RPM_BUILD_ROOT
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}
  +%if "%{with_sqlite}" == "yes"
  +    ( cd pysqlite-%{V_pysqlite}
  +      %{l_prefix}/bin/python setup.py install \
  +          --skip-build \
  +          --root=$RPM_BUILD_ROOT \
  +          --prefix=%{l_prefix}
  +    ) || exit $?
  +%endif
  +%if "%{with_pgsql}" == "yes"
  +    ( cd psycopg2-%{V_psycopg2}
  +      %{l_prefix}/bin/python setup.py install \
  +          --skip-build \
  +          --root=$RPM_BUILD_ROOT \
  +          --prefix=%{l_prefix}
  +    ) || exit $?
  +%endif
  +%if "%{with_mysql}" == "yes"
  +    ( cd MySQL-python-%{V_mysql_python}
  +      %{l_prefix}/bin/python setup.py install \
  +          --skip-build \
  +          --root=$RPM_BUILD_ROOT \
  +          --prefix=%{l_prefix}
  +    ) || exit $?
  +%endif
  +%if "%{with_oracle}" == "yes"
  +    ( cd DCOracle2-%{V_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 $?
  +%endif
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  +
  +%files -f files
  +
  +%clean
  +    rm -rf $RPM_BUILD_ROOT
  +
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to