Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > main-src > by-pkgid > eb0436530171d6bfb733c4e4cfb1bf58 > files > 24

postgresql-7.2-12mdk.src.rpm

%{expand:%%define perl_version %(rpm -q perl|sed 's/perl-\([0-9].*\)-.*$/\1/')}
%{expand: %%define pver %(python -c 'import sys;print(sys.version[0:3])')}

%define perl_arch %(eval `perl '-V:archname'`; echo $archname)
%define initd %{_sysconfdir}/rc.d/init.d
%define pgdata /var/lib/pgsql
%define logrotatedir %{_sysconfdir}/logrotate.d
%define pver 2.2

Summary: 	PostgreSQL client programs and libraries.
Name:		postgresql
Version:	7.2
Release:	12mdk
License:	BSD
Group:		Databases

Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.gz

Source1: http://jdbc.postgresql.org/download/jdbc7.2dev-1.1.jar
Source2: http://jdbc.postgresql.org/download/jdbc7.2dev-1.2.jar
Source3: http://jdbc.postgresql.org/download/jdbc7.1-1.1.jar
Source4: http://jdbc.postgresql.org/download/jdbc7.1-1.2.jar

Source5: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.gz.md5

#Daouda :the last up to date file is for 7.1 
Source6: README.rpm-dist.postgresql-%{version}
Source7: pg-migration-scripts-%{version}.tar.bz2
Source8: logrotate.postgresql-%{version}
Source9: pg_options-%{version}
Source10: README.postgresql.mdk
Source11: postgresql.init-%{version}
Source12: postgresql-dump.1.bz2
Source13: odbcinst.ini

# Daouda : script for dumping database (from RedHat)
Source14: mdk-pgdump.sh
Source15: postgresql-bashprofile
Source20: postgres16.xpm
Source21: postgres32.xpm
Source22: postgres48.xpm

Source23: files.lst

Patch1: rpm-pgsql-7.2.patch.bz2
Patch2: postgresql-7.2rc2-betterquote.patch.bz2
Patch3: postgresql-7.2-contribfixes.patch.bz2
Patch4: postgresql-7.2-tighten.patch.bz2

Requires: perl sfio libpgsql2
Prereq: /sbin/chkconfig /sbin/ldconfig %{_sbindir}/useradd /lib/cpp initscripts
URL: http://www.postgresql.org/ 
Provides: postgresql-clients
Obsoletes: postgresql-clients
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildPrereq: python-devel perl tcl
BuildRequires: perl python-devel perl-devel tk XFree86-devel

# To make sure ./configure picks all the required things
BuildRequires: glibc-devel libgpm1 libncurses5-devel sfio
BuildRequires: readline-devel >= 4.0 libtermcap-devel

%description
PostgreSQL is an advanced Object-Relational database management system
(DBMS) that supports almost all SQL constructs (including
transactions, subselects and user-defined types and functions). The
postgresql package includes the client programs and libraries that
you'll need to access a PostgreSQL DBMS server.  These PostgreSQL
client programs are programs that directly manipulate the internal
structure of PostgreSQL databases on a PostgreSQL server. These client
programs can be located on the same machine with the PostgreSQL
server, or may be on a remote machine which accesses a PostgreSQL
server over a network connection. This package contains the client
libraries for C and C++, as well as command-line utilities for
managing PostgreSQL databases on a PostgreSQL server. 

If you want to manipulate a PostgreSQL database on a remote PostgreSQL
server, you need this package. You also need to install this package
if you're installing the postgresql-server package.

%package -n libpgsql2
Summary: Shared library libpq.so.2.1 for PostgreSQL
Group: System/Libraries
Obsoletes: postgresql-libs
Provides: postgresql-libs = %{version}-%{release} libpgsql = %{version}-%{release}

%description -n libpgsql2
C and C++ libraries to enable user programs to communicate with the
PostgreSQL database backend. The backend can be on another machine and
accessed through TCP/IP.

%package -n libpgperl
Summary: Perl modules for PostgreSQL.
Group: Development/Other
Requires: perl = %{perl_version} postgresql = %{version}-%{release}
Obsoletes: postgresql-plperl postgresql-perl
Provides: postgresql-plperl = %{version}-%{release} postgresql-perl = %{version}-%{release}

%description -n libpgperl
A library to enable Perl scripts to communicate with the PostgreSQL
database backend.

%package -n libpgtcl2
Summary: Tcl/Tk library and front-end for PostgreSQL.
Group: System/Libraries
Requires: tcl => 8.0
Provides: libpgtcl = %{version}-%{release}

%description -n libpgtcl2
A library to enable Tcl/Tk scripts to communicate with the PostgreSQL
database backend.

%package -n libecpg3
Summary: Shared library libecpg.so.3.2 for PostgreSQL
Group: System/Libraries
Requires: postgresql = %{version}-%{release}
Provides: libecpg = %{version}-%{release}

%description -n libecpg3
Libecpg is used by programs built with ecpg (Embedded PostgreSQL for C)
Use postgresql-dev to develop such programs.

%package server
Summary: The programs needed to create and run a PostgreSQL server.
Group: Databases
Prereq: %{_sbindir}/useradd
Requires: postgresql = %{version}-%{release}

%description server
The postgresql-server package includes the programs needed to create
and run a PostgreSQL server, which will in turn allow you to create
and maintain PostgreSQL databases.  PostgreSQL is an advanced
Object-Relational database management system (DBMS) that supports
almost all SQL constructs (including transactions, subselects and
user-defined types and functions). You should install
postgresql-server if you want to create and maintain your own
PostgreSQL databases and/or your own PostgreSQL server. You also need
to install the postgresql and postgresql-devel packages.

If you never played with PostgreSQL before, please read README.mdk.

%package docs
Summary: Extra documentation for PostgreSQL
Group: Databases

%description docs
The postgresql-docs package includes the SGML source for the documentation
as well as the documentation in other formats, and some extra documentation.
Install this package if you want to help with the PostgreSQL documentation
project, or if you want to generate printed documentation.

%package contrib
Summary: Contributed source and binaries distributed with PostgreSQL
Group: Databases
Requires: libpgsql = %{version}-%{release} postgresql = %{version}-%{release}
Requires: libpgtcl = %{version}-%{release} libpgperl = %{version}-%{release}

%description contrib
The postgresql-contrib package includes the contrib tree distributed with
the PostgreSQL tarball.  Selected contrib modules are prebuilt.

%package devel
Summary: PostgreSQL development header files and libraries.
Group: Development/Databases
Requires: postgresql = %{version}-%{release} libpgsql = %{version}-%{release}
Requires: libpgperl = %{version}-%{release} libpgtcl = %{version}-%{release}
Requires: libecpg = %{version}-%{release} libpgsqlodbc = %{version}-%{release}

