OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web openpkg$ Date: 24-Jan-2003 10:26:23
Branch: HEAD Handle: 2003012409262002
Modified files:
openpkg-re/vcheck vc.postgresql
openpkg-src/postgresql postgresql.spec
openpkg-web news.txt
Log:
fully work off PostgreSQL
Summary:
Revision Changes Path
1.10 +22 -1 openpkg-re/vcheck/vc.postgresql
1.32 +115 -66 openpkg-src/postgresql/postgresql.spec
1.3024 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-re/vcheck/vc.postgresql
============================================================================
$ cvs diff -u -r1.9 -r1.10 vc.postgresql
--- openpkg-re/vcheck/vc.postgresql 22 Dec 2002 11:23:52 -0000 1.9
+++ openpkg-re/vcheck/vc.postgresql 24 Jan 2003 09:26:20 -0000 1.10
@@ -1,17 +1,38 @@
config = {
+ lastcheck = "2003-01-23 20:10"
}
prog postgresql = {
version = 7.3.1
+ lastcheck = "2003-01-23 20:10"
url = ftp://ftp.postgresql.org/pub/source/
regex = v(\d+\.\d+(\.\d+)*)(?!beta)
url = ftp://ftp.postgresql.org/pub/source/v__NEWVER__/
regex = postgresql-(__VER__)\.tar\.gz
}
-
prog postgresql:libpq++ = {
version = 4.0
+ lastcheck = "2003-01-23 20:10"
url = ftp://gborg.postgresql.org/pub/libpqpp/stable/
regex = libpq\+\+-(__VER__)\.tar\.gz
+}
+prog postgresql:libpqxx = {
+ version = 1.3.3
+ lastcheck = "2003-01-23 20:10"
+ url = ftp://gborg.postgresql.org/pub/libpqxx/stable/
+ regex = libpqxx-(__VER__)\.tar\.gz
+}
+prog postgresql:pgperl = {
+ version = 2.0.2
+ lastcheck = "2003-01-23 20:10"
+ url = ftp://gborg.postgresql.org/pub/pgperl/stable/
+ regex = pgperl-(__VER__)\.tar\.gz
+}
+prog postgresql:psqlodbc = {
+ version = 7.2.5
+ errors = 1
+ lastcheck = "2003-01-23 20:10"
+ url = ftp://ftp.us.postgresql.org/odbc/versions/src/
+ regex = psqlodbc-(__VER__)\.tar\.gz
}
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/postgresql/postgresql.spec
============================================================================
$ cvs diff -u -r1.31 -r1.32 postgresql.spec
--- openpkg-src/postgresql/postgresql.spec 3 Jan 2003 11:35:27 -0000 1.31
+++ openpkg-src/postgresql/postgresql.spec 24 Jan 2003 09:26:22 -0000 1.32
@@ -24,8 +24,11 @@
##
# package versions
-%define V_postgresql 7.3.1
-%define V_libpqxx 4.0
+%define V_postgresql 7.3.1
+%define V_libpqpp 4.0
+%define V_libpqxx 1.3.3
+%define V_pgperl 2.0.2
+%define V_psqlodbc 7.2.5
# package information
Name: postgresql
@@ -37,39 +40,34 @@
Group: Database
License: GPL
Version: %{V_postgresql}
-Release: 20030103
+Release: 20030124
# package options
-%option with_openssl no
-%option with_odbc no
+%option with_cxx no
%option with_perl no
-%option with_tcl no
+%option with_odbc no
# list of sources
Source0:
ftp://ftp.postgresql.org/pub/source/v%{V_postgresql}/postgresql-%{V_postgresql}.tar.gz
-Source1:
ftp://gborg.postgresql.org/pub/libpqpp/stable/libpq++-%{V_libpqxx}.tar.gz
-Source2: rc.postgresql
-Source3: pg_migrate
+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.us.postgresql.org/odbc/versions/src/psqlodbc-%{V_psqlodbc}.tar.gz
+Source5: rc.postgresql
+Source6: pg_migrate
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
-BuildPreReq: OpenPKG, openpkg >= 20030103, make, gcc, readline, flex, bison, zlib
+BuildPreReq: OpenPKG, openpkg >= 20030103, make, gcc, readline, flex, bison, zlib,
openssl
PreReq: OpenPKG, openpkg >= 20030103
-%if "%{with_openssl}" == "yes"
-BuildPreReq: openssl
-%endif
-%if "%{with_odbc}" == "yes"
-BuildPreReq: unixodbc
-PreReq: unixodbc
-%endif
%if "%{with_perl}" == "yes"
BuildPreReq: perl
PreReq: perl
%endif
-%if "%{with_tcl}" == "yes"
-BuildPreReq: tcl
-PreReq: tcl
+%if "%{with_odbc}" == "yes"
+BuildPreReq: unixodbc
+PreReq: unixodbc
%endif
AutoReq: no
AutoReqProv: no
@@ -82,58 +80,48 @@
%prep
%setup0 -q
+%if "%{with_cxx}" == "yes"
%setup1 -q -T -D -a 1
+ %setup2 -q -T -D -a 2
+%endif
+%if "%{with_perl}" == "yes"
+ %setup3 -q -T -D -a 3
+%endif
+%if "%{with_odbc}" == "yes"
+ %setup4 -q -T -D -a 4
+%endif
+
+ # adjust source tree
%{l_shtool} subst \
-e
's;\(#define.*DEFAULT_PGSOCKET_DIR[^"]*"\)/tmp\("\);\1%{l_prefix}/var/postgresql/run\2;'
\
src/include/pg_config.h.in
- case "%{l_target}" in
- *-solaris* )
- %{l_shtool} subst \
- -e 's;^\(sqlmansect *=\).*$;\1 7;' \
- src/makefiles/Makefile.solaris
- ;;
- esac
+ %{l_shtool} subst \
+ -e 's;^\(sqlmansect *=\).*$;\1 7;' \
+ src/makefiles/Makefile.solaris
%build
# configure package
- CC="%{l_cc}"; export CC
- CFLAGS="%{l_cflags -O}"; export CFLAGS
- CPPFLAGS="%{l_cppflags}"; export CPPFLAGS
- LDFLAGS="%{l_ldflags}"; export LDFLAGS
-%if "%{with_odbc}" == "yes"
-%endif
-%if "%{with_tcl}" == "yes"
- CFLAGS="$CFLAGS -I%{l_prefix}/include/tcl"
- LDFLAGS="$LDFLAGS -L%{l_prefix}/lib"
-%endif
+ CC="%{l_cc}" \
+ CFLAGS="%{l_cflags -O}" \
+ CPPFLAGS="%{l_cppflags}" \
+ LDFLAGS="%{l_ldflags}" \
./configure \
--prefix=%{l_prefix} \
-%if "%{with_openssl}" == "yes"
--with-openssl=%{l_prefix} \
-%endif
-%if "%{with_odbc}" == "yes"
- --enable-odbc \
- --with-unixodbc \
- --with-odbcinst=%{l_prefix}/etc/unixodbc \
-%endif
-%if "%{with_perl}" == "yes"
- --with-perl \
-%endif
-%if "%{with_tcl}" == "yes"
- --with-tcl \
-%endif
- --without-CXX \
+ --with-readline \
+ --with-zlib \
--disable-syslog
# build package
%{l_make} %{l_mflags -O}
- # build libpq++ (C++ bindings)
- ( cd libpq++-%{V_libpqxx}
+ # build C++ bindings (both old and new one)
+%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 -I../src/interfaces/libpq "
+ 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"
@@ -143,9 +131,60 @@
rm -f libpq++.a
ar rc libpq++.a $OBJS
)
+ ( cd libpqxx-%{V_libpqxx}
+ export CC="%{l_cc}"
+ export CXX="%{l_cxx}"
+ export CFLAGS="%{l_cflags -O}"
+ export CXXFLAGS="%{l_cxxflags -O}"
+ export CPPFLAGS="-I`pwd`/../src/include %{l_cppflags}"
+ export LDFLAGS="%{l_ldflags}"
+ ./configure \
+ --with-postgres-lib=`pwd`/../src/interfaces/libpq \
+ --with-postgres-include=`pwd`/../src/interfaces/libpq \
+ --disable-shared
+ %{l_make} %{l_mflags -O}
+ )
+%endif
+
+ # build Perl bindings
+%if "%{with_perl}" == "yes"
+ rm -rf $RPM_BUILD_ROOT
+ ( cd Pg-%{V_pgperl}
+ %{l_prefix}/bin/perl-openpkg prolog
+ export POSTGRES_INCLUDE=dummy
+ export POSTGRES_LIB=dummy
+ %{l_shtool} subst \
+ -e 's;-I$POSTGRES_INCLUDE;-I../src/interfaces/libpq -I../src/include;' \
+ -e 's;-L$POSTGRES_LIB;-L../src/interfaces/libpq;' \
+ Makefile.PL
+ %{l_prefix}/bin/perl-openpkg install
+ %{l_prefix}/bin/perl-openpkg epilog
+ )
+%endif
+
+ # build ODBC driver
+%if "%{with_odbc}" == "yes"
+ ( cd psqlodbc-%{V_psqlodbc}
+ export CC="%{l_cc}"
+ export CXX="%{l_cxx}"
+ export CFLAGS="%{l_cflags -O}"
+ export CXXFLAGS="%{l_cxxflags -O}"
+ export CPPFLAGS="-I`pwd`/../src/include"
+ CPPFLAGS="$CPPFLAGS -I`pwd`/../src/interfaces -I`pwd`/../src/interfaces/libpq"
+ CPPFLAGS="$CPPFLAGS %{l_cppflags}"
+ export LDFLAGS="-L`pwd`/../src/interfaces/libpq %{l_ldflags}"
+ ./configure \
+ --prefix=%{l_prefix} \
+ --with-unixodbc \
+ --with-odbcinst=%{l_prefix}/etc/unixodbc
+ %{l_make} %{l_mflags -O}
+ )
+%endif
%install
+%if "%{with_perl}" != "yes"
rm -rf $RPM_BUILD_ROOT
+%endif
# perform standard installation procedure
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
@@ -173,14 +212,6 @@
done
)
- # optionally install pgAccess startup wrapper
-%if "%{with_tcl}" == "yes"
- ( LD_LIBRARY_PATH=%{l_prefix}/lib:$LD_LIBRARY_PATH
- %{l_prefix}/share/postgresql/pgaccess/main.tcl ${1+"$@"}
- ) >$RPM_BUILD_ROOT%{l_prefix}/bin/pgaccess
- chmod 755 $RPM_BUILD_ROOT%{l_prefix}/bin/pgaccess
-%endif
-
# create additional directories
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/var/postgresql/db \
@@ -194,8 +225,9 @@
%{SOURCE pg_migrate} \
$RPM_BUILD_ROOT%{l_prefix}/bin/
- # install libpq++ (C++ bindings)
- ( cd libpq++-%{V_libpqxx}
+ # install C++ bindings (both old and new one)
+%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 \
@@ -205,6 +237,24 @@
libpq++.a \
$RPM_BUILD_ROOT%{l_prefix}/lib/
)
+ ( cd libpqxx-%{V_libpqxx}
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/include/pqxx
+ %{l_shtool} install -c -m 644 \
+ include/pqxx/*.h \
+ $RPM_BUILD_ROOT%{l_prefix}/include/pqxx/
+ %{l_shtool} install -c -m 644 \
+ src/.libs/libpqxx.a \
+ $RPM_BUILD_ROOT%{l_prefix}/lib/
+ )
+%endif
+
+ # build ODBC driver
+%if "%{with_odbc}" == "yes"
+ ( cd psqlodbc-%{V_psqlodbc}
+ %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
+ )
+%endif
# install run-command script
%{l_shtool} mkdir -f -p -m 755 \
@@ -301,8 +351,7 @@
%if "%{with_odbc}" == "yes"
( echo "[PostgreSQL]"
echo "Description = PostgreSQL ODBC driver"
- echo "Driver = $RPM_INSTALL_PREFIX/lib/libodbcpsql.so"
- echo "Setup = $RPM_INSTALL_PREFIX/lib/libodbcpsqlS.so"
+ echo "Driver = $RPM_INSTALL_PREFIX/lib/psqlodbc.so"
echo "Threading = 2"
) $RPM_INSTALL_PREFIX/bin/odbcinst -i -d -r
%endif
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.3023 -r1.3024 news.txt
--- openpkg-web/news.txt 24 Jan 2003 08:04:04 -0000 1.3023
+++ openpkg-web/news.txt 24 Jan 2003 09:26:21 -0000 1.3024
@@ -1,3 +1,4 @@
+24-Jan-2003: Upgraded package: P<postgresql-7.3.1-20030124>
24-Jan-2003: Upgraded package: P<diffutils-2.8.4-20030124>
23-Jan-2003: Upgraded package: P<jargon-4.3.3-20030123>
23-Jan-2003: Upgraded package: P<gif2png-2.4.6-20030123>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]