]> git.pld-linux.org Git - packages/postgresql.git/blobdiff - postgresql.spec
- outdated
[packages/postgresql.git] / postgresql.spec
index 15ffc576824d20508e09706524334c268613a43d..7ecf6e53c61f8750223a2e00fce5fe77bdc93a32 100644 (file)
@@ -1,14 +1,13 @@
 #
 # Conditional build:
 %bcond_without tests                   # disable testing
-%bcond_without tcl                     # disables Tcl support
+%bcond_without tcl                     # disable Tcl support
 %bcond_without kerberos5               # disable kerberos5 support
 %bcond_without perl                    # disable Perl support
 %bcond_without python                  # disable Python support
-%bcond_with    php                     # enable PHP support
 %bcond_with    absolute_dbpaths        # enable absolute paths to create database
                                        # (disabled by default because it is a security risk)
-
+#
 Summary:       PostgreSQL Data Base Management System
 Summary(de.UTF-8):     PostgreSQL Datenbankverwaltungssystem
 Summary(es.UTF-8):     Gestor de Banco de Datos PostgreSQL
@@ -20,42 +19,36 @@ Summary(tr.UTF-8):  Veri Tabanı Yönetim Sistemi
 Summary(uk.UTF-8):     PostgreSQL - система керування базами даних
 Summary(zh_CN.UTF-8):  PostgreSQL 客户端程序和库文件
 Name:          postgresql
-Version:       8.2.3
-Release:       2
+Version:       8.3.0
+Release:       1
 License:       BSD
 Group:         Applications/Databases
 Source0:       ftp://ftp.postgresql.org/pub/source/v%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5: cb47771004d53505200ffd00ac45bc32
+# Source0-md5: 53d6816eac7442f9bc8103439ebee22e
 Source1:       %{name}.init
 Source2:       pgsql-Database-HOWTO-html.tar.gz
 # Source2-md5: 5b656ddf1db41965761f85204a14398e
 Source3:       %{name}.sysconfig
-Source8:       http://www.commandprompt.com/files/plphp-8.x.tar.bz2
-# Source8-md5: d307e4ab8cb6900a1c290a5dde1bdeee
 Patch0:                %{name}-conf.patch
 Patch1:                %{name}-absolute_dbpaths.patch
-Patch2:                %{name}-version.patch
-Patch3:                %{name}-ecpg_link.patch
-Patch4:                %{name}-ecpg-includedir.patch
-Patch5:                %{name}-pg_ctl-fix.patch
+Patch2:                %{name}-ecpg-includedir.patch
+Patch3:                %{name}-ac_version.patch
+Patch4:                %{name}-disable_horology_test.patch
 URL:           http://www.postgresql.org/
 BuildRequires: autoconf
 BuildRequires: automake
-#BuildRequires:        bison >= 1.875  not needed for releases
+# not needed for releases... but fixes something in snapshot
+BuildRequires: bison >= 1.875
 BuildRequires: flex
 BuildRequires: gettext-devel
 %{?with_kerberos5:BuildRequires:       krb5-devel}
 BuildRequires: libtool
-BuildRequires: libxml2-devel
+BuildRequires: libxml2-devel >= 2.6.23
 BuildRequires: libxslt-devel
 BuildRequires: ncurses-devel >= 5.0
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: pam-devel
 %{?with_perl:BuildRequires:    perl-devel}
-%if %{with php}
-BuildRequires: php-devel >= 3:5.0.0
-BuildRequires: rpmbuild(macros) >= 1.322
-%endif
 %if %{with python}
 BuildRequires: python >= 1:2.3
 BuildRequires: python-devel >= 1:2.3
@@ -74,8 +67,10 @@ Requires(pre):       /usr/sbin/usermod
 Requires:      %{name}-clients = %{version}-%{release}
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      rc-scripts
+Requires:      tzdata
 Obsoletes:     postgresql-server
 Obsoletes:     postgresql-test
