]> git.pld-linux.org Git - packages/postgresql.git/blobdiff - postgresql.spec
- fixed installation of contrib SQL files
[packages/postgresql.git] / postgresql.spec
index d1ccfcb17c49bb8e6d6d83799047c407f3856be1..ae9cc83379c969d3479e1306e02f4fefce38a5ad 100644 (file)
@@ -1,7 +1,5 @@
 #
 # - pg_autovacuum init support? look at its readme file, please
-# - put pgcrypto docs into docdir
-# - put pgcrypto sql files in %{_datadir}/postgresql
 # - pg_ctl uses psql again, current patch2 doesn't eliminate this
 # - remove postgresql-configure patch and create postgresql-doc patch,
 #   which will prevent documentation and manuals installation (the routine
 #
 # Conditional build:
 %bcond_without  tests                  # disable testing
-%bcond_without tcl                             # disables Tcl support
+%bcond_without tcl                     # disables Tcl support
 %bcond_without kerberos5               # disable kerberos5 support
-%bcond_with    jdbc                            # enable JDBC driver
+%bcond_without perl                    # disable perl support
+%bcond_without python                  # disable python support
+%bcond_with            jdbc                    # enable JDBC driver
 %bcond_with    absolute_dbpaths        # enable absolute paths to create database
-                                       # (disabled by default because it is a security risk)
+                                                               # (disabled by default because it is a security risk)
 
 %include       /usr/lib/rpm/macros.python
  
@@ -30,7 +30,7 @@ Summary(uk):  PostgreSQL - 
 Summary(zh_CN):        PostgreSQL ¿Í»§¶Ë³ÌÐòºÍ¿âÎļþ
 Name:          postgresql
 Version:       7.4
-Release:       0.7
+Release:       0.9
 License:       BSD
 Group:         Applications/Databases
 ##Source0:     ftp://ftp.postgresql.org/pub/source/v%{version}/%{name}-%{version}.tar.bz2
@@ -49,6 +49,7 @@ Patch5:               %{name}-link.patch
 Patch6:                %{name}-com_err.patch
 Patch7:                %{name}-ecpg_link.patch
 Patch8:                %{name}-ecpg-includedir.patch
+Patch9:                %{name}-contrib_install.patch
 Icon:          postgresql.xpm
 URL:           http://www.postgresql.org/
 BuildRequires: autoconf
@@ -58,8 +59,8 @@ BuildRequires:        bison >= 1.875
 BuildRequires: ncurses-devel >= 5.0
 BuildRequires: openssl-devel >= 0.9.7c
 BuildRequires: pam-devel
-BuildRequires: perl-devel
-BuildRequires: python-devel >= 2.3
+%{?with_perl:BuildRequires:    perl-devel}
+%{?with_python:BuildRequires:  python-devel >= 2.3}
 BuildRequires: readline-devel >= 4.2
 BuildRequires: rpm-pythonprov
 %{?with_tcl:BuildRequires:     tcl-devel >= 8.4.3}
@@ -628,7 +629,7 @@ Summary:    PL/perl - PostgreSQL procedural language
 Summary(pl):   PL/perl jêzyk proceduralny bazy danych PostgreSQL
 Group:         Applications/Databases
 Requires:      %{name} = %{version}
-%requires_eq   perl
+%requires_eq   perl-base
 
 %description module-plperl
 From PostgreSQL documentation.
@@ -750,6 +751,7 @@ Funkcje kryptograficzne dla PostgreSQL.
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 tar xzf doc/man*.tar.gz
 
@@ -763,7 +765,7 @@ find contrib -type d -name CVS -exec rm -rf {} \;
 rm -f config/libtool.m4
 %{__aclocal} -I config
 %{__autoconf}
-%configure \
+%configure CFLAGS="%{rpmcflags} -DNEED_REENTRANT_FUNCS"\
        %{!?_without_pgsql_locale:--enable-locale} \
        %{!?_without_pgsql_multibyte:--enable-multibyte} \
        --disable-rpath \
@@ -778,8 +780,8 @@ rm -f config/libtool.m4
        --with-CXX \
        %{?with_tcl:--with-tcl} \
        %{?with_tcl:--with-tk} \
-       --with-perl \
-       --with-python \
+       %{?with_perl:--with-perl} \
+       %{?with_python:--with-python} \
        %{?with_kerberos5:--with-krb5=%{_prefix}} \
        --with-openssl \
        --with-x \
@@ -802,8 +804,7 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
 %{__make} install install-all-headers \
        DESTDIR=$RPM_BUILD_ROOT
 
-%{__make} install -C src/pl/plperl \
-       DESTDIR=$RPM_BUILD_ROOT
+%{?with_perl:%{__make} install -C src/pl/plperl DESTDIR=$RPM_BUILD_ROOT}
 
 %{__make} -C contrib/pg_autovacuum install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -1067,13 +1068,17 @@ fi
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_pgmoduledir}/plpgsql.so
 
+%if %{with perl}
 %files module-plperl
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_pgmoduledir}/plperl.so
+%endif
 
+%if %{with python}
 %files module-plpython
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_pgmoduledir}/plpython.so
+%endif
 
 %if %{with tcl}
 %files module-pltcl
@@ -1084,7 +1089,6 @@ fi
 
 %files module-pgcrypto
 %defattr(644,root,root,755)
+%doc contrib/pgcrypto/README*
 %attr(755,root,root) %{_pgmoduledir}/pgcrypto.so
-# Hmm i think two below lines shouldn't be here - but i can be wrong ;)
-#%{_datadir}/%{name}/contrib/pgcrypto.sql
-#%{_datadir}/info/%{name}/contrib/README.pgcrypto.gz
+%{_datadir}/%{name}/pgcrypto.sql
This page took 0.036345 seconds and 4 git commands to generate.