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

  Server: cvs.openpkg.org                  Name:   Christoph Schug
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   19-Dec-2002 13:54:08
  Branch: HEAD                             Handle: 2002121912540700

  Modified files:
    openpkg-src/postgresql  postgresql.spec

  Log:
    added support for libpq++

  Summary:
    Revision    Changes     Path
    1.23        +42 -6      openpkg-src/postgresql/postgresql.spec
  ____________________________________________________________________________

  Index: openpkg-src/postgresql/postgresql.spec
  ============================================================
  $ cvs diff -u -r1.22 -r1.23 postgresql.spec
  --- openpkg-src/postgresql/postgresql.spec    18 Dec 2002 16:09:40 -0000      1.22
  +++ openpkg-src/postgresql/postgresql.spec    19 Dec 2002 12:54:07 -0000      1.23
  @@ -37,6 +37,9 @@
   %define       with_tcl      no
   %endif
   
  +#   package component versions
  +%define       V_libpqxx     4.0
  +
   #   package information
   Name:         postgresql
   Summary:      PostgreSQL Database
  @@ -47,12 +50,13 @@
   Group:        Database
   License:      GPL
   Version:      7.3
  -Release:      20021218
  +Release:      20021219
   
   #   list of sources
   Source0:      
ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.gz
  -Source1:      rc.postgresql
  -Source2:      pg_migrate
  +Source1:      
ftp://gborg.postgresql.org/pub/libpqpp/stable/libpq++-%{V_libpqxx}.tar.gz
  +Source2:      rc.postgresql
  +Source3:      pg_migrate
   
   #   build information
   Prefix:       %{l_prefix}
  @@ -90,13 +94,14 @@
        --define 'with_tcl %{with_tcl}'
   
   %prep
  -    %setup -q
  +    %setup0 -q
  +    %setup1 -q -T -D -a 1
       %{l_shtool} subst \
           -e 
's;\(#define.*DEFAULT_PGSOCKET_DIR[^"]*"\)/tmp\("\);\1%{l_prefix}/var/postgresql/run\2;'
 \
           src/include/pg_config.h.in
   
   %build
  -    #    configure package
  +    #   configure package
       CC="%{l_cc}"; export CC
       CFLAGS="%{l_cflags -O}"; export CFLAGS
       CPPFLAGS="%{l_cppflags}"; export CPPFLAGS
  @@ -126,9 +131,22 @@
           --without-CXX \
           --disable-syslog
   
  -    #    build package
  +    #   build package
       %{l_make} %{l_mflags -O}
   
  +    #   build libpq++ (C++ bindings)
  +    ( cd libpq++-%{V_libpqxx}
  +      CXX="%{l_cxx}"
  +      CFLAGS="%{l_cflags -O}"
  +      CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT= -I. 
-I../src/interfaces -I../src/interfaces/libpq %{l_cppflags}"
  +      LDFLAGS="%{l_ldflags}"
  +      OBJS="pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o"
  +      for o in $OBJS; do
  +          $CXX $CFLAGS $CPPFLAGS $LDFLAGS -c -o $o `basename $o .o`.cc
  +      done
  +      ar r libpq++.a $OBJS
  +    )
  +
   %install
       rm -rf $RPM_BUILD_ROOT
   
  @@ -178,6 +196,24 @@
           -e 's;@l_rgrp@;%{l_rgrp};g' \
           %{SOURCE pg_migrate} \
           $RPM_BUILD_ROOT%{l_prefix}/bin/
  +
  +    #   install libpq++ (C++ bindings)
  +    ( cd libpq++-%{V_libpqxx}
  +      %{l_shtool} mkdir -f -p -m 755 \
  +          $RPM_BUILD_ROOT%{l_prefix}/include/libpq++
  +      %{l_shtool} install -c -m 644 \
  +          libpq++.h \
  +          pgconnection.h \
  +          pgdatabase.h \
  +          pgtransdb.h \
  +          pgcursordb.h \
  +          pglobject.h \
  +          $RPM_BUILD_ROOT%{l_prefix}/include/libpq++/
  +      %{l_shtool} install -c -m 644 \
  +          libpq++.a \
  +          $RPM_BUILD_ROOT%{l_prefix}/lib/
  +      
  +    )
   
       #   install run-command script
       %{l_shtool} mkdir -f -p -m 755 \
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to