+Obsoletes:     postgresql-module-tsearch2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _pgmoduledir    %{_libdir}/postgresql
@@ -83,6 +78,8 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _ulibdir        /usr/lib
 
+%define        contrib_modules adminpack btree_gist chkpass dblink hstore intagg intarray isn lo ltree oid2name pageinspect pgbench pg_buffercache pgcrypto pg_freespacemap pgrowlocks pgstattuple pg_trgm sslinfo tablefunc vacuumlo xml2
+
 %description
 PostgreSQL Data Base Management System (formerly known as Postgres,
 then as Postgres95).
@@ -586,41 +583,6 @@ potrzeby.
 Za pomocą polecenia createlang można dodać obsługę języka
 proceduralnego PL/Perl dla swojej bazy danych.
 
-%package module-plphp
-Summary:       PL/PHP - PostgreSQL procedural language
-Summary(pl.UTF-8):     PL/PHP - język proceduralny bazy danych PostgreSQL
-Group:         Applications/Databases
-Requires:      %{name} = %{version}-%{release}
-%{?requires_php_extension}
-
-%description module-plphp
-From PostgreSQL documentation:
-
-Postgres supports the definition of procedural languages. In the case
-of a function or trigger procedure defined in a procedural language,
-the database has no built-in knowledge about how to interpret the
-function's source text. Instead, the task is passed to a handler that
-knows the details of the language. The handler itself is a special
-programming language function compiled into a shared object and loaded
-on demand.
-
-To enable PL/PHP procedural language for your database you have to run
-createlang command.
-
-%description module-plphp -l pl.UTF-8
-Z dokumentacji PostgreSQL:
-
-Postgres ma wsparcie dla języków proceduralnych. W przypadku, kiedy
-programista zdefiniuje procedurę wyzwalacza lub funkcję w języku
-proceduralnym, baza danych nie ma pojęcia jak interpretować tego typu
-funkcję. Funkcja lub procedura ta jest przekazywana do interpretera,
-który wie jak ją wykonać. Interpreter jest odpowiednią, specjalną
-funkcją, która jest skompilowana w obiekt dzielony i ładowany w razie
-potrzeby.
-
-Za pomocą polecenia createlang można dodać obsługę języka
-proceduralnego PL/PHP dla swojej bazy danych.
-
 %package module-plpython
 Summary:       PL/Python - PostgreSQL procedural language
 Summary(pl.UTF-8):     PL/Python - język proceduralny bazy danych PostgreSQL
@@ -661,6 +623,7 @@ Summary:    PL/Tcl - PostgreSQL procedural language
 Summary(pl.UTF-8):     PL/Tcl - język proceduralny bazy danych PostgreSQL
 Group:         Applications/Databases
 Requires:      %{name} = %{version}-%{release}
+Requires:      tcl(Pgtcl)
 
 %description module-pltcl
 From PostgreSQL documentation:
@@ -743,22 +706,6 @@ crosstab functions for PostgreSQL.
 %description module-tablefunc -l pl.UTF-8
 Funkcje crosstab dla PostgreSQL-a.
 
-%package module-tsearch2
-Summary:       Full text extension for PostgreSQL
-Summary(pl.UTF-8):     Rozszerzenie pełnotekstowe dla PostgreSQL-a
-Group:         Applications/Databases
-Requires:      %{name} = %{version}-%{release}
-
-%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.UTF-8
-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/
-
 %package module-pg_trgm
 Summary:       Trigram matching for PostgreSQL
 Summary(pl.UTF-8):     Dopasowanie trigramowe dla PostgreSQL-a
@@ -773,7 +720,6 @@ similarity of text based on trigram matching.
 Ten moduł dostarcza funkcje i klasy do rozpoznawania podobnych tekstów
 w oparciu o dopasowywanie trigramowe (trigram matching).
 
