Browse Source

upgrade pgcluster and libpqxx and remove ancient libpg++

Ralf S. Engelschall 18 years ago
parent
commit
4122745785
2 changed files with 45 additions and 109 deletions
  1. 23 55
      postgresql/postgresql.spec
  2. 22 54
      postgresql83/postgresql83.spec

+ 23 - 55
postgresql/postgresql.spec

@@ -24,16 +24,15 @@
 
 
 #   package versions
 #   package versions
 %define       V_postgresql      8.2.5
 %define       V_postgresql      8.2.5
-%define       V_libpqpp         4.0
-%define       V_libpqxx         2.5.5
+%define       V_libpqxx         2.6.9
 %define       V_perl            5.8.8
 %define       V_perl            5.8.8
 %define       V_pgperl          2.0.2
 %define       V_pgperl          2.0.2
 %define       V_psqlodbc        08.02.0500
 %define       V_psqlodbc        08.02.0500
 %define       V_pgjdbc          8.2-507
 %define       V_pgjdbc          8.2-507
 %define       V_slony1          1.2.6
 %define       V_slony1          1.2.6
 %define       V_slony1_dir      1215
 %define       V_slony1_dir      1215
-%define       V_pgcluster       1.7.0rc6
-%define       V_pgcluster_dir   1371
+%define       V_pgcluster       1.7.0rc7
+%define       V_pgcluster_dir   1372
 %define       V_mysqlcompat     1.0b3
 %define       V_mysqlcompat     1.0b3
 %define       V_mysqlcompat_dir 548
 %define       V_mysqlcompat_dir 548
 
 
@@ -48,7 +47,7 @@ Class:        BASE
 Group:        Database
 Group:        Database
 License:      GPL
 License:      GPL
 Version:      %{V_postgresql}
 Version:      %{V_postgresql}
-Release:      20071203
+Release:      20071215
 
 
 #   package options
 #   package options
 %option       with_server       yes
 %option       with_server       yes
@@ -66,17 +65,16 @@ Release:      20071203
 
 
 #   list of sources
 #   list of sources
 Source0:      ftp://ftp.postgresql.org/pub/source/v%{V_postgresql}/postgresql-%{V_postgresql}.tar.bz2
 Source0:      ftp://ftp.postgresql.org/pub/source/v%{V_postgresql}/postgresql-%{V_postgresql}.tar.bz2
-Source1:      ftp://gborg.postgresql.org/pub/libpqpp/stable/libpq++-%{V_libpqpp}.tar.gz
-Source2:      ftp://gborg.postgresql.org/pub/libpqxx/stable/libpqxx-%{V_libpqxx}.tar.gz
-Source3:      ftp://gborg.postgresql.org/pub/pgperl/stable/pgperl-%{V_pgperl}.tar.gz
-Source4:      ftp://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-%{V_psqlodbc}.tar.gz
-Source5:      http://pgfoundry.org/frs/download.php/%{V_slony1_dir}/slony1-%{V_slony1}-tar.bz2
-Source6:      http://pgfoundry.org/frs/download.php/%{V_pgcluster_dir}/pgcluster-%{V_pgcluster}-patch.tar.gz
-Source7:      http://pgfoundry.org/frs/download.php/%{V_mysqlcompat_dir}/mysqlcompat-%{V_mysqlcompat}.tar.gz
-Source8:      http://jdbc.postgresql.org/download/postgresql-jdbc-%{V_pgjdbc}.src.tar.gz
-Source9:      rc.postgresql
-Source10:     pg_migrate
-Source11:     pg_passwd
+Source1:      http://pqxx.org/download/software/libpqxx/libpqxx-%{V_libpqxx}.tar.gz
+Source2:      ftp://gborg.postgresql.org/pub/pgperl/stable/pgperl-%{V_pgperl}.tar.gz
+Source3:      ftp://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-%{V_psqlodbc}.tar.gz
+Source4:      http://pgfoundry.org/frs/download.php/%{V_slony1_dir}/slony1-%{V_slony1}-tar.bz2
+Source5:      http://pgfoundry.org/frs/download.php/%{V_pgcluster_dir}/pgcluster-%{V_pgcluster}.patch.tar.gz
+Source6:      http://pgfoundry.org/frs/download.php/%{V_mysqlcompat_dir}/mysqlcompat-%{V_mysqlcompat}.tar.gz
+Source7:      http://jdbc.postgresql.org/download/postgresql-jdbc-%{V_pgjdbc}.src.tar.gz
+Source8:      rc.postgresql
+Source9:      pg_migrate
+Source10:     pg_passwd
 Patch0:       postgresql.patch
 Patch0:       postgresql.patch
 
 
 #   build information
 #   build information
