|
|
@@ -29,6 +29,7 @@
|
|
|
%define V_perl 5.8.8
|
|
|
%define V_pgperl 2.0.2
|
|
|
%define V_psqlodbc 08.02.0400
|
|
|
+%define V_pgjdbc 8.2-506
|
|
|
%define V_slony1 1.2.6
|
|
|
%define V_slony1_dir 1215
|
|
|
%define V_pgcluster 1.7.0rc6
|
|
|
@@ -47,13 +48,14 @@ Class: BASE
|
|
|
Group: Database
|
|
|
License: GPL
|
|
|
Version: %{V_postgresql}
|
|
|
-Release: 20070906
|
|
|
+Release: 20070912
|
|
|
|
|
|
# package options
|
|
|
%option with_server yes
|
|
|
%option with_cxx no
|
|
|
%option with_perl no
|
|
|
%option with_odbc no
|
|
|
+%option with_jdbc no
|
|
|
%option with_compat no
|
|
|
%option with_tcl no
|
|
|
%option with_slony1 no
|
|
|
@@ -71,9 +73,10 @@ Source4: ftp://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-%{V_psqlod
|
|
|
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: rc.postgresql
|
|
|
-Source9: pg_migrate
|
|
|
-Source10: pg_passwd
|
|
|
+Source8: http://jdbc.postgresql.org/download/postgresql-jdbc-%{V_pgjdbc}.src.tar.gz
|
|
|
+Source9: rc.postgresql
|
|
|
+Source10: pg_migrate
|
|
|
+Source11: pg_passwd
|
|
|
Patch0: postgresql.patch
|
|
|
|
|
|
# build information
|
|
|
@@ -91,6 +94,10 @@ PreReq: perl >= %{V_perl}
|
|
|
BuildPreReq: unixodbc
|
|
|
PreReq: unixodbc
|
|
|
%endif
|
|
|
+%if "%{with_jdbc}" == "yes"
|
|
|
+BuildPreReq: java, JAVA-JDK, ant
|
|
|
+PreReq: java, JAVA-JDK
|
|
|
+%endif
|
|
|
%if "%{with_tcl}" == "yes"
|
|
|
BuildPreReq: tcl, tcl::with_x11 = yes, X11
|
|
|
PreReq: tcl, tcl::with_x11 = yes, X11
|
|
|
@@ -149,6 +156,11 @@ AutoReqProv: no
|
|
|
url = ftp://ftp.postgresql.org/pub/odbc/versions/src/
|
|
|
regex = psqlodbc-(\d{2}\.\d{2}\.\d{4})\.tar\.gz
|
|
|
}
|
|
|
+ prog postgresql:jdbc = {
|
|
|
+ version = %{V_pgjdbc}
|
|
|
+ url = http://jdbc.postgresql.org/download.html
|
|
|
+ regex = postgresql-jdbc-(\d+\.\d+-\d+)\.src\.tar\.gz
|
|
|
+ }
|
|
|
prog postgresql:slony1 = {
|
|
|
version = %{V_slony1}.%{V_slony1_dir}
|
|
|
url = http://pgfoundry.org/frs/?group_id=1000122
|
|
|
@@ -210,6 +222,9 @@ AutoReqProv: no
|
|
|
%if "%{with_mysqlcompat}" == "yes"
|
|
|
%setup -q -T -D -a 7
|
|
|
%endif
|
|
|
+%if "%{with_jdbc}" == "yes"
|
|
|
+ %setup -q -T -D -a 8
|
|
|
+%endif
|
|
|
%if "%{with_kerberos}" == "yes"
|
|
|
%{l_shtool} subst \
|
|
|
-e 's;krb5 -ldes -lasn1 -lroken;krb5 -lk5crypto -lkrb5support -lcom_err;g' \
|
|
|
@@ -369,6 +384,15 @@ AutoReqProv: no
|
|
|
) || exit $?
|
|
|
%endif
|
|
|
|
|
|
+ # build JDBC driver
|
|
|
+%if "%{with_jdbc}" == "yes"
|
|
|
+ ( cd postgresql-jdbc-%{V_pgjdbc}.src
|
|
|
+ export JAVA_PLATFORM="sun-jdk"
|
|
|
+ eval `%{l_prefix}/bin/java-toolkit -e`
|
|
|
+ %{l_prefix}/bin/ant
|
|
|
+ ) || exit $?
|
|
|
+%endif
|
|
|
+
|
|
|
# build Slony-1 replication engine
|
|
|
%if "%{with_slony1}" == "yes"
|
|
|
( cd slony1-%{V_slony1}
|
|
|
@@ -497,6 +521,14 @@ AutoReqProv: no
|
|
|
) || exit $?
|
|
|
%endif
|
|
|
|
|
|
+ # install JDBC driver
|
|
|
+%if "%{with_jdbc}" == "yes"
|
|
|
+ ( cd postgresql-jdbc-%{V_pgjdbc}.src
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ jars/postgresql.jar $RPM_BUILD_ROOT%{l_prefix}/lib/
|
|
|
+ ) || exit $?
|
|
|
+%endif
|
|
|
+
|
|
|
# install Slony-1 replication engine
|
|
|
%if "%{with_slony1}" == "yes"
|
|
|
( cd slony1-%{V_slony1}
|