-
 %package module-xml2
 Summary:       XML-handling functions for PostgreSQL
 Summary(pl.UTF-8):     Funkcje do obsługi XML-a dla PostgreSQL-a
@@ -790,24 +736,31 @@ Moduł z funkcjami XML zapewniającymi obsługę zapytań XPath oraz
 funkcjonalność XSLT. Jest także nowa funkcja tabelowa pozwalająca na
 bezpośrednie zwracanie wielu wyników XML.
 
+%package contrib
+Summary:       Misc PostgreSQL contrib modules
+#Summary(pl.UTF-8):    
+Group:         Applications/Databases
+Requires:      %{name} = %{version}-%{release}
+
+%description contrib
+Misc PostgreSQL contrib modules.
+
 %prep
-%setup -q -a8
+%setup -q
 %patch0 -p1
 %{?with_absolute_dbpaths:%patch1 -p1}
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p0
-
-%if %{with php}
-patch -p1 < plphp.patch
-%endif
 
 tar xzf doc/man*.tar.gz
 
 mkdir doc/unpacked
 tar zxf doc/postgres.tar.gz -C doc/unpacked
 
+# force rebuild of bison/flex files
+find src -name \*.l -o -name \*.y | xargs touch
+
 # Erase all CVS dirs
 #find contrib -type d -name CVS -exec rm -rf {} \;
 
@@ -819,25 +772,23 @@ tar zxf doc/postgres.tar.gz -C doc/unpacked
        --disable-rpath \
        --enable-depend \
        --enable-integer-datetimes \
+       --with-system-tzdata=%{_datadir}/zoneinfo \
        --enable-nls \
        --enable-thread-safety \
        %{?with_kerberos5:--with-krb5} \
        --with-openssl \
        --with-pam \
        %{?with_perl:--with-perl} \
-       %{?with_php:--with-php=/usr/include/php} \
        %{?with_python:--with-python} \
        %{?with_tcl:--with-tcl --with-tclconfig=%{_ulibdir}} \
        --without-docdir
 
 %{__make}
-%{__make} -C contrib/dblink
-%{__make} -C contrib/lo
-%{__make} -C contrib/pgcrypto
-%{__make} -C contrib/tablefunc
-%{__make} -C contrib/tsearch2
-%{__make} -C contrib/pg_trgm
-%{__make} -C contrib/xml2
+
+for mod in %{contrib_modules}; do \
+       %{__make} -C contrib/$mod
+done
+
 %{__make} -C src/tutorial \
        NO_PGXS=1
 
@@ -845,12 +796,6 @@ tar zxf doc/postgres.tar.gz -C doc/unpacked
 %{?with_tests:%{__make} check}
 %endif
 