@@ -132,18 +130,13 @@ AutoReqProv:  no
     prog postgresql = {
     prog postgresql = {
         version   = %{V_postgresql}
         version   = %{V_postgresql}
         url       = ftp://ftp.postgresql.org/pub/source/
         url       = ftp://ftp.postgresql.org/pub/source/
-        regex     = v(\d+\.\d+(\.\d+)*)
+        regex     = v(8\.2(\.\d+)*)
         url       = ftp://ftp.postgresql.org/pub/source/v__NEWVER__/
         url       = ftp://ftp.postgresql.org/pub/source/v__NEWVER__/
         regex     = postgresql-(\d+(\.\d+)+)\.tar\.(bz2|gz)
         regex     = postgresql-(\d+(\.\d+)+)\.tar\.(bz2|gz)
     }
     }
-    prog postgresql:libpq++ = {
-        version   = %{V_libpqpp}
-        url       = ftp://gborg.postgresql.org/pub/libpqpp/stable/
-        regex     = libpq\+\+-(__VER__)\.tar\.gz
-    }
     prog postgresql:libpqxx = {
     prog postgresql:libpqxx = {
         version   = %{V_libpqxx}
         version   = %{V_libpqxx}
-        url       = ftp://gborg.postgresql.org/pub/libpqxx/stable/
+        url       = http://pqxx.org/development/libpqxx/wiki/DownloadPage
         regex     = libpqxx-(__VER__)\.tar\.gz
         regex     = libpqxx-(__VER__)\.tar\.gz
     }
     }
     prog postgresql:pgperl = {
     prog postgresql:pgperl = {
@@ -170,7 +163,7 @@ AutoReqProv:  no
     prog postgresql:pgcluster = {
     prog postgresql:pgcluster = {
         version   = %{V_pgcluster}.%{V_pgcluster_dir}
         version   = %{V_pgcluster}.%{V_pgcluster_dir}
         url       = http://pgfoundry.org/frs/?group_id=1000072
         url       = http://pgfoundry.org/frs/?group_id=1000072
-        regex     = /(\d+/pgcluster-__VER__)-patch\.tar\.gz
+        regex     = /(\d+/pgcluster-__VER__)\.patch\.tar\.gz
         transform = "s/^(\\d+)\/pgcluster-(.+)$/$2.$1/; $_"
         transform = "s/^(\\d+)\/pgcluster-(.+)$/$2.$1/; $_"
     }
     }
     prog postgresql:mysqlcompat = {
     prog postgresql:mysqlcompat = {
@@ -185,7 +178,6 @@ AutoReqProv:  no
     %patch -p0
     %patch -p0
 %if "%{with_cxx}" == "yes"
 %if "%{with_cxx}" == "yes"
     %setup -q -T -D -a 1
     %setup -q -T -D -a 1
-    %setup -q -T -D -a 2
     case "%{l_platform -t}" in
     case "%{l_platform -t}" in
         *-sunos* )
         *-sunos* )
             %{l_shtool} subst \
             %{l_shtool} subst \
@@ -206,24 +198,24 @@ AutoReqProv:  no
         libpqxx-%{V_libpqxx}/configure
         libpqxx-%{V_libpqxx}/configure
 %endif
 %endif
 %if "%{with_perl}" == "yes"
 %if "%{with_perl}" == "yes"
-    %setup -q -T -D -a 3
+    %setup -q -T -D -a 2
 %endif
 %endif
 %if "%{with_odbc}" == "yes"
 %if "%{with_odbc}" == "yes"
-    %setup -q -T -D -a 4
+    %setup -q -T -D -a 3
 %endif
 %endif
 %if "%{with_slony1}" == "yes"
 %if "%{with_slony1}" == "yes"
-    %setup -q -T -D -a 5
+    %setup -q -T -D -a 4
 %endif
 %endif
 %if "%{with_pgcluster}" == "yes"
 %if "%{with_pgcluster}" == "yes"
-    %setup -q -T -D -a 6
+    %setup -q -T -D -a 5
     sed -e '/^diff.*libpq\.rc/,/^diff/d' pgcluster-*-patch |\
     sed -e '/^diff.*libpq\.rc/,/^diff/d' pgcluster-*-patch |\
     %{l_patch} -p1
     %{l_patch} -p1
 %endif
 %endif
 %if "%{with_mysqlcompat}" == "yes"
 %if "%{with_mysqlcompat}" == "yes"
-    %setup -q -T -D -a 7
+    %setup -q -T -D -a 6
 %endif
 %endif
 %if "%{with_jdbc}" == "yes"
 %if "%{with_jdbc}" == "yes"
-    %setup -q -T -D -a 8
+    %setup -q -T -D -a 7
 %endif
 %endif
 
 
     #   adjust source tree
     #   adjust source tree
@@ -299,20 +291,6 @@ AutoReqProv:  no
 
 
     #   build C++ bindings (both old and new one)
     #   build C++ bindings (both old and new one)
 %if "%{with_cxx}" == "yes"
 %if "%{with_cxx}" == "yes"
-    ( cd libpq++-%{V_libpqpp}
-      CXX="%{l_cxx}"
-      CFLAGS="%{l_cflags -O}"
-      CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT= "
-      CPPFLAGS="$CPPFLAGS -I. -I../src/interfaces/libpq -I../src/interfaces"
-      CPPFLAGS="$CPPFLAGS -I../src/include %{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 `echo $o | sed -e 's;\.o$;.cc;'`
-      done
-      rm -f libpq++.a
-      ar rc libpq++.a $OBJS
-    ) || exit $?
     ln -s `pwd`/src/interfaces/libpq/*.h src/include/
     ln -s `pwd`/src/interfaces/libpq/*.h src/include/
     ( cd libpqxx-%{V_libpqxx}
     ( cd libpqxx-%{V_libpqxx}
       %{l_shtool} subst \
       %{l_shtool} subst \
@@ -474,16 +452,6 @@ AutoReqProv:  no
 
 
     #   install C++ bindings (both old and new one)
     #   install C++ bindings (both old and new one)
 %if "%{with_cxx}" == "yes"
 %if "%{with_cxx}" == "yes"
-    ( cd libpq++-%{V_libpqpp}
-      %{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/
-    ) || exit $?
     ( cd libpqxx-%{V_libpqxx}
     ( cd libpqxx-%{V_libpqxx}
       %{l_shtool} mkdir -f -p -m 755 \
       %{l_shtool} mkdir -f -p -m 755 \
           $RPM_BUILD_ROOT%{l_prefix}/include/pqxx
           $RPM_BUILD_ROOT%{l_prefix}/include/pqxx

+ 22 - 54
postgresql83/postgresql83.spec

@@ -26,16 +26,15 @@
 %define       V_postgresql      8.3b4
 %define       V_postgresql      8.3b4
 %define       V_postgresql_dist 8.3beta4
 %define       V_postgresql_dist 8.3beta4
 %define       V_postgresql_dir  8.3beta4
 %define       V_postgresql_dir  8.3beta4
-%define       V_libpqpp         4.0
-%define       V_libpqxx         2.5.5
+%define       V_libpqxx         2.6.9
 %define       V_perl            5.8.8
 %define       V_perl            5.8.8
 %define       V_pgperl          2.0.2
 %define       V_pgperl          2.0.2
 %define       V_psqlodbc        08.02.0500
 %define       V_psqlodbc        08.02.0500
 %define       V_pgjdbc          8.2-507
 %define       V_pgjdbc          8.2-507
 %define       V_slony1          1.2.6
 %define       V_slony1          1.2.6
 %define       V_slony1_dir      1215
 %define       V_slony1_dir      1215
-%define       V_pgcluster       1.7.0rc6
-%define       V_pgcluster_dir   1371
+%define       V_pgcluster       1.7.0rc7
+%define       V_pgcluster_dir   1372
 %define       V_mysqlcompat     1.0b3
 %define       V_mysqlcompat     1.0b3
 %define       V_mysqlcompat_dir 548
 %define       V_mysqlcompat_dir 548
 
 
@@ -50,7 +49,7 @@ Class:        EVAL
 Group:        Database
 Group:        Database
 License:      GPL
 License:      GPL
 Version:      %{V_postgresql}
 Version:      %{V_postgresql}
-Release:      20071210
+Release:      20071215
 
 
 #   package options
 #   package options
 %option       with_server       yes
 %option       with_server       yes
@@ -69,17 +68,16 @@ Release:      20071210
 
 
 #   list of sources
 #   list of sources
 Source0:      ftp://ftp.postgresql.org/pub/source/v%{V_postgresql_dir}/postgresql-%{V_postgresql_dist}.tar.bz2
 Source0:      ftp://ftp.postgresql.org/pub/source/v%{V_postgresql_dir}/postgresql-%{V_postgresql_dist}.tar.bz2
-Source1:      ftp://gborg.postgresql.org/pub/libpqpp/stable/libpq++-%{V_libpqpp}.tar.gz
-Source2:      ftp://gborg.postgresql.org/pub/libpqxx/stable/libpqxx-%{V_libpqxx}.tar.gz
-Source3:      ftp://gborg.postgresql.org/pub/pgperl/stable/pgperl-%{V_pgperl}.tar.gz
-Source4:      ftp://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-%{V_psqlodbc}.tar.gz
-Source5:      http://pgfoundry.org/frs/download.php/%{V_slony1_dir}/slony1-%{V_slony1}-tar.bz2
-Source6:      http://pgfoundry.org/frs/download.php/%{V_pgcluster_dir}/pgcluster-%{V_pgcluster}-patch.tar.gz
-Source7:      http://pgfoundry.org/frs/download.php/%{V_mysqlcompat_dir}/mysqlcompat-%{V_mysqlcompat}.tar.gz
-Source8:      http://jdbc.postgresql.org/download/postgresql-jdbc-%{V_pgjdbc}.src.tar.gz
-Source9:      rc.postgresql
-Source10:     pg_migrate
-Source11:     pg_passwd
+Source1:      http://pqxx.org/download/software/libpqxx/libpqxx-%{V_libpqxx}.tar.gz
+Source2:      ftp://gborg.postgresql.org/pub/pgperl/stable/pgperl-%{V_pgperl}.tar.gz
+Source3:      ftp://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-%{V_psqlodbc}.tar.gz
+Source4:      http://pgfoundry.org/frs/download.php/%{V_slony1_dir}/slony1-%{V_slony1}-tar.bz2
+Source5:      http://pgfoundry.org/frs/download.php/%{V_pgcluster_dir}/pgcluster-%{V_pgcluster}.patch.tar.gz
+Source6:      http://pgfoundry.org/frs/download.php/%{V_mysqlcompat_dir}/mysqlcompat-%{V_mysqlcompat}.tar.gz
+Source7:      http://jdbc.postgresql.org/download/postgresql-jdbc-%{V_pgjdbc}.src.tar.gz
+Source8:      rc.postgresql
+Source9:      pg_migrate
+Source10:     pg_passwd
 Patch0:       postgresql83.patch
 Patch0:       postgresql83.patch
 
 
 #   build information
 #   build information
@@ -145,14 +143,9 @@ Conflicts:    postgresql
         url       = ftp://ftp.postgresql.org/pub/source/v__NEWVER__/
         url       = ftp://ftp.postgresql.org/pub/source/v__NEWVER__/
         regex     = postgresql-(\d+(\.\d+)+)\.tar\.(bz2|gz)
         regex     = postgresql-(\d+(\.\d+)+)\.tar\.(bz2|gz)
     }
     }
-    prog postgresql83:libpq++ = {
-        version   = %{V_libpqpp}
-        url       = ftp://gborg.postgresql.org/pub/libpqpp/stable/
-        regex     = libpq\+\+-(__VER__)\.tar\.gz
-    }
     prog postgresql83:libpqxx = {
     prog postgresql83:libpqxx = {
         version   = %{V_libpqxx}
         version   = %{V_libpqxx}
-        url       = ftp://gborg.postgresql.org/pub/libpqxx/stable/
+        url       = http://pqxx.org/development/libpqxx/wiki/DownloadPage
         regex     = libpqxx-(__VER__)\.tar\.gz
         regex     = libpqxx-(__VER__)\.tar\.gz
     }
     }
     prog postgresql83:pgperl = {
     prog postgresql83:pgperl = {
@@ -179,7 +172,7 @@ Conflicts:    postgresql
     prog postgresql83:pgcluster = {
     prog postgresql83:pgcluster = {
         version   = %{V_pgcluster}.%{V_pgcluster_dir}
         version   = %{V_pgcluster}.%{V_pgcluster_dir}
         url       = http://pgfoundry.org/frs/?group_id=1000072
         url       = http://pgfoundry.org/frs/?group_id=1000072
-        regex     = /(\d+/pgcluster-__VER__)-patch\.tar\.gz
+        regex     = /(\d+/pgcluster-__VER__)\.patch\.tar\.gz
         transform = "s/^(\\d+)\/pgcluster-(.+)$/$2.$1/; $_"
         transform = "s/^(\\d+)\/pgcluster-(.+)$/$2.$1/; $_"
     }
     }
     prog postgresql83:mysqlcompat = {
     prog postgresql83:mysqlcompat = {
@@ -194,7 +187,6 @@ Conflicts:    postgresql
     %patch -p0
     %patch -p0
 %if "%{with_cxx}" == "yes"
 %if "%{with_cxx}" == "yes"
     %setup -q -T -D -a 1
     %setup -q -T -D -a 1
-    %setup -q -T -D -a 2
     case "%{l_platform -t}" in
     case "%{l_platform -t}" in
         *-sunos* )
         *-sunos* )
             %{l_shtool} subst \
             %{l_shtool} subst \
@@ -215,24 +207,24 @@ Conflicts:    postgresql
         libpqxx-%{V_libpqxx}/configure
         libpqxx-%{V_libpqxx}/configure
 %endif
 %endif
 %if "%{with_perl}" == "yes"
 %if "%{with_perl}" == "yes"
-    %setup -q -T -D -a 3
+    %setup -q -T -D -a 2
 %endif
 %endif
 %if "%{with_odbc}" == "yes"
 %if "%{with_odbc}" == "yes"
-    %setup -q -T -D -a 4
+    %setup -q -T -D -a 3
 %endif
 %endif
 %if "%{with_slony1}" == "yes"
 %if "%{with_slony1}" == "yes"
-    %setup -q -T -D -a 5
+    %setup -q -T -D -a 4
 %endif
 %endif
 %if "%{with_pgcluster}" == "yes"
 %if "%{with_pgcluster}" == "yes"
-    %setup -q -T -D -a 6
+    %setup -q -T -D -a 5
     sed -e '/^diff.*libpq\.rc/,/^diff/d' pgcluster-*-patch |\
     sed -e '/^diff.*libpq\.rc/,/^diff/d' pgcluster-*-patch |\
     %{l_patch} -p1
     %{l_patch} -p1
 %endif
 %endif
 %if "%{with_mysqlcompat}" == "yes"
 %if "%{with_mysqlcompat}" == "yes"
-    %setup -q -T -D -a 7
+    %setup -q -T -D -a 6
 %endif
 %endif
 %if "%{with_jdbc}" == "yes"
 %if "%{with_jdbc}" == "yes"
-    %setup -q -T -D -a 8
+    %setup -q -T -D -a 7
 %endif
 %endif
 
 
     #   adjust source tree
     #   adjust source tree
@@ -315,20 +307,6 @@ Conflicts:    postgresql
 
 
     #   build C++ bindings (both old and new one)
     #   build C++ bindings (both old and new one)
 %if "%{with_cxx}" == "yes"
 %if "%{with_cxx}" == "yes"
-    ( cd libpq++-%{V_libpqpp}
-      CXX="%{l_cxx}"
-      CFLAGS="%{l_cflags -O}"
-      CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT= "
-      CPPFLAGS="$CPPFLAGS -I. -I../src/interfaces/libpq -I../src/interfaces"
-      CPPFLAGS="$CPPFLAGS -I../src/include %{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 `echo $o | sed -e 's;\.o$;.cc;'`
-      done
-      rm -f libpq++.a
-      ar rc libpq++.a $OBJS
-    ) || exit $?
     ln -s `pwd`/src/interfaces/libpq/*.h src/include/
     ln -s `pwd`/src/interfaces/libpq/*.h src/include/
     ( cd libpqxx-%{V_libpqxx}
     ( cd libpqxx-%{V_libpqxx}
       %{l_shtool} subst \
       %{l_shtool} subst \
@@ -490,16 +468,6 @@ Conflicts:    postgresql
 
 
     #   install C++ bindings (both old and new one)
     #   install C++ bindings (both old and new one)
 %if "%{with_cxx}" == "yes"
 %if "%{with_cxx}" == "yes"
-    ( cd libpq++-%{V_libpqpp}
-      %{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/
-    ) || exit $?
     ( cd libpqxx-%{V_libpqxx}
     ( cd libpqxx-%{V_libpqxx}
       %{l_shtool} mkdir -f -p -m 755 \
       %{l_shtool} mkdir -f -p -m 755 \
           $RPM_BUILD_ROOT%{l_prefix}/include/pqxx
           $RPM_BUILD_ROOT%{l_prefix}/include/pqxx