%description devel
The postgresql-devel package contains the header files and libraries
needed to compile C or C++ applications which will directly interact
with a PostgreSQL database management server and the ecpg Embedded C
Postgres preprocessor. You need to install this package if you want to
develop applications which will interact with a PostgreSQL server. If
you're installing postgresql-server, you need to install this
package.

%package plperl
Summary: The PL/Perl procedural language for PostgreSQL.
Group: Databases
Requires: postgresql = %{version}-%{release}, perl-base = %{perl_version}

%description plperl
PostgreSQL is an advanced Object-Relational database management
system.  The postgresql-plperl package contains the the PL/Perl
procedural language for the backend.

%package tcl
Summary: A Tcl client library, and the PL/Tcl procedural language for PostgreSQL.
Group: Databases
Requires: tcl >= 8.0 postgresql = %{version}-%{release}
Requires: libpgtcl = %{version}-%{release}

%description tcl
PostgreSQL is an advanced Object-Relational database management
system.  The postgresql-tcl package contains the pg-enhanced pgtclsh, 
and the PL/Tcl procedural language for the backend.

%package tk
Summary: Tk shell and tk-based GUI for PostgreSQL.
Group: Databases
Requires: tcl >= 8.0 tk >= 8.0 postgresql = %{version}-%{release}
Requires: libpgtcl = %{version}-%{release} postgresql-devel = %{version}-%{release}

%description tk
PostgreSQL is an advanced Object-Relational database management
system.  The postgresql-tk package contains the pgaccess
program. Pgaccess is a graphical front end, written in Tcl/Tk, for the
psql and related PostgreSQL client programs.

%package -n libpgsqlodbc0
Summary: The ODBC driver needed for accessing a PostgreSQL DB using ODBC.
Group: Databases
Requires: postgresql = %{version}-%{release}
Obsoletes: postgresql-odbc
Provides: postgresql-odbc = %{version}-%{release} libpgsqlodbc = %{version}-%{release}

%description -n libpgsqlodbc0
PostgreSQL is an advanced Object-Relational database management
system. The postgresql-odbc package includes the ODBC (Open DataBase
Connectivity) driver and sample configuration files needed for
applications to access a PostgreSQL database using ODBC.

%package python
Summary: Development module for Python code to access a PostgreSQL DB.
Group: Databases
Requires: python >= %{pver} postgresql = %{version}-%{release}

%description python
PostgreSQL is an advanced Object-Relational database management
system.  The postgresql-python package includes a module for
developers to use when writing Python code for accessing a PostgreSQL
database.

%package jdbc
Summary: Files needed for Java programs to access a PostgreSQL database.
Group: Databases
Requires: postgresql = %{version}-%{release}

%description jdbc
PostgreSQL is an advanced Object-Relational database management
system. The postgresql-jdbc package includes the .jar file needed for
Java programs to access a PostgreSQL database.

%package test
Summary: The test suite distributed with PostgreSQL.
Group: Databases
Requires: postgresql = %{version}-%{release}

%description test
PostgreSQL is an advanced Object-Relational database management
system. The postgresql-test package includes the sources and pre-built
binaries of various tests for the PostgreSQL database management
system, including regression tests and benchmarks.

%prep
rm -rf $RPM_BUILD_ROOT
%setup -q  

%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%build

pushd src
#(deush) if libtool exist, copy some files 
if [ -d %{_datadir}/libtool ]
then
   cp %{_datadir}/libtool/config.* .
fi

# doesn't build on PPC with full optimization (sb)
%ifnarch ppc
CFLAGS="${CFLAGS:-$RPM_OPT_FLAGS}" ; export CFLAGS
CXXFLAGS="${CXXFLAGS:-$RPM_OPT_FLAGS}" ; export CXXFLAGS
%endif

#fix -ffast-math problem (deush)
%ifnarch ppc
%serverbuild
CFLAGS=`echo $RPM_OPT_FLAGS|xargs -n 1|grep -v ffast-math|xargs -n 100`
%endif
popd

./configure --disable-rpath \
            --enable-hba \
	    --enable-locale \
	    --enable-multibyte \
	    --enable-syslog\
	    --with-CXX \
	    --enable-odbc \
	    --with-perl \
	    --with-python \
	    --with-tcl \
	    --datadir=%{_datadir}/pgsql \
	    --docdir=%{_docdir} \
	    --includedir=%{_includedir}/pgsql \
	    --mandir=%{_mandir} \
	    --prefix=%_prefix \
	    --sysconfdir=%{_sysconfdir}/pgsql

#make COPT="$CFLAGS" all
make all

pushd src/test
   make all
popd
   
#deush - Reenable plperl build
pushd src/pl/plperl
   EXTRA_INCLUDES=-I../../include plperl_installdir=$RPM_BUILD_ROOT%{_libdir} perl Makefile.PL
   make INC=-I../../include
popd

pushd src/interfaces/python
   cp %{_libdir}/python%{pver}/config/Makefile Makefile.pre.in
   echo *shared* > Setup
   echo _pg pgmodule.c -I../../include -I../libpq -L../libpq -lpq -lcrypt >> Setup
   make
popd

%make all PGDOCS=unpacked -C doc

pushd src/test
   make all
popd

%install
rm -rf $RPM_BUILD_ROOT

make DESTDIR=$RPM_BUILD_ROOT install 

#plperl
make DESTDIR=$RPM_BUILD_ROOT -C src/pl/plperl install

#perl
make PREFIX=$RPM_BUILD_ROOT%{_prefix} -C src/interfaces/perl5 -f Makefile install

# Get rid of the packing list generated by the perl Makefile, and build my own...
find $RPM_BUILD_ROOT%{_libdir}/perl5 -name .packlist -exec rm -f {} \;
echo '%defattr(-,root,root)' > perlfiles.list
find $RPM_BUILD_ROOT%{_libdir}/perl5 -type f -print | \
        sed -e "s|$RPM_BUILD_ROOT/|/|g"  | \
        sed -e "s|.*/man/.*|&\*|" > perlfiles.list
find $RPM_BUILD_ROOT%{_libdir}/perl5 -type d -name Pg -print | \
	sed -e "s|$RPM_BUILD_ROOT/|%dir /|g" >> perlfiles.list

if [ ! -e $RPM_BUILD_ROOT%{_mandir}/man3/Pg.* ]
then
    mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
    cp `find $RPM_BUILD_ROOT -name 'Pg.3*' -print` $RPM_BUILD_ROOT%{_mandir}/man3
fi

