]> git.pld-linux.org Git - packages/postgresql.git/blobdiff - postgresql.spec
- added Patch11: postgresql-ssl-libpq-mem-leak-1.patch
[packages/postgresql.git] / postgresql.spec
index 57cb4d0d852a973caa7f617a98ef7672af285e37..7dbf21f9319663a5261191b971f68ed0e9d71fb0 100644 (file)
@@ -1,20 +1,16 @@
 #
 # - pg_autovacuum init support? look at its readme file, please
-# - put pgcrypto docs into docdir
-# - put pgcrypto sql files in %{_datadir}/postgresql
-# - look at locales (libpq and others - --enable-nls for configure should
-#   suffice)
 # - 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
-#   is bad and we install docs and mans manually, at all) or create good
-#   routine and send it to postgresql team...
 #
 # Conditional build:
-%bcond_without  tests                  # disable testing
-%bcond_without tcl                             # disables Tcl support
+%bcond_without tests                   # disable testing
+%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 pgsql_locale            # disable PostgreSQL locale
+%bcond_without pgsql_multibyte         # disable PostgreSQL multibyte
+%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)
 
@@ -32,7 +28,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
@@ -42,7 +38,7 @@ Source1:      %{name}.init
 Source2:       pgsql-Database-HOWTO-html.tar.gz
 # Source2-md5: 5b656ddf1db41965761f85204a14398e
 Source3:       %{name}.sysconfig
-Patch0:                %{name}-configure.patch
+Patch0:                %{name}-doc.patch
 Patch1:                %{name}-pg_ctl-silent.patch
 Patch2:                %{name}-pg_ctl-nopsql.patch
 Patch3:                %{name}-conf.patch
@@ -51,6 +47,9 @@ Patch5:               %{name}-link.patch
 Patch6:                %{name}-com_err.patch
 Patch7:                %{name}-ecpg_link.patch
 Patch8:                %{name}-ecpg-includedir.patch
+Patch9:                %{name}-contrib_install.patch
+Patch10:       %{name}-tsearch2-compound_word_support_20031210.patch
+Patch11:       %{name}-ssl-libpq-mem-leak-1.patch
 Icon:          postgresql.xpm
 URL:           http://www.postgresql.org/
 BuildRequires: autoconf
@@ -60,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}
@@ -630,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.
@@ -741,8 +740,24 @@ Cryptographic functions for PostgreSQL.
 %description module-pgcrypto -l pl
 Funkcje kryptograficzne dla PostgreSQL.
 
+%package module-tsearch2
+Summary:       Full text extension for PostgreSQL
+Summary(pl):   Rozszerzenie pe³notekstowe dla PostgreSQL-a
+Group:         Applications/Databases
+Requires:      %{name} = %{version}
+
+%description module-tsearch2
+Implementation of a new data type tsvector - a searchable data type
+with indexed access:
+http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/
+
+%description module-tsearch2 -l pl
+Implementacja nowego typu danych tsvector - typu danych podlegaj±cego
+przeszukiwaniu z dostêpem poprzez indeksy:
+http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/
+
 %prep
-%setup  -q
+%setup -q
 %patch0 -p1
 %patch1 -p1
 %patch2 -p0
@@ -752,6 +767,9 @@ Funkcje kryptograficzne dla PostgreSQL.
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p0
 
 tar xzf doc/man*.tar.gz
 
@@ -763,12 +781,14 @@ find contrib -type d -name CVS -exec rm -rf {} \;
 
 %build
 rm -f config/libtool.m4
+install /usr/share/automake/config.* config/
 %{__aclocal} -I config
 %{__autoconf}
-%configure \
-       %{!?_without_pgsql_locale:--enable-locale} \
-       %{!?_without_pgsql_multibyte:--enable-multibyte} \
+%configure CFLAGS="%{rpmcflags} -DNEED_REENTRANT_FUNCS"\
+       %{?with_pgsql_locale:--enable-locale} \
+       %{?with_pgsql_multibyte:--enable-multibyte} \
        --disable-rpath \
+       --enable-nls \
        --enable-thread-safety \
        --enable-integer-datetimes \
        --enable-depend \