-%if %{with php}
-cd src/pl/plphp
-%{__make}
-cd ../../../
-%endif
-
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
@@ -869,33 +814,10 @@ install src/tutorial/*.sql $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
        DESTDIR=$RPM_BUILD_ROOT
 %endif
 
-%{__make} -C contrib/dblink install \
-       DESTDIR=$RPM_BUILD_ROOT
-
-%{__make} -C contrib/lo install \
-       DESTDIR=$RPM_BUILD_ROOT
-
-%{__make} -C contrib/pgcrypto install \
-       DESTDIR=$RPM_BUILD_ROOT
-
-%{__make} -C contrib/tablefunc install \
-       DESTDIR=$RPM_BUILD_ROOT
-
-%{__make} -C contrib/tsearch2 install \
-       DESTDIR=$RPM_BUILD_ROOT
-
-%{__make} -C contrib/pg_trgm install \
-       DESTDIR=$RPM_BUILD_ROOT
-
-%{__make} -C contrib/xml2 install \
-       DESTDIR=$RPM_BUILD_ROOT
-
-%if %{with php}
-cd src/pl/plphp
-%{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
-cd ../../../
-%endif
+for mod in %{contrib_modules}; do \
+       %{__make} -C contrib/$mod install \
+               DESTDIR=$RPM_BUILD_ROOT
+done
 
 touch $RPM_BUILD_ROOT/var/log/pgsql
 
@@ -919,6 +841,10 @@ cat pg_dump.lang psql.lang initdb.lang pg_ctl.lang > clients.lang
 # Remove Contrib documentation. We use macro %doc
 rm -rf $RPM_BUILD_ROOT/contrib
 
+mv $RPM_BUILD_ROOT{%{_datadir}/postgresql,%{_pgsqldir}}/unknown.pltcl
+
+install src/pl/plperl/ppport.h $RPM_BUILD_ROOT%{_includedir}/postgresql/server/
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -933,7 +859,7 @@ fi
 foundold=0
 for pgdir in $PG_DB_CLUSTERS; do
        if [ -f $pgdir/PG_VERSION ]; then
-               if [ `cat $pgdir/PG_VERSION` != '8.2' ]; then
+               if [ `cat $pgdir/PG_VERSION` != '8.3' ]; then
                        echo "Found database(s) in older, incompatible format in cluster $pgdir."
                        foundold=1
                fi
@@ -999,6 +925,7 @@ fi
 %attr(755,root,root) %{_pgmoduledir}/euc*
 %attr(755,root,root) %{_pgmoduledir}/latin*
 %attr(755,root,root) %{_pgmoduledir}/utf*
+%attr(755,root,root) %{_pgmoduledir}/dict_*
 
 %dir %{_pgsqldir}
 %dir %{_datadir}/postgresql
@@ -1008,8 +935,8 @@ fi
 %{_datadir}/postgresql/*.shdescription
 %{_datadir}/postgresql/*.sql
 %{_datadir}/postgresql/*.txt
-%{_datadir}/postgresql/timezone
 %{_datadir}/postgresql/timezonesets
+%{_datadir}/postgresql/tsearch_data
 
 %attr(700,postgres,postgres) /home/services/postgres
 %attr(700,postgres,postgres) %dir /var/lib/pgsql
@@ -1031,14 +958,18 @@ fi
 %files libs -f libpq.lang
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libpq.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libpq.so.5
 %dir %{_pgmoduledir}
 
 %files ecpg
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/ecpg
 %attr(755,root,root) %{_libdir}/libecpg.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libecpg.so.6
 %attr(755,root,root) %{_libdir}/libecpg_compat.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libecpg_compat.so.3
 %attr(755,root,root) %{_libdir}/libpgtypes.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libpgtypes.so.3
 %{_mandir}/man1/ecpg.1*
 
 %files ecpg-devel
@@ -1135,56 +1066,84 @@ fi
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/pltcl_*
 %attr(755,root,root) %{_pgmoduledir}/pltcl.so
-%endif
-
-%if %{with php}
-%files module-plphp
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/plphp_*
-%attr(755,root,root) %{_pgmoduledir}/plphp.so
+%{_pgsqldir}/unknown.pltcl
 %endif
 
 %files module-dblink
 %defattr(644,root,root,755)
-%doc contrib/dblink/README.dblink
 %attr(755,root,root) %{_pgmoduledir}/dblink.so
 %{_pgsqldir}/*dblink.sql
 
 %files module-lo
 %defattr(644,root,root,755)
-%doc contrib/lo/README.lo
 %attr(755,root,root) %{_pgmoduledir}/lo.so
 %{_pgsqldir}/*lo.sql
 
 %files module-pgcrypto
 %defattr(644,root,root,755)
-%doc contrib/pgcrypto/README*
 %attr(755,root,root) %{_pgmoduledir}/pgcrypto.so
 %{_pgsqldir}/*pgcrypto.sql
 
 %files module-tablefunc
 %defattr(644,root,root,755)
-%doc contrib/tablefunc/README.tablefunc
 %attr(755,root,root) %{_pgmoduledir}/tablefunc.so
 %{_pgsqldir}/*tablefunc.sql
 
-%files module-tsearch2
-%defattr(644,root,root,755)
-%doc contrib/tsearch2/README*
-%attr(755,root,root) %{_pgmoduledir}/tsearch2.so
-%{_pgsqldir}/*tsearch2.sql
-%{_pgsqldir}/russian.stop.utf8
-%{_pgsqldir}/thesaurus
-%{_pgsqldir}/*.stop
-
 %files module-pg_trgm
 %defattr(644,root,root,755)
-%doc contrib/pg_trgm/README*
 %attr(755,root,root) %{_pgmoduledir}/pg_trgm.so
 %{_pgsqldir}/*pg_trgm.sql
 
 %files module-xml2
 %defattr(644,root,root,755)
-%doc contrib/xml2/README*
 %attr(755,root,root) %{_pgmoduledir}/pgxml.so
 %{_pgsqldir}/*pgxml.sql
+
+%files contrib
+%defattr(644,root,root,755)
+%doc contrib/README
+%{_bindir}/oid2name
+%{_bindir}/pgbench
+%{_bindir}/vacuumlo
+%attr(755,root,root) %{_pgmoduledir}/_int.so
+%attr(755,root,root) %{_pgmoduledir}/adminpack.so
+%attr(755,root,root) %{_pgmoduledir}/btree_gist.so
+%attr(755,root,root) %{_pgmoduledir}/chkpass.so
+%attr(755,root,root) %{_pgmoduledir}/hstore.so
+%attr(755,root,root) %{_pgmoduledir}/int_aggregate.so
+%attr(755,root,root) %{_pgmoduledir}/isn.so
+%attr(755,root,root) %{_pgmoduledir}/ltree.so
+%attr(755,root,root) %{_pgmoduledir}/pageinspect.so
+%attr(755,root,root) %{_pgmoduledir}/pg_buffercache.so
+%attr(755,root,root) %{_pgmoduledir}/pg_freespacemap.so
+%attr(755,root,root) %{_pgmoduledir}/pgrowlocks.so
+%attr(755,root,root) %{_pgmoduledir}/pgstattuple.so
+%attr(755,root,root) %{_pgmoduledir}/sslinfo.so
+%{_pgsqldir}/_int.sql
+%{_pgsqldir}/adminpack.sql
+%{_pgsqldir}/btree_gist.sql
+%{_pgsqldir}/chkpass.sql
+%{_pgsqldir}/hstore.sql
+%{_pgsqldir}/int_aggregate.sql
+%{_pgsqldir}/isn.sql
+%{_pgsqldir}/ltree.sql
+%{_pgsqldir}/pageinspect.sql
+%{_pgsqldir}/pg_buffercache.sql
+%{_pgsqldir}/pg_freespacemap.sql
+%{_pgsqldir}/pgrowlocks.sql
+%{_pgsqldir}/pgstattuple.sql
+%{_pgsqldir}/sslinfo.sql
+%{_pgsqldir}/uninstall__int.sql
+%{_pgsqldir}/uninstall_adminpack.sql
+%{_pgsqldir}/uninstall_btree_gist.sql
+%{_pgsqldir}/uninstall_chkpass.sql
+%{_pgsqldir}/uninstall_hstore.sql
+%{_pgsqldir}/uninstall_int_aggregate.sql
+%{_pgsqldir}/uninstall_isn.sql
+%{_pgsqldir}/uninstall_ltree.sql
+%{_pgsqldir}/uninstall_pageinspect.sql
+%{_pgsqldir}/uninstall_pg_buffercache.sql
+%{_pgsqldir}/uninstall_pg_freespacemap.sql
+%{_pgsqldir}/uninstall_pgrowlocks.sql
+%{_pgsqldir}/uninstall_pgstattuple.sql
+%{_pgsqldir}/uninstall_sslinfo.sql
This page took 0.04006 seconds and 4 git commands to generate.