pushd src/interfaces
    mkdir -p $RPM_BUILD_ROOT%{_datadir}/pgsql/perl5
    cp -a perl5/test.pl $RPM_BUILD_ROOT%{_datadir}/pgsql/perl5
popd
				
# remove perllocal.pod and Pg.bs from the file list - only occurs with 5.6
perl -pi -e "s/^.*perllocal.pod$//" perlfiles.list
perl -pi -e "s/^.*Pg.bs$//" perlfiles.list
mkdir -p $RPM_BUILD_ROOT%{_libdir}/perl5/site_perl/%{_arch}-linux/auto/Pg

make -C doc

# Copy readmes
pushd src/interfaces
mkdir -p $RPM_BUILD_ROOT/usr/share/pgsql/perl5
cp -a perl5/test.pl $RPM_BUILD_ROOT%{_datadir}/pgsql/perl5
cp -a libpq/README libpq/README.libpq
cp -a libpq++/README libpq++/README.libpq++
cp -a libpgeasy/README libpgeasy/README.libpgeasy
popd

# the postgresql-dump manpage.....
pushd $RPM_BUILD_ROOT%{_mandir}
   cp %{SOURCE12} man1
popd

# install the dump script
install -m755 %{SOURCE14} $RPM_BUILD_ROOT%{_bindir}/

# install odbcinst.ini
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pgsql
install -m755 %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/pgsql

# install dev headers.
make DESTDIR=$RPM_BUILD_ROOT install-all-headers

# copy over Makefile.global to the include dir....
install -m755 src/Makefile.global $RPM_BUILD_ROOT%{_includedir}/pgsql/

# pgaccess installation
pushd src/bin
   #(deush) pgaccess path fix
   install -m 755 pgaccess/pgaccess $RPM_BUILD_ROOT%{_bindir}
   mkdir -p $RPM_BUILD_ROOT%{_datadir}/pgsql/pgaccess
   install -m 644 pgaccess/main.tcl $RPM_BUILD_ROOT%{_datadir}/pgsql/pgaccess
   tar cf - pgaccess/lib pgaccess/images | tar xf - -C $RPM_BUILD_ROOT%{_datadir}/pgsql
   cp -a pgaccess/doc/html   ../../doc/pgaccess
   cp    pgaccess/demo/*.sql ../../doc/pgaccess
popd

# Java/JDBC
# The user will have to set a CLASSPATH to find it here, but not sure where else to put it...
# JDBC jars 
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pgsql
install -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pgsql
install -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/pgsql
install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/pgsql

#mdk menu for pg-tk
mkdir -p $RPM_BUILD_ROOT%{_menudir}
cat <<EOF >$RPM_BUILD_ROOT%{_menudir}/postgresql-tk
?package(postgresql-tk):\
needs="x11"\
section="Applications/Databases"\
longtitle="PostgreSQL Tcl/Tk front-end"\
title="PostgreSQL Access"\ 
icon="postgres.xpm"\ 
command="pgaccess"
EOF

#mdk icons 
install -D -m644 %{SOURCE20} $RPM_BUILD_ROOT%{_miconsdir}/postgres.xpm
install -D -m644 %{SOURCE21} $RPM_BUILD_ROOT%{_iconsdir}/postgres.xpm
install -D -m644 %{SOURCE22} $RPM_BUILD_ROOT%{_liconsdir}/postgres.xpm

# Python
pushd src/interfaces/python
# Makefile.pre.in doesn't yet support .py files anyway, so we stick to a manual installation
  mkdir -p $RPM_BUILD_ROOT%{_libdir}/python%{pver}/site-packages
  install -m 755 *.py $RPM_BUILD_ROOT%{_libdir}/python%{pver}/site-packages/
popd

# Java/JDBC
# The user will have to set a CLASSPATH to find it here, but not sure where else to put it...
# Install 7.0 JDBC jars -- no longer include the 6.5 versions

install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pgsql
install -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pgsql

chmod 644 $RPM_BUILD_ROOT%{_mandir}/*/*
chmod +x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
install -d $RPM_BUILD_ROOT%{initd}
install -m 755 %{SOURCE11} $RPM_BUILD_ROOT%{initd}/postgresql

# PGDATA needs removal of group and world permissions due to pg_pwd hole.
install -d -m 700 $RPM_BUILD_ROOT%{pgdata}/data

# Initial pg_options
# (cbelisle) this is done in %post server
#install -m 700 %{SOURCE9} $RPM_BUILD_ROOT%{pgdata}/data/pg_options

# backups of data go here...
install -d -m 700 $RPM_BUILD_ROOT%{pgdata}/backups

install -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_localstatedir}/pgsql/.bash_profile

# tests. There are many files included here that are unnecessary, but include
# them anyway for completeness.
mkdir -p $RPM_BUILD_ROOT%{_libdir}/pgsql/test
cp -a src/test/regress $RPM_BUILD_ROOT%{_libdir}/pgsql/test
install -m 0755 contrib/spi/refint.so* $RPM_BUILD_ROOT%{_libdir}/pgsql/test/regress
install -m 0755 contrib/spi/autoinc.so* $RPM_BUILD_ROOT%{_libdir}/pgsql/test/regress
pushd $RPM_BUILD_ROOT%{_libdir}/pgsql/test/regress/
strip *.so
popd

# Upgrade scripts.
pushd $RPM_BUILD_ROOT
   tar xjf %{SOURCE7}
popd

# Fix some more documentation
# no need for the OS2 client
#gzip doc/internals.ps || true
cp %{SOURCE6} README.rpm-dist
cp %{SOURCE10} README.mdk
#mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html doc
mv $RPM_BUILD_ROOT%{_docdir}/%{name}/html $RPM_BUILD_ROOT%{_docdir}/%{name}-docs-%{version}

# (deush)  build contrib (need better solution)
pushd contrib
   make clean
   make all
popd 

# move the contrib tree to the right place after building....
cp -r contrib $RPM_BUILD_ROOT%{_libdir}/pgsql
# remove all sources in the contrib tree
rm -f $RPM_BUILD_ROOT%{_libdir}/pgsql/contrib/*/*.c
rm -f $RPM_BUILD_ROOT%{_libdir}/pgsql/contrib/*/*/*.c
rm -f $RPM_BUILD_ROOT%{_libdir}/pgsql/contrib/*/*.h
rm -f $RPM_BUILD_ROOT%{_libdir}/pgsql/contrib/*/*/*.h

pushd $RPM_BUILD_ROOT/usr/lib/pgsql/contrib

# Get rid of useless makefiles
rm -f Makefile */Makefile
# earthdistance
pushd earthdistance
perl -pi -e "s|%{_datadir}/pgsql/contrib|%{_libdir}/pgsql/contrib/earthdistance|" *
popd