@@ -779,16 +799,17 @@ 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 \
-%{?_with_jdbc: --with-java}
+       %{?with_jdbc:--with-java}
 
 %{__make}
 %{__make} -C contrib/pg_autovacuum
 %{__make} -C contrib/pgcrypto
+%{__make} -C contrib/tsearch2
 %ifnarch sparc sparcv9 sparc64 alpha ppc
 %{?with_tests:%{__make} check}
 %endif
@@ -796,15 +817,14 @@ rm -f config/libtool.m4
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
-        $RPM_BUILD_ROOT{/var/{lib/pgsql,log},%{_pgsqldir}} \
-       $RPM_BUILD_ROOT{%{_applnkdir}/System,%{_pixmapsdir}} \
+       $RPM_BUILD_ROOT{/var/{lib/pgsql,log},%{_pgsqldir}} \
+       $RPM_BUILD_ROOT%{_mandir} \
        $RPM_BUILD_ROOT/home/services/postgres
 
 %{__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
@@ -812,16 +832,14 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
 %{__make} -C contrib/pgcrypto install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%{__make} -C contrib/tsearch2 install \
+       DESTDIR=$RPM_BUILD_ROOT
+
 touch $RPM_BUILD_ROOT/var/log/pgsql
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/postgresql
 
-cp -a man?        $RPM_BUILD_ROOT%{_mandir}
-
-# there are html installed, remove them
-rm -rf $RPM_BUILD_ROOT%{_infodir}
-
 install -d howto
 ( cd howto
   tar xzf $RPM_SOURCE_DIR/pgsql-Database-HOWTO-html.tar.gz
@@ -830,6 +848,14 @@ install -d howto
 %py_comp $RPM_BUILD_ROOT%{py_libdir}
 %py_ocomp $RPM_BUILD_ROOT%{py_libdir}
 
+# find locales
+for f in libpq pg_controldata pg_dump pg_resetxlog pgscripts postgres psql; do
+       %find_lang $f
+done
+# merge locales
+cat pgscripts.lang pg_resetxlog.lang postgres.lang pg_controldata.lang > main.lang
+cat pg_dump.lang psql.lang > clients.lang
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -902,9 +928,11 @@ fi
 %post   tcl -p /sbin/ldconfig
 %postun tcl -p /sbin/ldconfig
 
-%files
+%files -f main.lang
 %defattr(644,root,root,755)
 %doc contrib/pg_autovacuum/README*
+%doc doc/FAQ* doc/README* doc/bug.template
+%doc COPYRIGHT README HISTORY
 %attr(754,root,root) /etc/rc.d/init.d/*
 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/*
 
@@ -961,18 +989,12 @@ fi
 %{_mandir}/man1/postgres.1*
 %{_mandir}/man1/postmaster.1*
 
-%{_mandir}/man7/*.7*
-
-%doc contrib
-%doc doc/FAQ* doc/README*
-%doc COPYRIGHT README HISTORY doc/bug.template
-
 %files doc
 %defattr(644,root,root,755)
 %doc doc/unpacked/*
 %doc howto
 
-%files libs
+%files libs -f libpq.lang
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libpq.so.*.*
 %attr(755,root,root) %{_bindir}/pg_id
@@ -1022,7 +1044,7 @@ fi
 %{_libdir}/libpq.a
 %{_libdir}/libpgtypes.a
 
-%files clients
+%files clients -f clients.lang
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/pg_dump
 %attr(755,root,root) %{_bindir}/pg_dumpall
@@ -1035,7 +1057,7 @@ fi
 %{_mandir}/man1/pg_restore.1*
 %{_mandir}/man1/psql.1*
 %{_mandir}/man1/vacuumdb.1*
-%{_mandir}/manl/*.l*
+%{_mandir}/man7/*.7*
 
 %if %{with tcl}
 %files tcl
@@ -1060,13 +1082,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
@@ -1077,7 +1103,12 @@ 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
+
+%files module-tsearch2
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_pgmoduledir}/tsearch2.so
+%{_datadir}/%{name}/tsearch2.sql
+%{_datadir}/%{name}/untsearch2.sql
This page took 0.040315 seconds and 4 git commands to generate.