#
+# todo:
+# - fix postgresql-configure.patch (it puts html doc into /usr/share/info
+# - add missing files
+#
# Conditional build:
# _with_jdbc - with JDBC driver
#
-%include /usr/lib/rpm/macros.perl
%include /usr/lib/rpm/macros.python
%define relc rc2
Source1: %{name}.init
Source2: pgsql-Database-HOWTO-html.tar.gz
Source3: %{name}.sysconfig
-Source4: pgaccess.desktop
-Source5: pgaccess.png
Patch0: %{name}-configure.patch
Patch1: %{name}-pg_ctl-silent.patch
Patch2: %{name}-pg_ctl-nopsql.patch
BuildRequires: readline-devel >= 4.2
BuildRequires: ncurses-devel >= 5.0
BuildRequires: openssl-devel >= 0.9.6a
-BuildRequires: perl-devel >= 5.6
BuildRequires: python-devel >= 2.2.1
-BuildRequires: rpm-perlprov
BuildRequires: rpm-pythonprov
BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
ôÅÐÅÒ ÐÁËÅÔÉ Ú Â¦Â̦ÏÔÅËÁÍÉ ÄÌÑ Ò¦ÚÎÉÈ ÍÏ× ÐÒÏÇÒÁÍÕ×ÁÎÎÑ (C, C++, PERL
¦ TCL) ÒÏÚĦÌÅΦ. ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ Ô¦ÌØËÉ Â¦Â̦ÏÔÅËÉ ÄÌÑ ÍÏ×É C.
-%package perl
-Summary: Perl interface to PostgreSQL database
-Summary(es): Módulo Perl para acceder un servidor PostgreSQL
-Summary(pl): Interfejs dla Perla umo¿liwiaj±cy dostêp do baz PostgreSQL
-Summary(pt_BR): Módulo Perl para acesso ao servidor PostgreSQL
-Summary(ru): âÉÂÌÉÏÔÅËÉ É ÍÏÄÕÌÉ ÄÌÑ ÄÏÓÔÕÐÁ Ë postgresql ÉÚ perl
-Summary(uk): â¦Â̦ÏÔÅËÉ ÔÁ ÍÏÄÕ̦ ÄÌÑ ÄÏÓÔÕÐÕ ÄÏ postgresql Ú Perl
-Summary(zh_CN): PostgreSQL µÄ PL/Perl ³ÌÐòÓïÑÔ
-Group: Applications/Databases
-Requires: perl >= 5.004
-Requires: %{name}-libs = %{version}
-
-%description perl
-This package includes only perl modules needed to access an PostgreSQL
-server.
-
-%description perl -l es
-Módulo Perl para acceder un servidor PostgreSQL
-
-%description perl -l pl
-Pakiet ten zawiera tylko modu³y Perla wymagane dla dostêpu do serwera
-PostgreSQL.
-
-%description perl -l pt_BR
-Módulo Perl para acesso ao servidor PostgreSQL.
-
-%description perl -l ru
-üÔÏ ÐÁËÅÔ postgresql ÄÌÑ ÐÏÄÄÅÒÖËÉ perl. ïÎ ×ËÌÀÞÁÅÔ ÍÏÄÕÌÉ perl É
-×ÓÐÏÍÏÇÁÔÅÌØÎÙÅ ÆÁÊÌÙ ÄÌÑ ÄÏÓÔÕÐÁ Ë postgresql ÉÚ perl. ÷ËÌÀÞÅÎ ÔÏÌØËÏ
-ÄÌÑ ÐÏÄÄÅÒÖËÉ ÓÕÝÅÓÔ×ÕÀÝÉÈ ÐÒÏÇÒÁÍÍ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÜÔÏÇÏ ÕÓÔÁÒÅ×ÛÅÇÏ
-ÉÎÔÅÒÆÅÊÓÁ. îÅ ÉÓÐÏÌØÚÕÊÔÅ ×Ï ×ÎÏ×Ø ÓÏÚÄÁ×ÁÅÍÙÈ ÐÒÏÇÒÁÍÍÁÈ -
-ÉÓÐÏÌØÚÕÊÔÅ perl-DBD-%{name} !
-
-%description perl -l uk
-ãÅ ÐÁËÅÔ postgresql ÄÌÑ Ð¦ÄÔÒÉÍËÉ perl. ÷¦Î ͦÓÔÉÔØ ÍÏÄÕ̦ perl ÔÁ
-ÄÏÐÏͦÖΦ ÆÁÊÌÉ ÄÌÑ ÄÏÓÔÕÐÕ ÄÏ postgresql Ú perl. ÷ËÌÀÞÅÎÉÊ Ô¦ÌØËÉ ÄÌÑ
-ЦÄÔÒÉÍËÉ ¦ÓÎÕÀÞÉÈ ÐÒÏÇÒÁÍ Ú ×ÉËÏÒÉÓÔÁÎÎÑÍ ÃØÏÇÏ ÚÁÓÔÁÒ¦ÌÏÇÏ
-¦ÎÔÅÒÆÅÊÓÕ. îÅ ×ÉËÏÒÉÓÔÏ×ÕÊÔÅ ÊÏÇÏ × ÎÏ×ÉÈ ÐÒÏÇÒÁÍÁÈ, ×ÉËÏÒÉÓÔÏ×ÕÊÔÅ
-perl-DBD-%{name} !
-
%package -n python-postgresql
Summary: The python-based client programs needed for accessing a PostgreSQL server
Summary(es): Módulo Python para acceder un servidor PostgreSQL
ãÅ ÏËÒÅÍÉÊ ÐÁËÅÔ Ú¦ ÓÔÁÔÉÞÎÉÍÉ Â¦Â̦ÏÔÅËÁÍÉ, Ñ˦ ¦ÌØÛ ÎÅ ×ÈÏÄÑÔØ ×
%{name}-devel.
-%package c++
-Summary: C++ interface to PostgreSQL
-Summary(pl): Interfejs C++ do PostgreSQL
-Summary(ru): ëÌÉÅÎÔÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÐÏÄÄÅÒÖËÉ ËÌÉÅÎÔÏ× PostgreSQL, ÎÁÐÉÓÁÎÎÙÈ ÎÁ C++
-Summary(uk): ë̦¤ÎÔÓØ˦ ¦Â̦ÏÔÅËÉ ÄÌÑ Ð¦ÄÔÒÉÍËÉ Ë̦¤ÎÔ¦× PostgreSQL, ÎÁÐÉÓÁÎÉÈ ÎÁ C++
-Group: Applications/Databases
-Requires: %{name}-libs = %{version}
-
-%description c++
-This package includes library for C++ interface to PostgreSQL.
-
-%description c++ -l pl
-Pakiet ten zawiera biblioteki dla interfejsu C++ do PostgreSQL.
-
-%description c++ -l ru
-libpq++ -- ÏÂßÅËÔÎÏ-ÏÒÉÅÎÔÉÒÏ×ÁÎÎÁÑ ÂÉÂÌÉÏÔÅËÁ ÄÌÑ ÄÏÓÔÕÐÁ Ë ÂÁÚÅ
-ÄÁÎÎÙÈ PostgreSQL.
-
-%description c++ -l uk
-libpq++ -- ÏÂ'¤ËÔÎÏ-ÏÒ¦¤ÎÔÏ×ÁÎÁ ¦Â̦ÏÔÅËÁ ÄÌÑ ÄÏÓÔÕÐÕ ÄÏ ÂÁÚÉ ÄÁÎÉÈ
-PostgreSQL.
-
-%package c++-devel
-Summary: C++ interface to PostgreSQL - development part
-Summary(pl): Interfejs C++ do PostgreSQL - cze¶æ programistyczna
-Summary(ru): èÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÒÁÚÒÁÂÏÔÏË Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ libpq++ (C++ ÉÎÔÅÒÆÅÊÓ ÄÌÑ postgresql)
-Summary(uk): èÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÄÌÑ ÒÏÚÒÏÂÏË Ú ×ÉËÏÒÉÓÔÁÎÎÑÍ libpq++ (¦ÎÔÅÒÆÅÊÓ C++ ÄÌÑ postgresql)
-Group: Applications/Databases
-Requires: %{name}-c++ = %{version}
-Requires: %{name}-devel = %{version}
-
-%description c++-devel
-This package includes library and header files for C++ interface.
-
-%description c++-devel -l pl
-Pakiet ten zawiera biblioteki i pliki nag³ówkowe dla interfejsu C++.
-
-%description c++-devel -l ru
-üÔÏ ÐÁËÅÔ ÒÁÚÒÁÂÏÔÞÉËÁ ÄÌÑ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ Ó libpq++. ïÎ ×ËÌÀÞÁÅÔ
-ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ × ÐÒÏÇÒÁÍÍÁÈ, ËÏÔÏÒÙÅ ÉÓÐÏÌØÚÕÀÔ
-ËÏÄ ÉÌÉ API libpq++ (C++ ÉÎÔÅÒÆÅÊÓ ÄÌÑ postgresql).
-
-%description c++-devel -l uk
-ãÅ ÐÁËÅÔ ÐÒÏÇÒÁͦÓÔÁ ÄÌÑ ÐÒÏÇÒÁÍÕ×ÁÎÎÑ Ú libpq++. ÷¦Î ͦÓÔÉÔØ ÈÅÄÅÒÉ
-ÔÁ ¦Â̦ÏÔÅËÉ ÄÌÑ ×ÉËÏÒÉÓÔÁÎÎÑ × ÐÒÏÇÒÁÍÁÈ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ËÏÄ ÁÂÏ
-API libpq++ (¦ÎÔÅÒÆÅÊÓÕ C++ ÄÌÑ postgresql).
-
-%package c++-static
-Summary: C++ interface to PostgreSQL - static libraries
-Summary(pl): Interfejs C++ do PostgreSQL - biblioteki statyczne
-Summary(ru): óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ Ó libpq++
-Summary(uk): óÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ ÄÌÑ ÐÒÏÇÒÁÍÕ×ÁÎÎÑ Ú libpq++
-Group: Applications/Databases
-Requires: %{name}-c++-devel = %{version}
-
-%description c++-static
-This package includes static library for interface C++.
-
-%description c++-static -l pl
-Pakiet ten zawiera biblioteki statyczne dla interfejsu C++.
-
-%description c++-static -l ru
-üÔÏ ÏÔÄÅÌØÎÙÊ ÐÁËÅÔ ÓÏ ÓÔÁÔÉÞÅÓËÉÍÉ ÂÉÂÌÉÏÔÅËÁÍÉ, ËÏÔÏÒÙÅ ÂÏÌØÛÅ ÎÅ
-×ÈÏÄÑÔ × %{name}-c++-devel.
-
-%description c++-static -l uk
-ãÅ ÏËÒÅÍÉÊ ÐÁËÅÔ Ú¦ ÓÔÁÔÉÞÎÉÍÉ Â¦Â̦ÏÔÅËÁÍÉ, Ñ˦ ¦ÌØÛÅ ÎÅ ×ÈÏÄÑÔØ ×
-%{pkg_name}-c++-devel.
-
-%package odbc
-Summary: ODBC interface to PostgreSQL
-Summary(es): Driver ODBC para acceder un servidor PostgreSQL
-Summary(pl): Interfejs ODBC do PostgreSQL
-Summary(pt_BR): Driver ODBC necessário para acessar um servidor PostgreSQL
-Summary(zh_CN): Óà ODBC ·ÃÎÊ Ò»¸ö PostgreSQL Êý¾Ý¿âµÄ ODBC Çý¶¯
-Group: Applications/Databases
-Requires: %{name}-libs = %{version}
-
-%description odbc
-This package includes library for interface ODBC.
-
-%description odbc -l es
-Driver para acceder un servidor PostgreSQL, a través de ODBC.
-
-%description odbc -l pl
-Pakiet ten zawiera biblioteki dla interfejsu ODBC.
-
-%description odbc -l pt_BR
-Driver ODBC necessário para acessar um servidor PostgreSQL.
-
-%package odbc-devel
-Summary: ODBC interface to PostgreSQL - development part
-Summary(pl): Interfejs ODBC do PostgreSQL - cze¶æ programistyczna
-Group: Applications/Databases
-Requires: %{name}-odbc = %{version}
-Requires: %{name}-devel = %{version}
-
-%description odbc-devel
-This package includes library and header files for interface ODBC.
-
-%description odbc-devel -l pl
-Pakiet ten zawiera biblioteki i pliki nag³ówkowe dla interfejsu ODBC.
-
-%package odbc-static
-Summary: ODBC interface to PostgreSQL - static libraries
-Summary(pl): Interfejs ODBC do PostgreSQL - biblioteki statyczne
-Group: Applications/Databases
-Requires: %{name}-odbc-devel = %{version}
-
-%description odbc-static
-This package includes static library for interface ODBC.
-
-%description odbc-static -l pl
-Pakiet ten zawiera biblioteki statyczne dla interfejsu ODBC.
-
-%package -n pgaccess
-Summary: A free graphical database management tool for PostgreSQL
-Summary(pl): Graficzne narzêdzie do obs³ugi baz danych PostgreSQL
-Group: Applications/Databases
-Requires: %{name}-tcl = %{version}
-
-%description -n pgaccess
-A free graphical database management tool for PostgreSQL.
-
-%description -n pgaccess -l pl
-Graficzne narzêdzie do obs³ugi baz danych PostgreSQL.
-
%package tcl
Summary: tcl interface for PostgreSQL
Summary(es): Bibliotecas y shell TCL para acceder un servidor PostgreSQL
%{!?_without_pgsql_multibyte:--enable-multibyte} \
--disable-rpath \
--enable-depend \
- --enable-odbc \
--enable-recode \
--enable-syslog \
--enable-unicode-conversion \
--with-perl \
--with-python \
--with-openssl \
- --enable-odbc \
- --with-odbcinst=%{_sysconfdir} \
--with-x \
%{?_with_jdbc: --with-java}
touch $RPM_BUILD_ROOT/var/log/pgsql
-# Move PL/pgSQL procedural language to %{_pgmoduledir}
-( cd $RPM_BUILD_ROOT%{_libdir}
- mv -f plpgsql.so $RPM_BUILD_ROOT%{_pgmoduledir}
-)
-
-# Move PL/TCL procedural language to %{_pgmoduledir}
-( cd $RPM_BUILD_ROOT%{_libdir}
- mv -f pltcl.so $RPM_BUILD_ROOT%{_pgmoduledir}
-)
-
-# odbc
-install src/interfaces/odbc/odbcinst.ini $RPM_BUILD_ROOT%{_sysconfdir}
-
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql
install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/postgresql
-install %{SOURCE4} $RPM_BUILD_ROOT%{_applnkdir}/System
-install %{SOURCE5} $RPM_BUILD_ROOT%{_pixmapsdir}
cp -a man? $RPM_BUILD_ROOT%{_mandir}
POSTGRES_DATA_DIR=/var/lib/pgsql
. /etc/sysconfig/postgresql
if [ -f $POSTGRES_DATA_DIR/PG_VERSION ]; then
- if [ `cat $POSTGRES_DATA_DIR/PG_VERSION` != '7.2' ]; then
+ if [ `cat $POSTGRES_DATA_DIR/PG_VERSION` != '7.3' ]; then
echo "Database(s) in older, incompatible format exist in $POSTGRES_DATA_DIR."
echo "Dump them and clean $POSTGRES_DATA_DIR, then upgrade postgresql and"
echo "restore database(s)."
echo "Please note, that postgresql module path changed from"
echo "/usr/lib/pgsql/module to /usr/lib/postgresql. Change the path"
echo "in dump file before restore."
+ echo
+ echo "Reading following webpage is encouraged:"
+ echo "http://www.ca.postgresql.org/docs/momjian/upgrade_tips_7.3."
+
exit 1
fi
fi
%post tcl -p /sbin/ldconfig
%postun tcl -p /sbin/ldconfig
-%post c++ -p /sbin/ldconfig
-%postun c++ -p /sbin/ldconfig
-
-%post odbc -p /sbin/ldconfig
-%postun odbc -p /sbin/ldconfig
-
%files
%defattr(644,root,root,755)
%attr(754,root,root) /etc/rc.d/init.d/*
%attr(755,root,root) %{_bindir}/pg_ctl
%attr(755,root,root) %{_bindir}/pg_config
%attr(755,root,root) %{_bindir}/pg_encoding
-%attr(755,root,root) %{_bindir}/pg_passwd
%attr(755,root,root) %{_bindir}/postgres
%attr(755,root,root) %{_bindir}/postmaster
%attr(755,root,root) %{_bindir}/ipcclean
%{_mandir}/man1/dropuser.1*
%{_mandir}/man1/initdb.1*
%{_mandir}/man1/initlocation.1*
-%{_mandir}/man1/pg_passwd.1*
%{_mandir}/man1/pg_ctl.1*
%{_mandir}/man1/pg_config.1*
%{_mandir}/man1/postgres.1*
%files libs
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpq.so.*.*
-%attr(755,root,root) %{_libdir}/libpgeasy.so.*.*
%attr(755,root,root) %{_libdir}/libecpg.so.*.*
%attr(755,root,root) %{_bindir}/pg_id
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/ecpg
%attr(755,root,root) %{_libdir}/libecpg.so
-%attr(755,root,root) %{_libdir}/libpgeasy.so
%attr(755,root,root) %{_libdir}/libpq.so
%dir %{_includedir}/postgresql
%{_includedir}/pg_config.h
%{_includedir}/ecpgerrno.h
%{_includedir}/ecpglib.h
%{_includedir}/ecpgtype.h
-%{_includedir}/libpgeasy.h
%{_includedir}/libpq-fe.h
%{_includedir}/postgres_ext.h
%{_includedir}/sql3types.h
%files static
%defattr(644,root,root,755)
%{_libdir}/libecpg.a
-%{_libdir}/libpgeasy.a
%{_libdir}/libpq.a
%files clients
%{_mandir}/man1/vacuumdb.1*
%{_mandir}/manl/*.l*
-%files c++
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libpq++.so.*.*
-
-%files c++-devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libpq++.so
-%{_includedir}/libpq++.h
-%{_includedir}/libpq++
-
-%files c++-static
-%defattr(644,root,root,755)
-%{_libdir}/libpq++.a
-
-%files perl
-%defattr(644,root,root,755)
-%dir %{perl_sitearch}/auto/Pg
-%{perl_sitearch}/auto/Pg/Pg.bs
-%attr(755,root,root) %{perl_sitearch}/auto/Pg/Pg.so
-%{perl_sitearch}/auto/Pg/autosplit.ix
-%{perl_sitearch}/Pg.pm
-%{_mandir}/man3/*
-
-
%files -n python-postgresql
%defattr(644,root,root,755)
%doc src/interfaces/python/{README*,ChangeLog}
%{py_sitedir}/*.pyo
%attr(755,root,root) %{py_sitedir}/*.so
-%files -n pgaccess
-%defattr(644,root,root,755)
-%doc src/bin/pgaccess/doc/html/*
-%attr(755,root,root) %{_bindir}/pgaccess
-%dir %{_datadir}/postgresql/pgaccess
-%attr(755, root, root) %{_datadir}/postgresql/pgaccess/main.tcl
-%{_datadir}/postgresql/pgaccess/images
-%{_datadir}/postgresql/pgaccess/lib
-%{_applnkdir}/System/pgaccess.desktop
-%{_pixmapsdir}/pgaccess.png
-%{_mandir}/man1/pgaccess.1*
-
%files tcl
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpgtcl.so
%defattr(644,root,root,755)
%{_libdir}/libpgtcl.a
-%files odbc
-%defattr(644,root,root,755)
-%doc src/interfaces/odbc/readme.txt src/interfaces/odbc/notice.txt
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/odbc*
-%attr(755,root,root) %{_libdir}/libpsqlodbc.so.*.*
-%{_datadir}/postgresql/odbc.sql
-
-%files odbc-devel
-%defattr(644,root,root,755)
-#%{_includedir}/postgresql/iodbc
-%attr(755,root,root) %{_libdir}/libpsqlodbc.so
-
-%files odbc-static
-%defattr(644,root,root,755)
-%{_libdir}/libpsqlodbc.a
-
%files module-plpgsql
%defattr(644,root,root,755)
%attr(755,root,root) %{_pgmoduledir}/plpgsql.so