# array
pushd array
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/array|" *
popd

# cube
pushd cube
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/cube|" cube.sql
popd

# fulltext
pushd fulltextindex
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/fulltextindex|" *.sql
popd

# intarray
pushd intarray
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/intarray|" *.sql
popd

# isbn_issn
pushd isbn_issn
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/isbn_issn|" *.sql
popd

# lo
pushd lo
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/lo|" *.sql
popd

# miscutil
pushd miscutil
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/miscutil|" *.sql
popd

# noup
pushd noupdate
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/noupdate|" *.sql
popd 

# pgcrypto
pushd pgcrypto
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/pgcrypto|" *.sql
popd


# rserv
pushd rserv
perl -pi -e "s|%{_datadir}|%{_libdir}|" *
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/rserv|" *
perl -pi -e "s|%{_bindir}|%{_libdir}/pgsql/contrib/rserv|" *
perl -pi -e "s|%{_libdir}/pgsql/contrib\"|%{_libdir}/pgsql/contrib/rserv\"|" *
perl -pi -e "s|%{_libdir}/pgsql/contrib$|%{_libdir}/pgsql/contrib/rserv|" *
popd

# seg 
pushd seg
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/seg|" *.sql
popd

# spi
pushd spi
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/spi|" *.sql
popd

# string
pushd string
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/string|" *.sql
popd

# userlock
pushd userlock
perl -pi -e "s|%{_libdir}/contrib|%{_libdir}/pgsql/contrib/userlock|" *.sql
popd

popd

# Fix a dangling symlink
#mkdir -p $RPM_BUILD_ROOT%{_includedir}/pgsql/port
#cp src/include/port/linux.h $RPM_BUILD_ROOT%{_includedir}/pgsql/port/
#ln -sf port/linux.h $RPM_BUILD_ROOT%{_includedir}/pgsql/os.h

#more broken symlinks
rm -f $RPM_BUILD_ROOT%{_libdir}/pgsql/contrib/pg_resetxlog/pg_crc.c $RPM_BUILD_ROOT%{_libdir}/pgsql/contrib/pg_controldata/pg_crc.c
cp src/backend/utils/hash/pg_crc.c $RPM_BUILD_ROOT%{_libdir}/pgsql/contrib/pg_resetxlog/pg_crc.c
ln $RPM_BUILD_ROOT%{_libdir}/pgsql/contrib/pg_resetxlog/pg_crc.c $RPM_BUILD_ROOT%{_libdir}/pgsql/contrib/pg_controldata/pg_crc.c

# Symlink libpq.so.2.0 to libpq.so.2.1 for backwards compatibilty, until soname package are the norm.
pushd $RPM_BUILD_ROOT%{_libdir}
   ln -s libpq.so.2.1 libpq.so.2.0
popd

#%find_lang libpq
#%find_lang pg_dump
#%find_lang postgres
#%find_lang psql

#cat psql.lang pg_dump.lang > main.lst
#cat postgres.lang %{SOURCE23} > server.lst

# move a perl man page which ends up in a weird place - sometimes
if [ -a $RPM_BUILD_ROOT%{_libdir}/perl5/man/$RPM_BUILD_ROOT%{_prefix}/Pg.3  ]
then
    mkdir -p $RPM_BUILD_ROOT%{_libdir}/perl5/man/man3 
    mv $RPM_BUILD_ROOT%{_libdir}/perl5/man/$RPM_BUILD_ROOT%{_prefix}/Pg.3 $RPM_BUILD_ROOT%{_libdir}/perl5/man/man3/ 
    rm -fr  $RPM_BUILD_ROOT%{_libdir}/perl5/man/$RPM_BUILD_ROOT 
    perl -pi -e "s@man%{_prefix}/@man/man3/@" $RPM_BUILD_DIR/postgresql-%{version}/perlfiles.list
fi

# remove perllocal.pod from the file list - only occurs with 5.6
perl -pi -e "s/^.*perllocal.pod$//" perlfiles.list

# Strip 'em all
#strip $RPM_BUILD_ROOT%{_bindir}/* || :
perl -p -i -e 's/Pg\.3/Pg\.3\.bz2/g' $RPM_BUILD_DIR/%{name}-%{version}/perlfiles.list


# Fix os.h in the devel package
rm -f $RPM_BUILD_ROOT%{_includedir}/pgsql/os.h
cp src/include/port/linux.h \
	$RPM_BUILD_ROOT%{_includedir}/pgsql/os.h

%pre
# Need to make backups of some executables if an upgrade
# They will be needed to do a dump of the old version's database.
# All output redirected to /dev/null.
if [ $1 -gt 1 ]
then
   mkdir -p %{_libdir}/pgsql/backup > /dev/null
   pushd %{_bindir} > /dev/null
   cp -fp pg_dump pg_dumpall psql %{_libdir}/pgsql/backup > /dev/null
   popd > /dev/null
   pushd %{_libdir} > /dev/null
   cp -fp libpq.* %{_libdir}/pgsql/backup > /dev/null
   popd > /dev/null
fi

%pre server
if [ ! -e /var/log/postgresql ]; then
    touch /var/log/postgresql
fi
chown postgres.postgres /var/log/postgresql
chmod 0700 /var/log/postgresql

if [ $1 -gt 1 ]
then
   if [ ! -d %{_libdir}/pgsql/backup ]; then
       mkdir -p %{_libdir}/pgsql/backup > /dev/null
   fi
   pushd %{_bindir} > /dev/null
   cp -fp postmaster postgres %{_libdir}/pgsql/backup > /dev/null
   popd > /dev/null
fi 

%pre -n libpgsql2
if [ $1 -gt 1 ]
then
   if [ ! -d %{_libdir}/pgsql/backup ]; then
       mkdir -p %{_libdir}/pgsql/backup > /dev/null
   fi
   pushd %{_libdir} > /dev/null
   cp -fp libpq.* %{_libdir}/pgsql/backup > /dev/null
   popd > /dev/null
fi

%post server
/sbin/ldconfig
su -l postgres -c "%{_bindir}/postgres -T "verbose=2,query=2,syslog=0" >/dev/null 2>&1"

if [ ! -d %{pgdata}/data ]; then mkdir -p %{pgdata}/data; fi

