Summary: The Postgres SQL database package. Name: postgresql Version: 6.5.1 Release: 2 Copyright: BSD Group: Applications/Databases Source0: ftp://ftp.postgresql.org/pub/postgresql-%{version}.tar.gz Source1: ftp://www.flex.ro/pub/pgaccess/pgaccess-0.96.tar.gz Source2: http://www.retep.org.uk/postgres/jdbc6.5-1.1.jar Source3: postgresql.init Source4: pgsql-Database-HOWTO-html.tar.gz Buildroot: /var/tmp/pgsql-root Prefix: /usr Prereq: /sbin/chkconfig /sbin/ldconfig /usr/sbin/useradd Vendor: The PostgreSQL Global Development Group Packager: Thomas Lockhart Url: http://www.postgresql.org/ ExcludeArch: alpha armv4l Conflicts: postgresql-clients %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). postgresql includes the client programs and client libraries that you'll need to access a PostgreSQL database management system server. This package contains the client libraries for C, and C++, as well as command-line utilities for managing PostgreSQL databases on a remote server. If you just want to connect to an existing remote PostgreSQL server, this package is all you need. You should install postgresql if you're installing postgresql-server. %package server Summary: The programs needed for a PostgreSQL server. Group: Applications/Databases Requires: postgresql = %{version} %description server postgresql-server 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 if you want to create and maintain your own PostgreSQL databases and/or your own PostgreSQL server. %package devel Summary: PostgreSQL development header files and libraries. Group: Development/Libraries %description devel This package contains the header files and libraries needed to compile C or C++ applications which will directly interact with a PostgreSQL server. It include the ecpg Embedded C Postgres preprocessor. Install this package if you want to develop applications which will interact with a PostgreSQL server. %package tcl Summary: The tcl-based client programs needed for accessing a PostgreSQL server. Group: Applications/Databases Requires: tcl >= 8.0, tk >= 8.0 %description tcl postgresql-tcl includes the tcl-based client programs and client libraries that you'll need to access a PostgreSQL database management system server. This package contains the tcl client libraries, as well as pgaccess, a wish-based utility for manipulating PostgreSQL databases. %package odbc Summary: The ODBC driver needed for accessing a PostgreSQL server. Group: Applications/Databases %description odbc Postgresql-odbc includes the odbc driver and sample configuration files that you'll need to access a PostgreSQL database management system server. %package perl Summary: The perl-based client programs needed for accessing a PostgreSQL server. Group: Applications/Databases Requires: perl >= 5.004-4 %description perl postgresql-perl includes the perl-based client programs and client libraries that you'll need to access a PostgreSQL database management system server. %package python Summary: The python-based client programs needed for accessing a PostgreSQL server. Group: Applications/Databases Requires: python >= 1.5 %description python postgresql-python includes the python-based client programs and client libraries that you'll need to access a PostgreSQL database management system server. %package jdbc Summary: The java-based client programs needed for accessing a PostgreSQL server. Group: Applications/Databases %description jdbc postgresql-jdbc includes the jar file that you'll need to access a PostgreSQL database management system server. %prep %setup -q cd src/bin gzip -dc $RPM_SOURCE_DIR/pgaccess-0.96.tar.gz | tar -xvvf - %build pushd src CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr \ --enable-hba --enable-locale \ --with-perl \ --with-tcl --with-tk --with-x \ --with-odbc --with-java \ --with-python make all pushd interfaces/python cp /usr/lib/python1.5/config/Makefile.pre.in . echo *shared* > Setup echo _pg pgmodule.c -I../../include -I../libpq -L../libpq -lpq -lcrypt >> Setup make -f Makefile.pre.in boot make popd popd make all PGDOCS=unpacked -C doc %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/{include/pgsql,lib,bin} mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/site_perl/%{buildarch}-linux/auto/Pg make POSTGRESDIR=$RPM_BUILD_ROOT/usr PREFIX=$RPM_BUILD_ROOT/usr -C src install make POSTGRESDIR=$RPM_BUILD_ROOT/usr PREFIX=$RPM_BUILD_ROOT/usr -C src/man install make POSTGRESDIR=$RPM_BUILD_ROOT/usr PREFIX=$RPM_BUILD_ROOT/usr -C src/interfaces/perl5 install # Get rid of the packing list generated by the perl Makefile, and build my own... find $RPM_BUILD_ROOT/usr/lib/perl5 -name .packlist -exec rm -f {} \; find $RPM_BUILD_ROOT/usr/lib/perl5 -type f -print | \ sed -e "s|$RPM_BUILD_ROOT/|/|g" > perlfiles.list find $RPM_BUILD_ROOT/usr/lib/perl5 -type d -name Pg -print | \ sed -e "s|$RPM_BUILD_ROOT/|%dir /|g" >> perlfiles.list make -C doc # Move all includes beneath /usr/include/pgsql. pushd $RPM_BUILD_ROOT/usr/include rm -rf include for f in *.h access commands executor lib libpq libpq++ port utils ; do mv $f pgsql done popd # Move all templates/examples beneath /usr/lib/pgsql pushd $RPM_BUILD_ROOT/usr/lib mkdir -p pgsql mv *source *sample pgsql popd # TCL/TK install -m 0755 src/bin/pgaccess/pgaccess.tcl $RPM_BUILD_ROOT/usr/bin/pgaccess # Perl # No need to do anything right now. But later, we will try building everything # on the target machine to use the architecture-specific installation features # in the perl installation. #pushd src/interfaces/perl5 #mkdir -p $RPM_BUILD_ROOT/usr/lib/pgsql/perl5 #cp Pg.pm $RPM_BUILD_ROOT/usr/lib/pgsql/perl5 #pushd blib/arch/auto/Pg #cp Pg.so Pg.bs $RPM_BUILD_ROOT/usr/lib/pgsql/perl5 #popd #popd # 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/usr/lib/python1.5/site-packages install -m 644 _pgmodule.so *.py $RPM_BUILD_ROOT/usr/lib/python1.5/site-packages/ popd # Java/JDBC # We know that JDK1.2 is pre-beta at this time, so just install the JDK1.1-compatible driver. # The user will have to set a CLASSPATH to find it here, but not sure where else to put it... install -m 755 $RPM_SOURCE_DIR/jdbc6.5-1.1.jar $RPM_BUILD_ROOT/usr/lib/pgsql chmod 644 $RPM_BUILD_ROOT/usr/man/*/* install -d $RPM_BUILD_ROOT/etc/rc.d/init.d install -m 755 $RPM_SOURCE_DIR/postgresql.init $RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql for I in 3 5; do install -d $RPM_BUILD_ROOT/etc/rc.d/rc$I.d pushd $RPM_BUILD_ROOT/etc/rc.d/rc$I.d ln -s ../init.d/postgresql S99postgresql popd done ## Create sample database ## Disabled because an in-place upgrade using rpm only is probably not the right thing to do. ## Also, it is a PITA; should let the user decide how to coordinate dump and reload if necessary. mkdir -p $RPM_BUILD_ROOT/var/lib/pgsql #PATH=/usr/sbin:$PATH useradd -M -r -d /var/lib/pgsql -s /bin/bash \ # -c "PostgreSQL Server" postgres || : #chown -R postgres.postgres $RPM_BUILD_ROOT/var/lib/pgsql #export PATH=$PATH:$RPM_BUILD_ROOT/usr/bin #[ ! -f $RPM_BUILD_ROOT/usr/lib/libpq.so.1 ] && ln -sf libpq.so $RPM_BUILD_ROOT/usr/lib/libpq.so.1 #unset ENV || : #su postgres -c "LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/lib \ # $RPM_BUILD_ROOT/usr/bin/initdb --pgdata=$RPM_BUILD_ROOT/var/lib/pgsql \ # --pglib=$RPM_BUILD_ROOT/usr/lib/pgsql" #[ -L $RPM_BUILD_ROOT/usr/lib/libpq.so.1 ] && rm -f $RPM_BUILD_ROOT/usr/lib/libpq.so.1 ## this was a good one #chmod 640 $RPM_BUILD_ROOT/var/lib/pgsql/pg_pwd mkdir -p howto tar xzf $RPM_SOURCE_DIR/pgsql-Database-HOWTO-html.tar.gz -C howto mkdir -p pgaccess cp src/bin/pgaccess/README pgaccess cp src/bin/pgaccess/*.html pgaccess cp src/bin/pgaccess/*.sql pgaccess # Strip 'em all strip $RPM_BUILD_ROOT/usr/bin/* || : %pre server useradd -M -o -r -d /var/lib/pgsql -s /bin/bash \ -c "PostgreSQL Server" postgres >/dev/null 2>&1 || : %post -p /sbin/ldconfig %post -p /sbin/ldconfig server %post perl # We *should* use the architecture-specific area to hold our perl interface. # For now, we will use the architecture-neutral areas, and prebuild everything. #PerlTarget=`perl -MConfig -e 'print $Config{archlib}'` #pushd /usr/lib/pgsql/perl5 #mv Pg.pm $PerlTarget/ #mv Pg.so Pg.bs $PerlTarget/auto/Pg/ #popd %post -p /sbin/ldconfig odbc %post -p /sbin/ldconfig tcl %preun if [ $1 = 0 ] ; then chkconfig --del postgresql fi %postun -p /sbin/ldconfig %postun server /sbin/ldconfig if [ $1 = 0 ] ; then userdel postgres >/dev/null 2>&1 || : fi %postun -p /sbin/ldconfig odbc %postun -p /sbin/ldconfig tcl %clean rm -rf $RPM_BUILD_ROOT rm -f perlfiles.list rm -rf howto %files %defattr(-,root,root) %doc doc/FAQ doc/FAQ_Linux doc/README* %doc COPYRIGHT README HISTORY doc/bug.template %doc contrib doc/unpacked/* %doc doc/*.ps.gz %doc howto %doc pgaccess %attr(755,root,root) /usr/lib/*.a %attr(755,root,root) /usr/lib/libpq.so* %attr(755,root,root) /usr/lib/libecpg.so* %attr(755,root,root) /usr/lib/libpq++.so* /usr/man/manl/* /usr/bin/createdb /usr/bin/createuser /usr/bin/destroydb /usr/bin/destroyuser /usr/bin/pg_dump /usr/bin/pg_dumpall /usr/bin/pg_id /usr/bin/psql /usr/man/man1/createdb.1 /usr/man/man1/createuser.1 /usr/man/man1/destroydb.1 /usr/man/man1/destroyuser.1 /usr/man/man1/pg_dump.1 /usr/man/man1/pg_dumpall.1 /usr/man/man1/psql.1 /usr/man/man1/vacuumdb.1 %files server %defattr(-,root,root) %config /etc/rc.d/* %attr(755,root,root) /usr/lib/plpgsql.so* %attr(755,root,root) /usr/lib/pltcl.so* /usr/man/man5/* /usr/bin/cleardbdir /usr/bin/initdb /usr/bin/initlocation /usr/bin/pg_passwd /usr/bin/pg_version /usr/bin/postgres /usr/bin/postmaster /usr/man/man1/cleardbdir.1 /usr/man/man1/initdb.1 /usr/man/man1/initlocation.1 /usr/man/man1/ipcclean.1 /usr/man/man1/pg_passwd.1 #/usr/man/man1/pgadmin.1 /usr/man/man1/postgres.1 /usr/man/man1/postmaster.1 %attr(-,postgres,postgres) %dir /var/lib/pgsql %files devel %defattr(-,root,root) /usr/lib/pgsql /usr/include/pgsql /usr/man/man3/* /usr/bin/ecpg /usr/man/man1/ecpg.1 %files tcl %defattr(-,root,root) %attr(755,root,root) /usr/lib/libpgtcl.so* /usr/man/man1/pgaccess.1 #/usr/man/man1/pgtclsh.1 #/usr/man/man1/pgtksh.1 /usr/bin/pgaccess /usr/bin/pgtclsh /usr/bin/pgtksh %files odbc %defattr(-,root,root) %attr(755,root,root) /usr/lib/libpsqlodbc.so* %files -f perlfiles.list perl %dir /usr/lib/perl5/site_perl/%{buildarch}-linux/auto %files python %defattr(-,root,root) /usr/lib/python1.5/site-packages/_pgmodule.so /usr/lib/python1.5/site-packages/*.py %files jdbc %defattr(-,root,root) /usr/lib/pgsql/jdbc6.5-1.1.jar %changelog * Tue Jul 27 1999 Thomas Lockhart - version 6.5.1 * Sat Jun 19 1999 Thomas Lockhart - deprecate clients rpm, and define a server rpm for the backend - version 6.5 - updated pgaccess to version 0.96 - build ODBC interface library - split tcl and ODBC packages into separate binary rpms * Sat Apr 17 1999 Jeff Johnson - exclude alpha for Red Hat 6.0. * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 2) * Wed Feb 03 1999 Cristian Gafton - version 6.4.2 - get rid of the -data package (shipping it was a BAD idea) * Sat Oct 10 1998 Cristian Gafton - strip all binaries - use defattr in all packages - updated pgaccess to version 0.90 - /var/lib/pgsql/pg_pwd should not be 666 * Sun Jun 21 1998 Jeff Johnson - create /usr/lib/pgsql (like /usr/include/pgsql) - resurrect libpq++.so* - fix name problem in startup-script (problem #533) * Fri Jun 19 1998 Jeff Johnson - configure had "--prefix=$RPM_BUILD_ROOT/usr" - move all include files below /usr/include/pgsql. - resurrect perl client file lists. * Tue May 05 1998 Prospector System - translations modified for de, fr, tr * Tue May 05 1998 Cristian Gafton - build on alpha * Sat May 02 1998 Cristian Gafton - enhanced initscript * Tue Apr 21 1998 Cristian Gafton - finally v6.3.2 is here ! * Wed Apr 15 1998 Cristian Gafton - added the include files in the devel package * Wed Apr 01 1998 Cristian Gafton - finally managed to get a patch for 6.3.1 to make it install corectly. Boy, what a mess ! ;-( * Tue Mar 03 1998 Cristian Gafton - upgraded tp 6.3 release * Sat Feb 28 1998 Cristian Gafton - upgraded to the latest snapshot - splitted yet one more subpackage: clients * Tue Jan 20 1998 Cristian Gafton - the installed devel-library is no longer stripped (duh!) - added the 7 patches found on the ftp.postgresql.org site - corrected the -rh patch to patch configure.in rather than configure; we now use autoconf - added a patch to fix the broken psort function - build TCL and C++ libraries as well - updated pgaccess to version 0.76 * Thu Oct 23 1997 Cristian Gafton - cleaned up the spec file for version 6.2.1 - splited devel subpackage - added chkconfig support in %preun and %post - added optional data package * Mon Oct 13 1997 Elliot Lee 6.2-3 - Fixed lots of bung-ups in the spec file, made it FSSTND compliant, etc. - Removed jdbc package, jdk isn't stable yet as far as what goes where. - Updated to v 6.2.1 * Thu Oct 9 1997 10:58:14 dan - on pre-installation script now the `data' dir is renamed to `data.rpmorig' (no more wild deletions!). - added `postgresql-jdbc' sub-package. - postgresql.sh script: defined function `add_to_path()' and changed the location of postgresql.jar in the CLASSPATH. * Sat Oct 4 1997 10:27:43 dan - updated to version 6.2. - added auto installation's scripts (pre, post, preun, postun)