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-Jan-2006 15:27:11
Branch: HEAD Handle: 2006010614271000
Modified files:
openpkg-src/postgresql postgresql.spec
Log:
add optional MySQL compatibility layer
Summary:
Revision Changes Path
1.180 +35 -13 openpkg-src/postgresql/postgresql.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/postgresql/postgresql.spec
============================================================================
$ cvs diff -u -r1.179 -r1.180 postgresql.spec
--- openpkg-src/postgresql/postgresql.spec 6 Jan 2006 08:18:21 -0000
1.179
+++ openpkg-src/postgresql/postgresql.spec 6 Jan 2006 14:27:10 -0000
1.180
@@ -32,6 +32,7 @@
%define V_psqlodbc 08.01.0102
%define V_slony1 1.1.2
%define V_pgcluster 1.3.0c
+%define V_mysqlcompat 1.0b3
# package information
Name: postgresql
@@ -47,15 +48,16 @@
Release: 20060106
# package options
-%option with_server yes
-%option with_cxx no
-%option with_perl no
-%option with_odbc no
-%option with_compat no
-%option with_tcl no
-%option with_slony1 no
-%option with_pgcluster no
-%option with_kerberos no
+%option with_server yes
+%option with_cxx no
+%option with_perl no
+%option with_odbc no
+%option with_compat no
+%option with_tcl no
+%option with_slony1 no
+%option with_pgcluster no
+%option with_kerberos no
+%option with_mysqlcompat no
# list of sources
Source0:
ftp://ftp.postgresql.org/pub/source/v%{V_postgresql}/postgresql-%{V_postgresql}.tar.gz
@@ -65,8 +67,9 @@
Source4:
ftp://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-%{V_psqlodbc}.tar.gz
Source5:
http://developer.postgresql.org/~wieck/slony1/download/slony1-%{V_slony1}.tar.bz2
Source6:
http://pgfoundry.org/frs/download.php/219/pgcluster-%{V_pgcluster}-patch.tar.gz
-Source7: rc.postgresql
-Source8: pg_migrate
+Source7:
http://pgfoundry.org/frs/download.php/548/mysqlcompat-%{V_pgcluster}.tar.gz
+Source8: rc.postgresql
+Source9: pg_migrate
Patch0: postgresql.patch
# build information
@@ -141,11 +144,17 @@
regex = slony1-(\d+\.\d+\.\d+)\.tar\.bz2
}
prog postgresql:pgcluster = {
- comment = "steve: beside the filename also the url hat to be
changed to download the current version"
+ comment = "rse: beside the filename also the path changes for new
versions"
version = %{V_pgcluster}
url = http://pgfoundry.org/frs/?group_id=1000072&release_id=168
regex = pgcluster-(__VER__)-patch\.tar\.gz
}
+ prog postgresql:mysqlcompat = {
+ comment = "rse: beside the filename also the path changes for new
versions"
+ version = %{V_mysqlcompat}
+ url = http://pgfoundry.org/frs/?group_id=1000154&release_id=379
+ regex = mysqlcompat-(__VER__)\.tar\.gz
+ }
%prep
%setup -q
@@ -182,6 +191,9 @@
-e '/preproc\.c/,/Makefile\.aix/d' | \
%{l_patch} -p1
%endif
+%if "%{with_mysqlcompat}" == "yes"
+ %setup -q -T -D -a 7
+%endif
%if "%{with_kerberos}" == "yes"
%{l_shtool} subst \
-e 's;krb5 -ldes -lasn1 -lroken;krb5 -lk5crypto -lkrb5support
-lcom_err;g' \
@@ -488,14 +500,24 @@
) || exit $?
%endif
-%if "%{with_pgcluster}" == "yes"
# post-adjust pgcluster configuration filenames
+%if "%{with_pgcluster}" == "yes"
mv $RPM_BUILD_ROOT%{l_prefix}/etc/postgresql/pglb.conf.sample \
$RPM_BUILD_ROOT%{l_prefix}/etc/postgresql/pglb.conf
mv $RPM_BUILD_ROOT%{l_prefix}/etc/postgresql/pgreplicate.conf.sample \
$RPM_BUILD_ROOT%{l_prefix}/etc/postgresql/pgreplicate.conf
%endif
+ # install MySQL compatibility layer
+%if "%{with_mysqlcompat}" == "yes"
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/share/postgresql/mysqlcompat
+ %{l_shtool} install -c -m 644 \
+ mysqlcompat-%{V_mysqlcompat}/README \
+ mysqlcompat-%{V_mysqlcompat}/*.sql \
+ $RPM_BUILD_ROOT%{l_prefix}/share/postgresql/mysqlcompat/
+%endif
+
# install run-command script
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]