chown postgres.postgres %{pgdata}/data/
chmod 0700 %{pgdata}/data/
# Restore the database
if [ $1 -gt 1 ]
then 
   %{_bindir}/mdk-pgdump.sh %{pgdata}/backups/pg_db_backup >>/var/log/postgresql 2>>/var/log/postgresql
   if [ -f %{_localstatedir}/pgsql/pg_db_backup ]
   then
       if [ -d %{pgdata}/data ]
       then
           rm -rf %{pgdata}/backup_data
           mv %{pgdata}/data %{pgdata}/backup_data
           echo "Data folder (where your database is) backup'ed in %{pgdata}/backup_data.\n" >>/var/log/postgresql 2>>/var/log/postgresql
       fi
       %_post_service %{name}
       psql -e backup <%{_localstatedir}/pgsql/pg_db_backup
       echo "Your data is in the backup database. Rename the database if you need.\n" >>/var/log/postgresql 2>>/var/log/postgresql
   else
       if [ -f %{pgdata}/backups/pg_db_backup ]
       then
           if [ -d %{pgdata}/data ]
	   then
	       rm -rf %{pgdata}/backup_data
               mv %{pgdata}/data %{pgdata}/backup_data
               echo "Data folder (where your database is) backup'ed in %{pgdata}/backup_data.\n" >>/var/log/postgresql 2>>/var/log/postgresql
           fi
           %_post_service %{name}
           psql -e backup <%{pgdata}/backups/pg_db_backup
           echo "Your data is in the backup database. Rename the database if you need.\n" >>/var/log/postgresql 2>>/var/log/postgresql
       fi
   fi
else
   %_post_service %{name}
fi

%preun server
%_preun_service %{name}
# Backup the database
#if [ -f /var/lock/subsys/postgresql ]
#then
#    if [ -f %{pgdata}/pgsql/backups/pg_db_backup ]; then
#        echo "A backup of your database is stored in file %{pgdata}/pgsql/backups/pg_db_backup.\n" >> /var/log/postgresql
#	mv %{pgdata}/data %{pgdata}/backup_data
#	echo "Data folder (where your database is) backup'ed in %{pgdata}/backup_data.\n" >> /var/log/postgresql
#    fi
#else
#    pg_dumpall > %{pgdata}/pgsql/backups/pg_db_backup
#    if [ -f %{pgdata}/pgsql/backups/pg_db_backup ]; then
#        echo "A backup of your database is stored in file %{pgdata}/pgsql/backups/pg_db_backup.\n" >> /var/log/postgresql
#	mv %{pgdata}/data %{pgdata}/backup_data
#	echo "Data folder (where your database is) backup'ed in %{pgdata}/backup_data.\n" >> /var/log/postgresql
#    fi
#    else
#        echo "PostgreSQL service can't start. Backup not done.\n" >> /var/log/postgresql
#    fi    
#fi

%postun server
/sbin/ldconfig
# (cb) 02/02/22 Remove this part. Already done in packaging.
#Remove postgresql related variables
#sed -e '/^[PGLIB][PGDATA]/d' ~postgres/.bash_profile > ~postgres/.bash_profile
#sed -e '/^export/d' ~postgres/.bash_profile > ~postgres/.bash_profile
if [ $1 -ge 1 ]; then
    /sbin/service postgresql condrestart >/dev/null 2>&1
fi

%post tk
%{update_menus}

%postun tk
%{clean_menus}

%post -n libpgsql2 -p /sbin/ldconfig
%postun -n libpgsql2 -p /sbin/ldconfig

%post -n libpgtcl2 -p /sbin/ldconfig
%postun -n libpgtcl2 -p /sbin/ldconfig

%post -n libpgperl -p /sbin/ldconfig
%postun -n libpgperl -p /sbin/ldconfig

%post -n libecpg3 -p /sbin/ldconfig
%postun -n libecpg3 -p /sbin/ldconfig

%post -n libpgsqlodbc0 -p /sbin/ldconfig
%postun -n libpgsqlodbc0 -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT
rm -f perlfiles.list

%files
%defattr(-,root,root)
%doc doc/FAQ doc/KNOWN_BUGS doc/MISSING_FEATURES doc/README* 
%doc COPYRIGHT README HISTORY doc/bug.template
%doc README.rpm-dist
%{_bindir}/createdb
%{_bindir}/createlang
%{_bindir}/createuser
%{_bindir}/dropdb
%{_bindir}/droplang
%{_bindir}/dropuser
%{_bindir}/pg_dump
%{_bindir}/pg_dumpall
%{_bindir}/pg_restore
%{_bindir}/psql
%{_bindir}/vacuumdb
%{_mandir}/man1/createdb.1*
%{_mandir}/man1/createlang.1*
%{_mandir}/man1/createuser.1*
%{_mandir}/man1/dropdb.1*
%{_mandir}/man1/droplang.1*
%{_mandir}/man1/dropuser.1*
%{_mandir}/man1/pg_dump.1*
%{_mandir}/man1/pg_dumpall.1*
%{_mandir}/man1/psql.1*
%{_mandir}/man1/pg_restore.1*
%config(noreplace) %{_sysconfdir}/pgsql/odbcinst.ini
%{_datadir}/pgsql/odbc.sql

%files -n libpgsql2
%defattr(-,root,root)
%doc src/interfaces/libpq/README.libpq src/interfaces/libpq++/README.libpq++ src/interfaces/libpgeasy/README.libpgeasy
%{_libdir}/libpq++.so.*
%{_libdir}/libpq.so.*
%{_libdir}/libpgeasy.so.*
%{_libdir}/pgsql/plpgsql.so

%files -n libpgtcl2
%defattr(-,root,root)
%doc src/interfaces/libpgtcl/README
%{_libdir}/libpgtcl.so.*
%{_libdir}/pgsql/pltcl.so

%files -f perlfiles.list -n libpgperl
%defattr(-,root,root)
%doc src/interfaces/perl5/README
%{_libdir}/plperl.so
%dir %{_libdir}/perl5/site_perl/%{_arch}-linux/auto
%{_datadir}/pgsql/perl5
%{_mandir}/man3/Pg.*

%files -n libecpg3
%defattr(-,root,root)
%doc src/interfaces/ecpg/ChangeLog src/interfaces/ecpg/README.dynSQL
%{_libdir}/libecpg.so.*

