|
|
@@ -31,6 +31,7 @@
|
|
|
%define V_psqlodbc 07.03.0200
|
|
|
%define V_slony1 1.0.5
|
|
|
%define V_pgpool 2.5.1
|
|
|
+%define V_pgcluster 1.3.0b
|
|
|
|
|
|
# package information
|
|
|
Name: postgresql
|
|
|
@@ -43,17 +44,18 @@ Class: BASE
|
|
|
Group: Database
|
|
|
License: GPL
|
|
|
Version: %{V_postgresql}
|
|
|
-Release: 20050224
|
|
|
+Release: 20050225
|
|
|
|
|
|
# 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_pgpool 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_pgpool no
|
|
|
+%option with_pgcluster no
|
|
|
|
|
|
# list of sources
|
|
|
Source0: ftp://ftp.postgresql.org/pub/source/v%{V_postgresql}/postgresql-%{V_postgresql}.tar.gz
|
|
|
@@ -63,8 +65,9 @@ Source3: ftp://gborg.postgresql.org/pub/pgperl/stable/pgperl-%{V_pgperl}.ta
|
|
|
Source4: ftp://ftp.us.postgresql.org/odbc/versions/src/psqlodbc-%{V_psqlodbc}.tar.gz
|
|
|
Source5: http://developer.postgresql.org/~wieck/slony1/download/slony1-%{V_slony1}.tar.gz
|
|
|
Source6: http://www2b.biglobe.ne.jp/~caco/pgpool/pgpool-%{V_pgpool}.tar.gz
|
|
|
-Source7: rc.postgresql
|
|
|
-Source8: pg_migrate
|
|
|
+Source7: http://pgfoundry.org/frs/download.php/180/pgcluster-%{V_pgcluster}-patch.tar.gz
|
|
|
+Source8: rc.postgresql
|
|
|
+Source9: pg_migrate
|
|
|
Patch0: postgresql.patch
|
|
|
Patch1: postgresql.patch.slony1
|
|
|
|
|
|
@@ -134,6 +137,11 @@ AutoReqProv: no
|
|
|
url = http://www2b.biglobe.ne.jp/~caco/pgpool/
|
|
|
regex = pgpool-(__VER__)\.tar\.gz
|
|
|
}
|
|
|
+ prog postgresql:pgcluster = {
|
|
|
+ version = %{V_pgcluster}
|
|
|
+ url = http://pgfoundry.org/frs/?group_id=1000072&release_id=168
|
|
|
+ regex = pgcluster-(__VER__)-patch\.tar\.gz
|
|
|
+ }
|
|
|
|
|
|
%prep
|
|
|
%setup -q
|
|
|
@@ -155,6 +163,11 @@ AutoReqProv: no
|
|
|
%if "%{with_pgpool}" == "yes"
|
|
|
%setup -q -T -D -a 6
|
|
|
%endif
|
|
|
+%if "%{with_pgcluster}" == "yes"
|
|
|
+ %setup -q -T -D -a 7
|
|
|
+ sed -e 's;\($.exec_prefix./etc\);\1/postgresql;' \
|
|
|
+ <pgcluster-%{V_pgcluster}-patch | %{l_patch} -p1
|
|
|
+%endif
|
|
|
|
|
|
# adjust source tree
|
|
|
%{l_shtool} subst \
|
|
|
@@ -192,6 +205,7 @@ AutoReqProv: no
|
|
|
./configure \
|
|
|
--cache-file=./config.cache \
|
|
|
--prefix=%{l_prefix} \
|
|
|
+ --sysconfdir=%{l_prefix}/etc/postgresql \
|
|
|
--includedir=%{l_prefix}/include/postgresql \
|
|
|
--with-openssl \
|
|
|
--with-readline \
|
|
|
@@ -359,7 +373,9 @@ AutoReqProv: no
|
|
|
|
|
|
# create additional directories
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
+%if "%{with_slony1}" == "yes" || "%{with_pgpool}" == "yes" || "%{with_pgcluster}" == "yes"
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/postgresql \
|
|
|
+%endif
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/postgresql/db \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/postgresql/run
|
|
|
|
|
|
@@ -456,6 +472,14 @@ AutoReqProv: no
|
|
|
) || exit $?
|
|
|
%endif
|
|
|
|
|
|
+%if "%{with_pgcluster}" == "yes"
|
|
|
+ # post-adjust pgcluster configuration filenames
|
|
|
+ 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 run-command script
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
@@ -484,7 +508,7 @@ AutoReqProv: no
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
%if "%{with_server}" == "yes"
|
|
|
%{l_files_std} `cat perl-openpkg-files` \
|
|
|
-%if "%{with_slony1}" == "yes" || "%{with_pgpool}" == "yes"
|
|
|
+%if "%{with_slony1}" == "yes" || "%{with_pgpool}" == "yes" || "%{with_pgcluster}" == "yes"
|
|
|
'%config %{l_prefix}/etc/postgresql/*' \
|
|
|
%endif
|
|
|
'%attr(700,%{l_rusr},%{l_rgrp}) %dir %{l_prefix}/var/postgresql/db' \
|