%files docs
%defattr(-,root,root)
#%doc doc/src/
%doc %{_docdir}/%{name}-docs-%{version}/*

%files contrib
%defattr(-,root,root)
%doc contrib/README
%{_libdir}/pgsql/contrib/*

%files server
%defattr(-,root,root)
%config(noreplace) %{initd}/postgresql
%doc README.mdk
%{_bindir}/initdb
%{_bindir}/initlocation
%{_bindir}/ipcclean
%{_bindir}/pg_ctl
%{_bindir}/pg_encoding
%{_bindir}/pg_id
%{_bindir}/pg_passwd
%{_bindir}/postgres
#%{_bindir}/postgresql-dump
%{_bindir}/postmaster
%{_bindir}/mdk-pgdump.sh
%{_mandir}/man1/initdb.1*
%{_mandir}/man1/initlocation.1*
%{_mandir}/man1/ipcclean.1*
%{_mandir}/man1/pg_ctl.1*
%{_mandir}/man1/pg_passwd.1*
%{_mandir}/man1/postgres.1*
%{_mandir}/man1/postmaster.1*
%{_mandir}/man1/vacuumdb.1*
#%{_mandir}/man1/postgresql-dump.1*
%attr(700,postgres,postgres) %dir %{pgdata}
%attr(700,postgres,postgres) %dir %{pgdata}/data
%{_datadir}/pgsql/postgres.bki
%{_datadir}/pgsql/postgres.description
%{_datadir}/pgsql/*.sample
#%{pgdata}/data/pg_options
%attr(700,postgres,postgres) %dir %{_datadir}/pgsql/backup
%{_datadir}/pgsql/backup/pg_dumpall_new
%attr(700,postgres,postgres) %dir %{pgdata}/backups
%attr(644,postgres,postgres) %config(noreplace) %{_localstatedir}/pgsql/.bash_profile


%files devel
%defattr(-,root,root)
%doc doc/TODO doc/TODO.detail
%{_includedir}/pgsql
%{_bindir}/ecpg
%{_libdir}/lib*.a
%{_libdir}/lib*.so
%{_mandir}/man1/ecpg.1*
%{_bindir}/pg_config
%{_mandir}/man1/pg_config.1*

%files tcl
%defattr(-,root,root)
%doc src/interfaces/libpgtcl/README
%{_bindir}/pgtclsh
%{_mandir}/man1/pgtclsh.1*

%files tk
%defattr(-,root,root)
%doc doc/pgaccess/*
%{_datadir}/pgsql/pgaccess
%{_bindir}/pgaccess
%{_bindir}/pgtksh
%{_mandir}/man1/pgaccess.1*
%{_mandir}/man1/pgtksh.1*
%{_menudir}/*
%{_iconsdir}/*.xpm
%{_miconsdir}/*.xpm
%{_liconsdir}/*.xpm

%files -n libpgsqlodbc0
%defattr(-,root,root)
%{_libdir}/libpsqlodbc.so.*

%files python
%defattr(-,root,root)
%doc src/interfaces/python/README* src/interfaces/python/tutorial
%{_libdir}/python%{pver}/site-packages/_pgmodule.so
%{_libdir}/python%{pver}/site-packages/*.py
%{_libdir}/pgsql/plpython.so

%files jdbc
%defattr(-,root,root)
%doc src/interfaces/jdbc/README
%{_datadir}/pgsql/jdbc7.2dev-1.1.jar
%{_datadir}/pgsql/jdbc7.2dev-1.2.jar
%{_datadir}/pgsql/jdbc7.1-1.1.jar
%{_datadir}/pgsql/jdbc7.1-1.2.jar

%files test
%defattr(-,postgres,postgres)
%attr(-,postgres,postgres) %{_libdir}/pgsql/test/*
%attr(-,postgres,postgres) %dir %{_libdir}/pgsql/test

%changelog
* Mon Mar 11 2002 Christian Belisle <cbelisle@mandrakesoft.com> 7.2-12mdk
- Make sure that data directory is created.

* Sun Mar 10 2002 Christian Belisle <cbelisle@mandrakesoft.com> 7.2-11mdk
- Fix postgresql-tcl requires and description (thanks to Tanner).

* Mon Mar 04 2002 Christian Belisle <cbelisle@mandrakesoft.com> 7.2-10mdk
- Added few Requires in postgresql-devel (thx to Michael).
- Updated README.rpm-dist.
- Clean the configure options.
- s/pg_dumpall_new/pg_dumpall/ in mdk-pgdump.sh.
- Change backup rpm scripts to use mdk-pgdump.sh.

* Wed Feb 27 2002 Christian Belisle <cbelisle@mandrakesoft.com> 7.2-9mdk
- s/rh-dump/mdk-dump in README.rpm-dist (thx to Guillaume).

* Wed Feb 27 2002 Christian Belisle <cbelisle@mandrakesoft.com> 7.2-8mdk
- README.rpm -> README.rpm-dist (thx to Olivier).
- Remove find-lang handling.

* Wed Feb 27 2002 Stew Benedict <sbenedict@mandrakesoft.com> 7.2-7mdk
- relax CFLAGS for PPC build - were turned back on for all arch

* Mon Feb 25 2002 Christian Belisle <cbelisle@mandrakesoft.com> 7.2-6mdk
- Add default runlevel in initscript.
- Remove service startup in %%post.

* Fri Feb 22 2002 Christian Belisle <cbelisle@mandrakesoft.com> 7.2-5mdk
- Remove useless .bash_profile rewriting.

* Thu Feb 21 2002 Christian Belisle <cbelisle@mandrakesoft.com> 7.2-4mdk
- Fix typo in python tutorial folder name (postgresql-python).
- postgresql-tk require postgresql-devel.

* Wed Feb 13 2002 Christian Belisle <cbelisle@mandrakesoft.com> 7.2-3mdk
- More spec cleanup to fix db creation-upgrade problems.
- Update README.postgresql.mdk

* Mon Feb 11 2002 Christian Belisle <cbelisle@mandrakesoft.com> 7.2-2mdk
- Fix backups (make a %%pre for each package instead of one for all).
- Spec cleanup pt 1 (next cleanup will fix all the db creation-upgrade pb).
- Add patches and init script from redhat.

* Fri Feb 08 2002 Christian Belisle <cbelisle@mandrakesoft.com> 7.2-1mdk
- 7.2.
- Take patches and initscript from RH.

* Sat Dec 15 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.3-8mdk
- Really fix docs location.

* Sat Dec 15 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.3-7mdk
- Fix docs location.
- Fix bash_profile entries.
- Fix backup feature.

* Thu Dec 06 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.3-6mdk
- libification
- gzip the source (for security check)

* Wed Nov 21 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.3-5mdk
- Fix init script

* Mon Nov 19 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.3-4mdk
- Fix doc location (Guillaume Rousse)
- Remove doc source (Guillaume Rousse)
- Fix init script (Guillaume Rousse)

* Fri Nov 16 2001 Stew Benedict <sbenedict@mandrakesoft.com> 7.1.3-3mdk
- relax CFLAGS for PPC build, just use defaults

* Thu Nov 15 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.3-2mdk
- fix invalid-packager and strange-permissions warning in rpmlint.
- Added a reload entry.

* Mon Oct  1 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.3-1mdk
- 7.1.3.
- Fixed init.d script.

* Thu Sep 13 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-19mdk
- Fixed post-install procedure (initialize ok now).
- Modified README.mdk.

* Tue Sep 11 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-18mdk
- Fixed backup feature when upgrading.

* Tue Sep 11 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-17mdk
- Removed conflict with perl-ldap.

* Tue Sep 11 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-16mdk
- Fixed a library simlink

* Mon Sep 10 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-15mdk
- Added missing files

* Mon Sep 10 2001 David BAUDENS <baudens@mandrakesoft.com> 7.1.2-14mdk
- Fix menu entry for postgresql-tk
- Fix Requires (requires %%version-%%release and not only %%version)

* Sun Sep 09 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-13mdk
- Added documentation in each package.

* Fri Sep 07 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-12mdk
- postgresql-contrib: removed sources.
- added README.mdk for beginners.
- Fixed menu problem.

* Sat Aug  4 2001 Pixel <pixel@mandrakesoft.com> 7.1.2-11mdk
- postgresql-plperl: add require the perl-base used for building 
(the libperl.so auto-require is not enough)

* Thu Aug 02 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-10mdk
- Applied a patch to pgacess (thanks to Digital Wokan)

* Fri Jul 27 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-9mdk
- Restore the enhanced backup feature.

* Fri Jul 27 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-8mdk
- Remove the backup feature.

* Wed Jul 25 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-7mdk
- Backup the database when update.

* Mon Jul 16 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-6mdk
- Fixed the %post command.

* Mon Jul 16 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-5mdk
- Moved all libraries to /usr/lib
- Fixed some typos in the Requires
- Added Prefix support.

* Mon Jul  9 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-4mdk
- s/Copyright/License
- Added the TODO as documentation for the -devel package.
- Removed commas in the Requires.

* Wed Jun 27 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-3mdk
- Fixed Distribution tag.

* Mon Jun 18 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-2mdk
- Fixed few BuildRequires (thanks to Stefan van der Eijk)

* Mon Jun 18 2001 Christian Belisle <cbelisle@mandrakesoft.com> 7.1.2-1mdk
- Updated to 7.1.2
- Removed --pglib to initdb, invalid option now

* Mon Jun 18 2001 Frederic Crozat <fcrozat@mandrakesoft.com> 7.1.1-4mdk
- New office menu structure

* Sat May 19 2001  Daouda Lo <daouda@mandrakesoft.com> 7.1.1-3mdk
- fix files section typos (credits to Christian Zoffoli)

* Thu May 17 2001  Daouda Lo <daouda@mandrakesoft.com> 7.1.1-2mdk
- enhanced init script file. 
- fix buildequires + dependencies

* Mon May  7 2001  Stefan van der Eijk <stefan@eijk.nu> 7.1.1-1mdk
- removed old alpha stuff
- 7.1.1

* Tue May  1 2001  Daouda Lo <daouda@mandrakesoft.com> 7.1-2mdk
- fix typos in pgaccess and postgresql-tcl
- fix --prefix --datadir values.

* Mon Apr 30 2001 Daouda Lo <daouda@mandrakesoft.com> 7.1-1mdk
- release 7.1
- bug fixes, big spec cleanups and lot of enhancements
  o  NOTE: many files that used to be in /usr/lib/pgsql are now in /usr/share/pgsql!
  o  fix buildrequires
  o  Split out the libs into the libs subpackage.
  o  added mdk-pgdump.sh script (adapted to Mandrake)
  o  Updated initscript to use pg_ctl to stop
  o  Updated initscript to initdb and start postmaster with LC_ALL=C to prevent index corruption.
  o  Packaging reorg: added contrib and docs subpackages.
  o  mark odbcinst.ini as a config file
  o  libpq.so changes for maximum compatiblity
  o  fix dangling symlimks (pg_crc.c)
  o  Merged with postgresql official modifications
  o  Fix docs mixup.
  o  rewrote postgresql init script ( use -i tcp/ip connections available -> Thanx to Jerome Martin)
  o  Removed broken and confusing logrotate script. 
  o  strip out -ffastmath -- Considered Harmful.
  o  README.rpm-dist updated.  
- need a dump/restore before upgrading 



* Sun Apr 6 2001 Jean-Michel Dault <jmdault@mandrakesoft.com> 7.0.3-12mdk
- added some BuildRequires and --with-readline so it picks everything up
  in the case the build machine does not have them installed

* Tue Apr 3 2001 Daouda Lo <daouda@mandrakesoft.com> 7.0.3-11mdk
- server build macro .

* Tue Apr 3 2001 Daouda Lo <daouda@mandrakesoft.com> 7.0.3-10mdk
- used server macros in post and preun 

* Tue Apr 3 2001 Daouda Lo <daouda@mandrakesoft.com> 7.0.3-9mdk
- macrozif of python version to allow build on 7.2 boxes (thanx Ian )

* Thu Dec  28 2000  Daouda Lo <daouda@mandrakesoft.com> 7.0.3-8mdk
- add missing include files (for GIST) .

* Wed Dec  6 2000  Daouda Lo <daouda@mandrakesoft.com> 7.0.3-7mdk
- fix PGACCESS_HOME variable (close #1463)
- add noreplace to conf files
- add longtitle to pgsql-tk menu

* Mon Dec  4 2000  Daouda Lo <daouda@mandrakesoft.com> 7.0.3-6mdk
- many changes from official spec
- patch for i64  
- add some missing include dir
- libtoolized


* Wed Nov 29 2000 Daouda Lo <daouda@mandrakesoft.com> 7.0.3-5mdk
- fix gcc flags (don't use both -ffast-math and Optmisations) 
  thx Ian C. Sison
- add perl-devel in Builrequires section.
- avoid building with hardcoded number version inside spec --> use 
  define tag .
 
* Wed Nov 15 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 7.0.3-4mdk
- fix dependency with /usr/local/bin/python.
- short-circuit compliant (tm.)

* Fri Nov 10 2000 David BAUDENS <baudens@mandrakesoft.com> 7.0.3-3mdk
- Fix build for PPC
- Use %%make macros

* Fri Nov 10 2000 Daouda Lo <daouda@mandrakesoft.com> 7.0.3-2mdk
- add %postun to package postgres-tk
- correct postgres-tk menu entry  
- added caution for upgrade from 7.0.2 to 7.0.3
- make /etc/logtrotate.d/postgres 0644 instead of 0700 

* Thu Nov 09 2000 Daouda Lo <daouda@mandrakesoft.com> 7.0.3-1mdk
- new release.
- more macros .
- regenerate patch1.
- upgrade source files to new version

* Sun Oct 22 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 7.0.2-6mdk
- create menu for pgaccess [Bug #425]
- modify pgaccess to it does not require libpgtcl.so, but libpgtcl.so.2
- remove postgres group when uninstalling [Bug 921]

* Sat Sep 16 2000 Stefan van der Eijk <s.vandereijk@chello.nl> 7.0.2-5mdk
- Remove *.bs before creating filelist

* Sat Sep 02 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 7.0.2-4mdk
- create database "postgres" if it does not exist already
- if not during Drak install, start postgresql
- copied files from /etc/skel in /var/lib/pgsql
- add PGDATA in /etc/profile 

* Mon Aug 07 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 7.0.2-3mdk
- modified initscripts so that, at upgrade, the user is pointed at the
  right directory for a Howto on how to convert the database from the
  old format.

* Mon Aug 07 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 7.0.2-2mdk
- cleaned package for rpmlint

* Sun Aug 06 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 7.0.2-1mdk
- Merged with RPM from postgresql.com
- Macroized package

* Mon Jun 12 2000 Lamar Owen <lamar.owen@wgcr.org>
- 7.0.2-2
- Corrected misreporting of version.
- Corrected for non-root build clean script.

* Mon Jun 05 2000 Lamar Owen <lamar.owen@wgcr.org>
- 7.0.2 
- Postgresql-dump manpage to man1, and to separate source file to facilitate
-- _mandir macro expansion correctness.
- NOTE: The PostScript documentation is no longer being included in the
-- PostgreSQL tarball.  If demand is such, I will pull together a
-- postgresql-ps-docs subpackage or pull in the PostScript docs into the
-- main package.
- RPM patchset has release number, now, to prevent patchfile confusion :-(.


* Sat Jun 03 2000 Lamar Owen <lamar.owen@wgcr.org>
- Incorporate most of Trond's changes (reenabled the alpha
-- patches, as it was a packaging error on my part).
- Trimmed changelog history to Version 7.0beta1 on. To see the
-- previous changelog, grab the 6.5.3 RPM from RedHat 6.2 and pull the spec.
- Rev to 7.0.1 (which incorporates the syslog patch, which has
-- been removed from rpm-pgsql-7.0.1-1.patch)

* Fri May 26 2000 Trond Eivind Glomsrød <teg@redhat.com>
- disable the alpha patch, as it doesn't apply cleanly
- removed distribution, packager, vendor
- renamed spec file
- don't build pl-perl
- use %%{_mandir}
- now includes vacuumdb.1*

* Thu May 25 2000 Lamar Owen <lamar.owen@wgcr.org>
- 7.0-3
- Incorporated Tatsuo's syslog segmentation patches
- Incorporated some of Trond's changes (see below)
-- Fixed some Perl 5.6 oddness in Rawhide
- Incorporated some of Karl's changes (see below)
-- PL/Perl should now work.
- Fixed missing /usr/bin/pg_passwd.

* Mon May 22 2000 Karl DeBisschop <kdebisschop@infoplease.com>
- 7.0-2.1
- make plperl module (works for linux i386, your guess for other platforms)
- use "make COPT=" because postgreSQL configusre script ignores CFLAGS

* Sat May 20 2000 Lamar Owen <lamar.owen@wgcr.org>
- 7.0-2
- pg_options default values changed.
- SPI headers (again!) fixed in a permanent manner  -- hopefully!
- Alpha patches!

* Tue May 16 2000 Frederic Lepied <flepied@mandrakesoft.com> 6.5.3-2mdk
- fix build for perl 5.6.

* Tue May 16 2000 Trond Eivind Glomsrød <teg@redhat.com>
- changed buildroot, removed packager, vendor, distribution
-- [Left all but buildroot as-is for PostgreSQL.org RPMS. LRO]
- don't strip in package [strip in PostgreSQL.org RPMS]
- fix perl weirdnesses (man page in bad location, remove 
  perllocal.pod from file list)

* Mon May 15 2000 Lamar Owen <lamar.owen@wgcr.org>
- 7.0 final -1
- Man pages restructured
- Changed README.rpm notices about BETA
- incorporated minor changes from testing
- still no 7.0 final alpha patches -- for -2 or -3, I guess.
- 7.0 JDBC jars!

* Sat May 06 2000 Lamar Owen <lamar.owen@wgcr.org>
- 7.0RC5-0.5
- UserID of 26 to conform to RedHat Standard, instead of 40.  This only
-- is for new installs -- upgrades will use what was already there.
- Waiting on built jar's of JDBC.  If none are forthcoming by release,
-- I'm going to have to bite the bullet and install the jdk....

* Mon May 01 2000 Lamar Owen <lamar.owen@wgcr.org>
- 7.0RC2-0.5
- Fixed /usr/src/redhat/BUILD path to $RPM_BUILD_DIR for portability
-- and so that RPM's can be built by non-root.
- Minor update to README.rpm

* Tue Apr 18 2000 Lamar Owen <lamar.owen@wgcr.org>
- 0.6
- Fixed patchset: wasn't patching pgaccess or -i in postmaster.opts.default
- minor update to README.rpm

* Mon Apr 17 2000 Lamar Owen <lamar.owen@wgcr.org>
- 7.0RC1-0.5 (release candidate 1.)
- Fixed SPI header directories' permisssions.
- Removed packaging of Alpha patches until Ryan releases RC1-tested set.

* Mon Apr 10 2000 Lamar Owen <lamar.owen@wgcr.org>
- 7.0beta5-0.1 (released instead of the release candidate)

* Sat Apr 08 2000 Lamar Owen <lamar.owen@wgcr.org>
- 7.0beta4-0.2 (pre-release-candidate CVS checkout)
- Alpha patches!
- pg_options.sample

* Sun Apr 2 2000 John Buswell <johnb@mandrakesoft.com> 6.5.3-1mdk
- 6.5.3
- Sparc64 patch added
- spec-helper
- fixed groups

* Fri Mar 24 2000 Lamar Owen <lamar.owen@wgcr.org>
- 7.0beta3-0.1

* Mon Feb 28 2000 Lamar Owen <lamar.owen@wgcr.org>
- Release 0.3
- Fixed stderr redir problem in init script
- Init script now uses pg_ctl to start postmaster
- Packaged inital pg_options for good logging
- built with timestamped logging.

* Tue Feb 22 2000 Lamar Owen <lamar.owen@wgcr.org>
- Initial 7.0beta1 build
- Moved PGDATA to /var/lib/pgsql/data
- First stab at logging and logrotate functionality -- test carefully!
- -tcl subpackage split -- tcl client and pltcl lang separated from
-- the Tk stuff.  PgAccess and the tk client are now in the -tk subpackage.
- No patches for Alpha as yet.