[csw-devel] SF.net SVN: gar:[2567] csw/mgar/pkg

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Fri Dec 12 22:15:11 CET 2008


Revision: 2567
          http://gar.svn.sourceforge.net/gar/?rev=2567&view=rev
Author:   dmichelsen
Date:     2008-12-12 21:15:09 +0000 (Fri, 12 Dec 2008)

Log Message:
-----------
postgresql: Make stub package with legacy build description from leaving maintainer

Added Paths:
-----------
    csw/mgar/pkg/postgresql/
    csw/mgar/pkg/postgresql/branches/
    csw/mgar/pkg/postgresql/tags/
    csw/mgar/pkg/postgresql/trunk/
    csw/mgar/pkg/postgresql/trunk/Makefile
    csw/mgar/pkg/postgresql/trunk/files/
    csw/mgar/pkg/postgresql/trunk/legacy/
    csw/mgar/pkg/postgresql/trunk/legacy/README
    csw/mgar/pkg/postgresql/trunk/legacy/libpq/
    csw/mgar/pkg/postgresql/trunk/legacy/libpq/checkinstall
    csw/mgar/pkg/postgresql/trunk/legacy/libpq/compat.sparc.tgz
    csw/mgar/pkg/postgresql/trunk/legacy/libpq/compat.x86.tgz
    csw/mgar/pkg/postgresql/trunk/legacy/libpq/copyright
    csw/mgar/pkg/postgresql/trunk/legacy/libpq/depend
    csw/mgar/pkg/postgresql/trunk/legacy/libpq/pkginfo
    csw/mgar/pkg/postgresql/trunk/legacy/libpq/prototype.append
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/BUILD.notes
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/README-CSW.txt.sparc
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/README-CSW.txt.x86
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/build.sparc
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/build.x86
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/copyright
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/cswpostgres.sparc
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/cswpostgres.x86
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/depend
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/libpqfiles.sparc
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/libpqfiles.x86
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/pkginfo
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postgresql.conf.sparc
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postgresql.conf.x86
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postinstall
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/preremove
    csw/mgar/pkg/postgresql/trunk/legacy/postgresql/prototype.append
    csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/
    csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/copyright
    csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/depend
    csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/pkginfo
    csw/mgar/pkg/postgresql/trunk/legacy/scripts/
    csw/mgar/pkg/postgresql/trunk/legacy/scripts/env


Property changes on: csw/mgar/pkg/postgresql/trunk
___________________________________________________________________
Added: svn:ignore
   + cookies
download
work


Added: svn:externals
   + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v1


Added: csw/mgar/pkg/postgresql/trunk/Makefile
===================================================================
--- csw/mgar/pkg/postgresql/trunk/Makefile	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/Makefile	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,16 @@
+GARNAME = package
+GARVERSION = 1.0
+CATEGORIES = category
+
+DESCRIPTION = Brief description
+define BLURB
+  Long description
+endef
+
+MASTER_SITES = 
+DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
+DISTFILES += $(call admfiles,CSWpackage,)
+
+CONFIGURE_ARGS = $(DIRPATHS)
+
+include gar/category.mk

Added: csw/mgar/pkg/postgresql/trunk/legacy/README
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/README	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/README	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,37 @@
+Here are my postgresql scripts.
+
+Horrible and ugly, I know :(
+
+All you should need to do is unpack this in a ~/pkgs/ directory, tweak
+a few things, and run. My standard was to have my home directory set
+up like :
+
+pkgs/<packagename> for all build scripts, copyright, etc.
+build-<hostname> for each build host.
+
+And source under /export/medusa/src.
+
+So, on running these, you'd end up with ~/build-<hostname>/postgresql-8.3.3.
+
+The scripts then move parts of the postgresql install into different
+staging directories (and, in the case of libpq, unpack a
+"compatibility" tarball) and then package them up in to the
+appropriate ~/pkgs/<packagename> directories. The compat tarballs
+could possibly be removed if everyone relinks their packages when
+needed. It's a bit of a pain when a new upstream major version comes
+out and you then have to include the previous libraries in...
+
+So you'll end up with packages under postgresql, postgresqlcontrib, and libpq.
+
+For some reason, the last time I tried this, I had to manually go into
+the staging directory for postgresqlcontrib and run "createpkg -r ." -
+not sure why this didn't work automatically.
+
+Like I say - these are pretty horrible and ugly, particularly the
+sparc build script which produces the combined 32/64-bit package. But
+they worked for years, so I never got round to moving them into GAR. I
+hope these work for you - even though I've left the project, please do
+contact me if you have any questions at all about them.
+
+-Mark
+

Added: csw/mgar/pkg/postgresql/trunk/legacy/libpq/checkinstall
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/libpq/checkinstall	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/libpq/checkinstall	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# Check if the /opt/csw/libpq.so file exists, and if it is  part
+# of the CSWpostgresql package. If so, it's an old version of
+# PostgreSQL and we can't continue...
+
+if [ -f "/opt/csw/lib/libpq.so" ]; then
+  if [ "`/usr/sbin/pkgchk -l -p /opt/csw/lib/libpq.so | grep CSWpostgresql 2> /dev/null`" ]; then
+  echo "*** WARNING ***"
+  echo "  The installation has been aborted."
+  echo " "
+  echo "  From version 7.3.5 onwards, the PostgreSQL package from blastwave.org"
+  echo "  has been split into two parts. This is the 'libpq' package, which "
+  echo "  contains core libraries and headers needed for PostgreSQL development."
+  echo "  It is also needed by the 'postgresql' package, which contains the server"
+  echo "  and clients."
+  echo " "
+  echo "  It appears that you are attempting to upgrade an older release of PostgreSQL."
+  echo "  You will need to manually stop the server and uninstall the CSWpostgresql "
+  echo "  package before trying again  - as the libpq package will otherwise conflict"
+  echo "  with the currently installed postgresql package. "
+  echo " "
+  echo "  You can do this with the following commands (as root) :"
+  echo " "
+  echo "  /etc/init.d/cswpostgres stop"
+  echo "  pkgrm CSWpostgresql"
+  echo " "
+  echo "  Uninstalling the old version in this way will NOT affect your databases."
+  echo "*** WARNING ***"
+
+  exit 1
+
+  fi
+
+fi
+


Property changes on: csw/mgar/pkg/postgresql/trunk/legacy/libpq/checkinstall
___________________________________________________________________
Added: svn:executable
   + *

Added: csw/mgar/pkg/postgresql/trunk/legacy/libpq/compat.sparc.tgz
===================================================================
(Binary files differ)


Property changes on: csw/mgar/pkg/postgresql/trunk/legacy/libpq/compat.sparc.tgz
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: csw/mgar/pkg/postgresql/trunk/legacy/libpq/compat.x86.tgz
===================================================================
(Binary files differ)


Property changes on: csw/mgar/pkg/postgresql/trunk/legacy/libpq/compat.x86.tgz
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: csw/mgar/pkg/postgresql/trunk/legacy/libpq/copyright
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/libpq/copyright	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/libpq/copyright	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,23 @@
+PostgreSQL Database Management System
+(formerly known as Postgres, then as Postgres95)
+
+Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
+
+Portions Copyright (c) 1994, The Regents of the University of California
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose, without fee, and without a written agreement
+is hereby granted, provided that the above copyright notice and this
+paragraph and the following two paragraphs appear in all copies.
+
+IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
+DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
+LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
+DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
+PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

Added: csw/mgar/pkg/postgresql/trunk/legacy/libpq/depend
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/libpq/depend	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/libpq/depend	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,5 @@
+P       CSWreadline
+P       CSWosslrt
+P       CSWzlib
+P	CSWisaexec
+

Added: csw/mgar/pkg/postgresql/trunk/legacy/libpq/pkginfo
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/libpq/pkginfo	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/libpq/pkginfo	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,8 @@
+PKG=CSWlibpq
+NAME=libpq - libraries needed by postgresql server and clients 
+VERSION=8.3.3,REV=2008.06.26
+CATEGORY=application
+VENDOR=http://www.postgresql.org/  packaged for CSW by Mark Round
+HOTLINE=http://www.blastwave.org/bugtrack/
+EMAIL=mark at blastwave.org
+

Added: csw/mgar/pkg/postgresql/trunk/legacy/libpq/prototype.append
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/libpq/prototype.append	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/libpq/prototype.append	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,3 @@
+s none /opt/csw/postgresql/lib/64=sparcv9
+s none /opt/csw/postgresql/lib/32=sparcv8
+s none /opt/csw/postgresql/lib/sparcv8=.

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/BUILD.notes
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/BUILD.notes	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/BUILD.notes	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,5 @@
+All you should need to do is tweak the version numbers in the build scripts,
+and pkginfo files. 
+
+You'll also need to update the compat tarballs if you're bumping a major version,
+otherwise old packages will break if they haven't been re-linked.

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/README-CSW.txt.sparc
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/README-CSW.txt.sparc	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/README-CSW.txt.sparc	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,103 @@
+*** Important information - please make sure you read this ! ***
+
+*** Migrating from older versions ***
+
+If you have upgraded from a previous 8.0, 8.1 or 8.2 version of PostgreSQL, 
+your databases will NOT work on this 8.3.x version. Before upgrading, you 
+should dump your databases using the old utilities. You can then create a
+new data directory using this 8.3.x package, and import your dumps. 
+See the "64-bit support" section below for pointers to documentation on t
+his.
+
+Another point to note is that the location of the PostgreSQL install has 
+changed. Previous 7.3.x packages used /opt/csw as the base - this package 
+uses /opt/csw/postgresql. You will need to add /opt/csw/postgresql/bin to your
+$PATH, and any scripts you have written using the old locations will have to
+be changed.
+
+
+*** User configuration of server options ***
+
+Configuration of the server start-up options is now done through a user-
+configuration file, /opt/csw/etc/postgresql.conf. A sample template has been
+provided for you at /opt/csw/etc/postgresql.conf.csw. If you want to change
+any of the server options discussed below, make a copy of this file to 
+/opt/csw/etc/postgresql.conf and edit it accordingly.
+
+If you cannot modify this file (for instance, you are mounting /opt/csw
+from a read-only NFS server), you can use /etc/opt/csw/postgresql.conf 
+instead, and it will take precedence over /opt/csw/etc/postgresql.conf.
+
+*** Networking ***
+
+By default, the cswpostgres init script will start the server up listening on
+localhost only. If you want to allow other hosts on your network to connect, you
+will need to add "-o -i" to the value of SERVEROPTS in the user configuration
+file and restart your server. The included template has the line already
+entered, you just need to uncomment it (remove the leading #).
+
+Once this is done, PostgreSQL will now bind to all network interfaces and
+listen for connections. You will still need to configure which hosts are allowed
+access by modifying the pg_hba.conf file in your data directory - read the manual
+for more information on this.
+
+*** 64-bit support ***
+
+The SPARC packages have been built with 64-bit support, but by default, the
+32-bit version of the server will be run. If you need the 64-bit version,
+edit the user configuration file and change the values of PGINIT and PGCTL
+accordingly.
+
+It is important to note that the 64-bit server WILL NOT WORK with databases
+created with the 32-bit version, and vice versa. You will get an error
+message if you attempt this.
+
+In order to migrate your system to the 64-bit server, you will need to dump
+your databases while running the 32-bit client, stop and upgrade the server,
+initialise a new database directory, and import your dumps. For more information
+on this procedure, see the PostgreSQL manual (included with this package),
+chapter 9 - Backup and restore. This is located at :
+
+/opt/csw/postgresql/share/doc/html/backup.html
+
+All other PostgreSQL binaries in /opt/csw/postgresql/bin/ are copies of the 
+'isaexec' wrapper, which will run the appropriate binary for your
+architecture and/or kernel.
+
+*** Starting the server ***
+
+The PostgreSQL database runs under the user 'postgres' - this has been created 
+for you by the installation script.
+
+The default PostgreSQL data directory is /opt/csw/var/pgdata. As this does not 
+exist, you will need to create it yourself before the database will start.
+You can change the location of the data directory by altering the user
+configuration file, and modifying the value of PGDATA.
+
+A startup script has been provided for you that handles database initialisation,
+startup and shutdown functions - it is located at /etc/init.d/cswpostgres. You
+should always use this script to start or stop the server, otherwise you may 
+find that you are running the wrong binaries (64-bit instead of 32-bit).
+ 
+It is set to start the database the next time the system enters runlevel 3 - 
+usually, this will be at the next boot. 
+
+To create the data directory, the startup script accepts the "init" argument :
+
+/etc/init.d/cswpostgres init
+
+This will create and initialise the data directory. After this step has been
+completed succesfully, the database can be started with :
+
+/etc/init.d/cswpostgres start
+
+If you get errors relating to shared memory on startup, make sure you have read 
+the section entitled "Manging Kernel Resources" - this is in Chapter 3 of the 
+PostgreSQL HTML Administrator's Guide, located at 
+
+/opt/csw/postgresql/share/doc/html/index.html 
+
+
+Mark Round,
+mark at blastwave.org
+


Property changes on: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/README-CSW.txt.sparc
___________________________________________________________________
Added: svn:executable
   + *

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/README-CSW.txt.x86
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/README-CSW.txt.x86	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/README-CSW.txt.x86	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,82 @@
+*** Important information - please make sure you read this ! ***
+
+*** Migrating from older versions ***
+
+If you have upgraded from a previous 8.0, 8.1 or 8.2 version of PostgreSQL,
+your databases will NOT work on this 8.3.x version. Before upgrading, you
+should dump your databases using the old utilities. You can then create a
+new data directory using this 8.3.x package, and import your dumps.
+
+For more information on this procedure, see the PostgreSQL manual
+(included with this package), chapter 9 - Backup and restore.
+This is located at :
+
+/opt/csw/postgresql/share/doc/html/backup.html
+
+Another point to note is that the location of the PostgreSQL install has
+changed. Previous 7.3.x packages used /opt/csw as the base - this package
+uses /opt/csw/postgresql. You will need to add /opt/csw/postgresql/bin to your
+$PATH, and any scripts you have written using the old locations will have to
+be changed.
+
+*** User configuration of server options ***
+
+Configuration of the server start-up options is now done through a user-
+configuration file, /opt/csw/etc/postgresql.conf. A sample template has been
+provided for you at /opt/csw/etc/postgresql.conf.csw. If you want to change
+any of the server options discussed below, make a copy of this file to
+/opt/csw/etc/postgresql.conf and edit it accordingly.
+
+If you cannot modify this file (for instance, you are mounting /opt/csw
+from a read-only NFS server), you can use /etc/opt/csw/postgresql.conf
+instead, and it will take precedence over /opt/csw/etc/postgresql.conf.
+
+*** Networking ***
+
+By default, the cswpostgres init script will start the server up listening on
+localhost only. If you want to allow other hosts on your network to connect, you
+will need to add "-o -i" to the value of SERVEROPTS in the user configuration
+file and restart your server. The included template has the line already
+entered, you just need to uncomment it (remove the leading #).
+
+Once this is done, PostgreSQL will now bind to all network interfaces and
+listen for connections. You will still need to configure which hosts are allowed
+access by modifying the pg_hba.conf file in your data directory - read the manual
+for more information on this.
+
+*** Starting the server ***
+
+The PostgreSQL database runs under the user 'postgres' - this has been created 
+for you by the installation script.
+
+The default PostgreSQL data directory is /opt/csw/var/pgdata. As this does not
+exist, you will need to create it yourself before the database will start.
+You can change the location of the data directory by altering the user
+configuration file and modifying the value of PGDATA.
+
+A startup script has been provided for you that handles database initialisation,
+startup and shutdown functions - it is located at /etc/init.d/cswpostgres. You
+should always use this script to start or stop the server, otherwise you may 
+find that you are running the wrong binaries (64-bit instead of 32-bit).
+ 
+It is set to start the database the next time the system enters runlevel 3 - 
+usually, this will be at the next boot. 
+
+To create the data directory, the startup script accepts the "init" argument :
+
+/etc/init.d/cswpostgres init
+
+This will create and initialise the data directory. After this step has been
+completed succesfully, the database can be started with :
+
+/etc/init.d/cswpostgres start
+
+If you get errors relating to shared memory on startup, make sure you have read 
+the section entitled "Manging Kernel Resources" - this is in Chapter 3 of the 
+PostgreSQL HTML Administrator's Guide, located at 
+
+/opt/csw/postgresql/share/doc/html/index.html 
+
+
+Mark Round,
+mark at blastwave.org


Property changes on: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/README-CSW.txt.x86
___________________________________________________________________
Added: svn:executable
   + *

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/build.sparc
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/build.sparc	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/build.sparc	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,249 @@
+#!/usr/bin/bash
+
+. ~/pkgs/scripts/env
+
+PACKAGE=postgresql
+VERSION=8.3.3
+HOST=ra
+
+# Override some defaults, as we're installing in /opt/csw/postgresql
+LD_OPTIONS_64="-R/opt/csw/lib/64:/opt/csw/postgresql/lib/sparcv9 -L/opt/csw/lib/64"
+LD_OPTIONS_32="-R/opt/csw/lib:/opt/csw/postgresql/lib -L/opt/csw/lib"
+
+
+TARBALL="postgresql-8.3.3.tar.gz"
+
+## Start
+
+# Delete build dir so we start fresh
+if [ -d $BASE/build-$HOST/$PACKAGE-$VERSION/ ]; then
+        rm -rf $BASE/build-$HOST/$PACKAGE-$VERSION
+fi
+
+# And unpack and change into it
+cd $BASE/build-$HOST
+gtar xzvf $SRC/$TARBALL
+cd $BASE/build-$HOST/$PACKAGE-$VERSION/
+
+
+##
+## 64-bit version
+##
+
+LD_OPTIONS="$LD_OPTIONS_64" CC="$CC_SPARC_64" ./configure --prefix=/opt/csw/postgresql --with-pam --with-openssl --enable-multibyte --with-CXX --with-includes=/opt/csw/include/openssl:/opt/csw/include --bindir=/opt/csw/postgresql/bin/sparcv9 --datadir=/opt/csw/postgresql/share --libexecdir=/opt/csw/postgresql/lib/sparcv9 --libdir=/opt/csw/postgresql/lib/sparcv9
+
+# Bug fix, needed in old versions, maybe not needed now ?
+perl -p -i -e "s/\.seg/\.section/g" src/backend/storage/lmgr/s_lock.c
+
+LD_OPTIONS="$LD_OPTIONS_64" CC="$CC_SPARC_64" gmake
+gmake DESTDIR=$BASE/build-$HOST/postgresql-$VERSION/cswstage install
+
+cd $BASE/build-$HOST/$PACKAGE-$VERSION/
+
+##
+## "Contrib" package
+##
+
+cd contrib
+LD_OPTIONS="$LD_OPTIONS_64" CC="$CC_SPARC_64" gmake
+gmake DESTDIR=$BASE/build-$HOST/postgresql-$VERSION/contribstage install
+
+
+##
+## 32-bit version
+##
+cd $BASE/build-$HOST/$PACKAGE-$VERSION/
+gmake distclean
+
+LD_OPTIONS="$LD_OPTIONS_32" CC="$CC_SPARC_32" ./configure --prefix=/opt/csw/postgresql --with-pam --with-openssl --enable-multibyte --with-CXX --with-includes=/opt/csw/include/openssl:/opt/csw/include --bindir=/opt/csw/postgresql/bin/sparcv8 --datadir=/opt/csw/postgresql/share --libexecdir=/opt/csw/postgresql/lib --libdir=/opt/csw/postgresql/lib
+
+LD_OPTIONS="$LD_OPTIONS_32" CC="$CC_SPARC_32" gmake
+
+gmake DESTDIR=$BASE/build-$HOST/postgresql-$VERSION/cswstage install
+cd $BASE/build-$HOST/$PACKAGE-$VERSION/
+
+##
+## "Contrib" package
+##
+
+cd contrib
+LD_OPTIONS="$LD_OPTIONS_32" CC="$CC_SPARC_32" gmake
+gmake DESTDIR=$BASE/build-$HOST/postgresql-$VERSION/contribstage install
+cd $BASE/build-$HOST/$PACKAGE-$VERSION/
+
+
+##
+## Packaging stuff
+##
+# Clean up according to CSW standards
+cd $BASE/build-$HOST/postgresql-$VERSION/cswstage/opt/csw/postgresql
+[ ! -d share ] && mkdir share
+for dir in man doc info; do
+        [ -d $dir ] && mv $dir share/ && ln -s share/$dir $dir
+done
+
+cd $BASE/build-$HOST/postgresql-$VERSION/contribstage/opt/csw/postgresql
+[ ! -d share ] && mkdir share
+for dir in man doc info; do
+        [ -d $dir ] && mv $dir share/ && ln -s share/$dir $dir
+done
+
+
+##
+## Move libpq to separate staging directory
+## And include compat libraries from older packages
+##
+cd $BASE/build-$HOST/$PACKAGE-$VERSION/
+mkdir -p $BASE/build-$HOST/postgresql-$VERSION/libpqstage/opt/csw/postgresql
+
+# Unpack the compat tarball of old libraries
+gtar -C $BASE/build-$HOST/postgresql-$VERSION/libpqstage -xzvf $BASE/pkgs/libpq/compat.sparc.tgz
+
+cd $BASE/build-$HOST/postgresql-$VERSION/libpqstage/opt/csw/postgresql
+while read file; do
+        [ ! -d "`dirname $file`" ] && mkdir -p "`dirname $file`"
+        mv $BASE/build-$HOST/postgresql-$VERSION/cswstage/opt/csw/postgresql/$file $file
+done < $BASE/pkgs/postgresql/libpqfiles.sparc
+
+cd $BASE/build-$HOST/$PACKAGE-$VERSION/
+
+##
+## Package everything up
+##
+cd $BASE/build-$HOST/postgresql-$VERSION/cswstage
+
+# Make the prototype
+pkgproto . | sed "s/e opt/e \/opt/" | sed "s/$USER $GROUP/root bin/g" > prototype.tmp
+gsed -i "/info\/dir 0644/d" prototype.tmp
+gsed -i "/info=share/d" prototype.tmp
+gsed -i "/man=share/d" prototype.tmp
+gsed -i "/doc=share/d" prototype.tmp
+gsed -i "/opt 0755/d" prototype.tmp
+gsed -i "/prototype.tmp/d" prototype.tmp
+cat $BASE/pkgs/postgresql/prototype.append >> prototype.tmp
+
+# Isaexec wrapper
+cd opt/csw/postgresql/bin 
+for prog in sparcv9/*; do
+	echo "l none /opt/csw/postgresql/bin/`basename $prog`=/opt/csw/bin/isaexec" >> $BASE/build-$HOST/postgresql-$VERSION/cswstage/prototype.tmp
+done
+cd $BASE/build-$HOST/postgresql-$VERSION/cswstage
+
+
+# Copy various files "outside" the package
+
+for file in copyright depend pkginfo preremove postinstall; do
+        cp $BASE/pkgs/postgresql/$file .
+        echo "i $file" >> prototype
+done
+
+cp $BASE/pkgs/postgresql/cswpostgres.sparc cswpostgres
+cp $BASE/pkgs/postgresql/postgresql.conf.sparc postgresql.conf.csw
+cp $BASE/pkgs/postgresql/README-CSW.txt.sparc README-CSW.txt
+
+# Strip binaries
+find . -type f | xargs file | grep ELF | \
+      awk -F: '{print $1}' | xargs strip
+find . -type f | xargs file | grep ELF | \
+      awk -F: '{print $1}' | xargs /usr/ccs/bin/mcs -d
+
+# Make the prototype
+cat prototype.tmp >> prototype
+rm prototype.tmp
+
+# Hack the wonky pgxs file
+/opt/csw/bin/gsed -i -e '/medusa/d' ./opt/csw/postgresql/lib/pgxs/src/Makefile.global
+/opt/csw/bin/gsed -i -e '/medusa/d' ./opt/csw/postgresql/lib/sparcv9/pgxs/src/Makefile.global
+
+# And package!
+createpkg -r .
+gzip *.pkg
+mv *.gz $BASE/pkgs/postgresql/
+
+
+## Package up libpq
+cd $BASE/build-$HOST/postgresql-$VERSION/libpqstage
+
+# Make the prototype
+pkgproto . | sed "s/e opt/e \/opt/" | sed "s/$USER $GROUP/root bin/g" > prototype.tmp
+gsed -i "/info\/dir 0644/d" prototype.tmp
+gsed -i "/info=share/d" prototype.tmp
+gsed -i "/man=share/d" prototype.tmp
+gsed -i "/doc=share/d" prototype.tmp
+gsed -i "/opt 0755/d" prototype.tmp
+gsed -i "/prototype.tmp/d" prototype.tmp
+
+# Isaexec wrapper
+cd opt/csw/postgresql/bin 
+for prog in sparcv9/*; do
+	echo "l none /opt/csw/postgresql/bin/`basename $prog`=/opt/csw/bin/isaexec" >> $BASE/build-$HOST/postgresql-$VERSION/libpqstage/prototype.tmp
+done
+cd $BASE/build-$HOST/postgresql-$VERSION/libpqstage
+
+# Copy various files "outside" the package
+for file in copyright depend pkginfo checkinstall; do
+        cp $BASE/pkgs/libpq/$file .
+        echo "i $file" >> prototype
+done
+
+
+
+# Strip binaries
+find . -type f | xargs file | grep ELF | \
+      awk -F: '{print $1}' | xargs strip
+find . -type f | xargs file | grep ELF | \
+      awk -F: '{print $1}' | xargs /usr/ccs/bin/mcs -d
+
+# Make the prototype
+cat prototype.tmp >> prototype
+rm prototype.tmp
+
+# And build!
+createpkg -r .
+gzip *.pkg
+mv *.gz $BASE/pkgs/libpq/
+
+
+
+## Package up contrib
+
+cd $BASE/build-$HOST/postgresql-$VERSION/contribstage
+
+# Make the prototype
+pkgproto . | sed "s/e opt/e \/opt/" | sed "s/$USER $GROUP/root bin/g" > prototype.tmp
+gsed -i "/info\/dir 0644/d" prototype.tmp
+gsed -i "/info=share/d" prototype.tmp
+gsed -i "/man=share/d" prototype.tmp
+gsed -i "/doc=share/d" prototype.tmp
+gsed -i "/opt 0755/d" prototype.tmp
+gsed -i "/prototype.tmp/d" prototype.tmp
+
+# Isaexec wrapper
+cd opt/csw/postgresql/bin 
+for prog in sparcv9/*; do
+	echo "l none /opt/csw/postgresql/bin/`basename $prog`=/opt/csw/bin/isaexec" >> $BASE/build-$HOST/postgresql-$VERSION/contribstage/prototype.tmp
+done
+cd $BASE/build-$HOST/postgresql-$VERSION/contribstage
+
+
+# Copy various files "outside" the package
+for file in copyright depend pkginfo;  do
+        cp $BASE/pkgs/postgresqlcontrib/$file .
+        echo "i $file" >> prototype
+done
+
+# Strip binaries
+find . -type f | xargs file | grep ELF | \
+      awk -F: '{print $1}' | xargs strip
+find . -type f | xargs file | grep ELF | \
+      awk -F: '{print $1}' | xargs /usr/ccs/bin/mcs -d
+
+# Make the prototype
+cat prototype.tmp >> prototype
+rm prototype.tmp
+
+# And build!
+createpkg -r .
+gzip *.pkg
+mv *.gz $BASE/pkgs/postgresqlcontrib/
+


Property changes on: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/build.sparc
___________________________________________________________________
Added: svn:executable
   + *

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/build.x86
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/build.x86	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/build.x86	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,197 @@
+#!/usr/bin/bash
+. ~/pkgs/scripts/env
+
+PACKAGE=postgresql
+VERSION=8.3.3
+HOST=thor
+
+SRC=/export/medusa/src
+
+# Override some defaults, as we're installing in /opt/csw/postgresql
+LD_OPTIONS_32="-R/opt/csw/lib:/opt/csw/postgresql/lib -L/opt/csw/lib -L/opt/csw/lib/postgresql"
+CC_INTEL_32="cc -O -xarch=386 -xinline=%auto,no%AddAcl"
+
+TARBALL="postgresql-8.3.3.tar.gz"
+
+## Start
+
+# Delete build dir so we start fresh
+if [ -d $BASE/build-$HOST/$PACKAGE-$VERSION/ ]; then
+	rm -rf $BASE/build-$HOST/$PACKAGE-$VERSION
+fi
+
+# And unpack and change into it
+cd $BASE/build-$HOST
+gtar xzvf $SRC/$TARBALL
+cd $BASE/build-$HOST/$PACKAGE-$VERSION/
+
+##
+## 32-bit version
+##
+gmake distclean
+
+LD_OPTIONS="$LD_OPTIONS_32" CC="$CC_INTEL_32" ./configure --prefix=/opt/csw/postgresql --with-pam --with-openssl --enable-multibyte --with-CXX --with-includes=/opt/csw/include/openssl:/opt/csw/include --datadir=/opt/csw/postgresql/share --libexecdir=/opt/csw/postgresql/lib --libdir=/opt/csw/postgresql/lib
+
+LD_OPTIONS="$LD_OPTIONS_32" CC="$CC_INTEL_32" gmake
+gmake DESTDIR=$BASE/build-$HOST/postgresql-$VERSION/cswstage install
+
+cd $BASE/build-$HOST/$PACKAGE-$VERSION/
+
+##
+## "Contrib" package
+##
+
+cd contrib
+LD_OPTIONS="$LD_OPTIONS_32" CC="$CC_INTEL_32" gmake
+gmake DESTDIR=$BASE/build-$HOST/postgresql-$VERSION/contribstage install
+cd $BASE/build-$HOST/$PACKAGE-$VERSION/
+
+
+##
+## Packaging stuff
+##
+# Clean up according to CSW standards
+cd $BASE/build-$HOST/postgresql-$VERSION/cswstage/opt/csw/postgresql
+[ ! -d share ] && mkdir share
+for dir in man doc info; do
+	[ -d $dir ] && mv $dir share/ && ln -s share/$dir $dir
+done
+
+cd $BASE/build-$HOST/postgresql-$VERSION/contribstage/opt/csw/postgresql
+[ ! -d share ] && mkdir share
+for dir in man doc info; do
+        [ -d $dir ] && mv $dir share/ && ln -s share/$dir $dir
+done
+
+
+##
+## Move libpq to separate staging directory
+##
+cd $BASE/build-$HOST/$PACKAGE-$VERSION/
+mkdir -p $BASE/build-$HOST/postgresql-$VERSION/libpqstage/opt/csw/postgresql
+
+# Unpack the compat tarball of old libraries  
+gtar -C $BASE/build-$HOST/postgresql-$VERSION/libpqstage -xzvf $BASE/pkgs/libpq/compat.x86.tgz
+
+cd $BASE/build-$HOST/postgresql-$VERSION/libpqstage/opt/csw/postgresql
+while read file; do
+	[ ! -d "`dirname $file`" ] && mkdir -p "`dirname $file`"
+	mv $BASE/build-$HOST/postgresql-$VERSION/cswstage/opt/csw/postgresql/$file $file
+done < $BASE/pkgs/postgresql/libpqfiles.x86
+
+
+##
+## Package everything up
+##
+
+cd $BASE/build-$HOST/postgresql-$VERSION/cswstage
+
+# Make the prototype
+pkgproto . | sed "s/e opt/e \/opt/" | sed "s/$USER $GROUP/root bin/g" > prototype.tmp
+gsed -i "/info\/dir 0644/d" prototype.tmp
+gsed -i "/info=share/d" prototype.tmp
+gsed -i "/man=share/d" prototype.tmp
+gsed -i "/doc=share/d" prototype.tmp
+gsed -i "/opt 0755/d" prototype.tmp
+gsed -i "/prototype.tmp/d" prototype.tmp
+cat $BASE/pkgs/postgresql/prototype.append >> prototype.tmp
+
+# Copy various files "outside" the package
+
+for file in copyright depend pkginfo preremove postinstall; do
+	cp $BASE/pkgs/postgresql/$file .
+	echo "i $file" >> prototype
+done
+
+cp $BASE/pkgs/postgresql/cswpostgres.x86 cswpostgres
+cp $BASE/pkgs/postgresql/postgresql.conf.x86 postgresql.conf.csw
+cp $BASE/pkgs/postgresql/README-CSW.txt.x86 README-CSW.txt
+
+# Strip binaries
+find . -type f | xargs file | grep ELF | \
+      awk -F: '{print $1}' | xargs strip
+find . -type f | xargs file | grep ELF | \
+      awk -F: '{print $1}' | xargs /usr/ccs/bin/mcs -d
+
+# Make the prototype
+cat prototype.tmp >> prototype
+rm prototype.tmp
+
+# Hack the wonky pgxs file
+/opt/csw/bin/gsed -i -e '/medusa/d' ./opt/csw/postgresql/lib/pgxs/src/Makefile.global
+
+# And package!
+createpkg -r .
+gzip *.pkg
+mv *.gz $BASE/pkgs/postgresql/
+
+
+## Package up libpq
+cd $BASE/build-$HOST/postgresql-$VERSION/libpqstage
+
+# Make the prototype
+pkgproto . | sed "s/e opt/e \/opt/" | sed "s/$USER $GROUP/root bin/g" > prototype.tmp
+gsed -i "/info\/dir 0644/d" prototype.tmp
+gsed -i "/info=share/d" prototype.tmp
+gsed -i "/man=share/d" prototype.tmp
+gsed -i "/doc=share/d" prototype.tmp
+gsed -i "/opt 0755/d" prototype.tmp
+gsed -i "/prototype.tmp/d" prototype.tmp
+
+# Copy various files "outside" the package
+for file in copyright depend pkginfo checkinstall; do
+        cp $BASE/pkgs/libpq/$file .
+        echo "i $file" >> prototype
+done
+
+# Strip binaries
+find . -type f | xargs file | grep ELF | \
+      awk -F: '{print $1}' | xargs strip
+find . -type f | xargs file | grep ELF | \
+      awk -F: '{print $1}' | xargs /usr/ccs/bin/mcs -d
+
+# Make the prototype
+cat prototype.tmp >> prototype
+rm prototype.tmp
+
+# And build!
+createpkg -r .
+gzip *.pkg
+mv *.gz $BASE/pkgs/libpq/
+
+
+
+## Package up contrib
+
+cd $BASE/build-$HOST/postgresql-$VERSION/contribstage
+
+# Make the prototype
+pkgproto . | sed "s/e opt/e \/opt/" | sed "s/$USER $GROUP/root bin/g" > prototype.tmp
+gsed -i "/info\/dir 0644/d" prototype.tmp
+gsed -i "/info=share/d" prototype.tmp
+gsed -i "/man=share/d" prototype.tmp
+gsed -i "/doc=share/d" prototype.tmp
+gsed -i "/opt 0755/d" prototype.tmp
+gsed -i "/prototype.tmp/d" prototype.tmp
+
+# Copy various files "outside" the package
+for file in copyright depend pkginfo;  do
+        cp $BASE/pkgs/postgresqlcontrib/$file .
+        echo "i $file" >> prototype
+done
+
+# Strip binaries
+find . -type f | xargs file | grep ELF | \
+      awk -F: '{print $1}' | xargs strip
+find . -type f | xargs file | grep ELF | \
+      awk -F: '{print $1}' | xargs /usr/ccs/bin/mcs -d
+
+# Make the prototype
+cat prototype.tmp >> prototype
+rm prototype.tmp
+
+# And build!
+createpkg -r .
+gzip *.pkg
+mv *.gz $BASE/pkgs/postgresqlcontrib/
+


Property changes on: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/build.x86
___________________________________________________________________
Added: svn:executable
   + *

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/copyright
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/copyright	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/copyright	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,23 @@
+PostgreSQL Database Management System
+(formerly known as Postgres, then as Postgres95)
+
+Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
+
+Portions Copyright (c) 1994, The Regents of the University of California
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose, without fee, and without a written agreement
+is hereby granted, provided that the above copyright notice and this
+paragraph and the following two paragraphs appear in all copies.
+
+IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
+DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
+LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
+DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
+PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/cswpostgres.sparc
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/cswpostgres.sparc	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/cswpostgres.sparc	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,97 @@
+#!/bin/sh
+# PostgreSQL startup script - part of the CSWpostgresql package
+# mark at blastwave.org
+
+# Read in the user configuration file
+[ -s /opt/csw/etc/postgresql.conf ] && . /opt/csw/etc/postgresql.conf
+[ -s /etc/opt/csw/postgresql.conf ] && . /etc/opt/csw/postgresql.conf
+
+# Defaults
+[ -z "$PGDATA" ] && PGDATA=/opt/csw/var/pgdata
+[ -z "$PGCTL" ] && PGCTL=/opt/csw/postgresql/bin/sparcv8/pg_ctl
+[ -z "$PGINIT" ] && PGINIT=/opt/csw/postgresql/bin/sparcv8/initdb
+
+
+# The following attempts to catch any mistakes in the server
+# version - it checks if the 64-bit server was last run. If so,
+# it forces the 64-bit server, otherwise it won't start up!
+# And vice-versa for the 32-bit server...
+if [ -f $PGDATA/postmaster.opts ]; then
+  grep 'sparcv9' $PGDATA/postmaster.opts > /dev/null
+  if [ $? -eq 0 ]; then
+    echo $PGCTL | grep "sparcv8" > /dev/null
+    if [ $? -eq 0 ]; then
+      echo "Warning: 32-bit server was specified in /etc/init.d/cswpostgres,"
+      echo "         but 64-bit version was last run. Using 64-bit server..."
+    fi
+    PGCTL=/opt/csw/postgresql/bin/sparcv9/pg_ctl
+    PGINIT=/opt/csw/postgresql/bin/sparcv9/initdb
+  else
+    # Did not detect 64-bit server last used
+    echo $PGCTL | grep "sparcv8" > /dev/null
+    if [ $? -ne 0 ]; then
+      echo "Warning: 64-bit server was specified in /etc/init.d/cswpostgres,"
+      echo "         but 32-bit version was last run. Using 32-bit server..."
+    fi
+    PGCTL=/opt/csw/postgresql/bin/sparcv8/pg_ctl
+    PGINIT=/opt/csw/postgresql/bin/sparcv8/initdb
+  fi
+fi
+
+# Exit if postgres user hasn't been created.
+grep '^postgres:' /etc/passwd >/dev/null
+if [ $? -ne 0 ] ; then
+        getent passwd postgres >/dev/null
+        if [ $? -ne 0 ] ; then
+               exit 0
+        fi
+fi
+
+# Change to /var/tmp, as pgctl etc. need to be started from
+# a directory that they can read
+cd /var/tmp
+
+case "$1" in
+start)
+      if [ -d $PGDATA -a `ls -l $PGDATA 2> /dev/null | wc -l` -gt 1 ]; then
+         # PostgreSQL data directory exists and is populated
+         echo "Starting PostgreSQL..."
+         su postgres -c "$PGCTL -D $PGDATA -l $PGDATA/postgresql.log start $SERVEROPTS"
+      fi
+      ;;
+
+stop)
+     echo "Stopping PostgreSQL database..."
+     su postgres -c "$PGCTL -D $PGDATA -l $PGDATA/postgresql.log stop"
+     ;;
+
+restart)
+     echo "Restarting PostgreSQL database..."
+     su postgres -c "$PGCTL -D $PGDATA -l $PGDATA/postgresql.log restart $SERVEROPTS"
+     ;;
+
+reload)
+     echo "Reloading PostgreSQL database..."
+     su postgres -c "$PGCTL -D $PGDATA -l $PGDATA/postgresql.log reload $SERVEROPTS"
+     ;;
+
+status)
+     su postgres -c "$PGCTL -D $PGDATA status"
+     ;;
+
+init)
+     # create and initialise data directory
+     echo "Creating PostgreSQL data directory at $PGDATA..."
+     # Create it, unless it's already there and empty
+     [ -d $PGDATA -a `ls -l $PGDATA 2> /dev/null | wc -l` -eq 1 ] || mkdir -p $PGDATA
+     chown postgres $PGDATA
+     echo "Initialising PostgreSQL database..."
+     su postgres -c "$PGINIT -D $PGDATA > /dev/null"
+     ;;
+
+*)
+     echo "Usage: $0 (init|start|stop|restart|reload|status)"
+     ;;
+
+esac
+


Property changes on: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/cswpostgres.sparc
___________________________________________________________________
Added: svn:executable
   + *

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/cswpostgres.x86
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/cswpostgres.x86	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/cswpostgres.x86	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,71 @@
+#!/bin/sh
+# PostgreSQL startup script - part of the CSWpostgresql package
+# mark at blastwave.org
+
+# Read in the user configuration file
+[ -s /opt/csw/etc/postgresql.conf ] && . /opt/csw/etc/postgresql.conf
+[ -s /etc/opt/csw/postgresql.conf ] && . /etc/opt/csw/postgresql.conf
+
+# Defaults
+[ -z "$PGDATA" ] && PGDATA=/opt/csw/var/pgdata
+[ -z "$PGCTL" ] && PGCTL=/opt/csw/postgresql/bin/pg_ctl
+[ -z "$PGINIT" ] && PGINIT=/opt/csw/postgresql/bin/initdb
+
+
+# Exit if postgres user hasn't been created.
+grep '^postgres:' /etc/passwd >/dev/null
+if [ $? -ne 0 ] ; then
+        getent passwd postgres >/dev/null
+        if [ $? -ne 0 ] ; then
+               exit 0 
+        fi
+fi
+
+# Change to a directory that pg_ctl etc. can read - startup fails
+# otherwise
+cd /var/tmp
+
+case "$1" in
+start)
+      if [ -d $PGDATA -a `ls -l $PGDATA 2> /dev/null | wc -l` -gt 1 ]; then
+         # PostgreSQL data directory exists and is populated
+	 echo "Starting PostgreSQL..."
+         su postgres -c "$PGCTL -D $PGDATA -l $PGDATA/postgresql.log start $SERVEROPTS"
+      fi
+      ;;
+
+stop)
+     echo "Stopping PostgreSQL database..."
+     su postgres -c "$PGCTL -D $PGDATA -l $PGDATA/postgresql.log stop"
+     ;;
+
+restart)
+     echo "Restarting PostgreSQL database..."
+     su postgres -c "$PGCTL -D $PGDATA -l $PGDATA/postgresql.log restart $SERVEROPTS"
+     ;;
+     
+reload)
+     echo "Reloading PostgreSQL database..."
+     su postgres -c "$PGCTL -D $PGDATA -l $PGDATA/postgresql.log reload $SERVEROPTS"
+     ;;
+
+status)
+     su postgres -c "$PGCTL -D $PGDATA status"
+     ;;
+
+init)
+     # create and initialise data directory 
+     echo "Creating PostgreSQL data directory at $PGDATA..."
+     # Create it, unless it's already there and empty
+     [ -d $PGDATA -a `ls -l $PGDATA 2> /dev/null | wc -l` -eq 1 ] || mkdir -p $PGDATA
+     chown postgres $PGDATA
+     echo "Initialising PostgreSQL database..."
+     su postgres -c "$PGINIT -D $PGDATA > /dev/null"
+     ;;
+
+*)
+     echo "Usage: $0 (init|start|stop|restart|reload|status)"
+     ;;
+
+esac
+


Property changes on: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/cswpostgres.x86
___________________________________________________________________
Added: svn:executable
   + *

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/depend
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/depend	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/depend	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,5 @@
+P       CSWreadline
+P       CSWosslrt
+P       CSWlibpq
+P       CSWzlib
+P       CSWisaexec

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/libpqfiles.sparc
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/libpqfiles.sparc	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/libpqfiles.sparc	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,45 @@
+lib/libpq.so.5.1
+lib/libpq.so.5
+lib/libpq.so 
+lib/libpq.a 
+lib/libecpg.so.6.0
+lib/libecpg.so.6
+lib/libecpg.so 
+lib/libecpg.a 
+lib/libpgtypes.a
+lib/libpgtypes.so
+lib/libpgtypes.so.3
+lib/libpgtypes.so.3.0
+lib/sparcv9/libpq.so.5.1
+lib/sparcv9/libpq.so.5
+lib/sparcv9/libpq.so
+lib/sparcv9/libpq.a
+lib/sparcv9/libecpg.so.6.0
+lib/sparcv9/libecpg.so.6
+lib/sparcv9/libecpg.so
+lib/sparcv9/libecpg.a
+lib/sparcv9/libpgtypes.a
+lib/sparcv9/libpgtypes.so
+lib/sparcv9/libpgtypes.so.3
+lib/sparcv9/libpgtypes.so.3.0
+include/sqlca.h 
+include/sql3types.h 
+include/internal/pqexpbuffer.h 
+include/internal/libpq-int.h 
+include/postgres_ext.h 
+include/pg_config_os.h 
+include/pg_config.h 
+include/libpq/libpq-fs.h 
+include/libpq-fe.h 
+include/ecpgtype.h 
+include/ecpglib.h 
+include/ecpgerrno.h 
+include/pgtypes_date.h
+include/pgtypes_error.h
+include/pgtypes_interval.h
+include/pgtypes_numeric.h
+include/pgtypes_timestamp.h
+bin/sparcv8/ecpg 
+bin/sparcv9/ecpg 
+bin/sparcv8/pg_config
+bin/sparcv9/pg_config

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/libpqfiles.x86
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/libpqfiles.x86	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/libpqfiles.x86	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,31 @@
+lib/libpq.so.5.1
+lib/libpq.so.5
+lib/libpq.so 
+lib/libpq.a 
+lib/libecpg.so.6.0
+lib/libecpg.so.6
+lib/libecpg.so 
+lib/libecpg.a 
+lib/libpgtypes.a
+lib/libpgtypes.so
+lib/libpgtypes.so.3
+lib/libpgtypes.so.3.0
+include/sqlca.h 
+include/sql3types.h 
+include/internal/pqexpbuffer.h 
+include/internal/libpq-int.h 
+include/postgres_ext.h 
+include/pg_config_os.h 
+include/pg_config.h 
+include/libpq/libpq-fs.h 
+include/libpq-fe.h 
+include/ecpgtype.h 
+include/ecpglib.h 
+include/ecpgerrno.h 
+include/pgtypes_date.h
+include/pgtypes_error.h
+include/pgtypes_interval.h
+include/pgtypes_numeric.h
+include/pgtypes_timestamp.h
+bin/ecpg 
+bin/pg_config

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/pkginfo
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/pkginfo	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/pkginfo	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,7 @@
+PKG=CSWpostgresql
+NAME=postgresql - advanced open source database system
+VERSION=8.3.3,REV=2008.06.26
+CATEGORY=application
+VENDOR=http://www.postgresql.org/  packaged for CSW by Mark Round
+HOTLINE=http://www.blastwave.org/bugtrack/
+EMAIL=mark at blastwave.org

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postgresql.conf.sparc
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postgresql.conf.sparc	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postgresql.conf.sparc	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,34 @@
+# Example PostgreSQL server configuration file.
+# Provided by the Blastwave package of PostgreSQL.
+# This file is read by the /etc/init.d/cswpostgres startup script,
+# and can be used to override the defaults.
+
+# The location of the data directory.
+# Default : /opt/csw/var/pgdata
+PGDATA=/opt/csw/var/pgdata
+
+
+# Which binaries to use, 32- or 64-bit.
+# Only use the 64-bit server if you're sure you need it.
+# Make sure you have read /opt/csw/postgresql/share/doc/README-CSW.txt
+# before changing these, as your databases may not work without
+# a 'dump and restore' cycle !
+
+# 32-bit server - default, and fine for most uses
+PGCTL=/opt/csw/postgresql/bin/sparcv8/pg_ctl
+PGINIT=/opt/csw/postgresql/bin/sparcv8/initdb
+
+# 64-bit server - uncomment these lines only if you really need them.
+#PGCTL=/opt/csw/postgresql/bin/sparcv9/pg_ctl
+#PGINIT=/opt/csw/postgresql/bin/sparcv9/initdb
+
+
+# Additional options to pass to postmaster.
+# These options will be passed to the postmaster program. The most common use of
+# these is to allow network access to PostgreSQL from other hosts over TCP/IP.
+# This is done by using the flags "-o -i", as in the example below.
+# Uncomment this line to enable network access to PostgreSQL.
+# Note that you will still need to configure authentication in the pg_hba.conf
+# in your data directory.
+# SERVEROPTS="-o -i"
+

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postgresql.conf.x86
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postgresql.conf.x86	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postgresql.conf.x86	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,19 @@
+# Example PostgreSQL server configuration file.
+# Provided by the Blastwave package of PostgreSQL.
+# This file is read by the /etc/init.d/cswpostgres startup script,
+# and can be used to override the defaults.
+
+# The location of the data directory.
+# Default : /opt/csw/var/pgdata
+PGDATA=/opt/csw/var/pgdata
+
+
+# Additional options to pass to postmaster.
+# These options will be passed to the postmaster program. The most common use of
+# these is to allow network access to PostgreSQL from other hosts over TCP/IP.
+# This is done by using the flags "-o -i", as in the example below.
+# Uncomment this line to enable network access to PostgreSQL.
+# Note that you will still need to configure authentication in the pg_hba.conf
+# in your data directory.
+# SERVEROPTS="-o -i"
+

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postinstall
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postinstall	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postinstall	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,44 @@
+#!/bin/sh
+# This script makes sure the postgres user exists. If not, it creates it.
+# Modified from the MySQL script by Philip Brown.
+
+PGSQLHOME=/opt/csw/var/pgdata
+
+if [ "$PKG_ROOT_DIR" = "" ] ; then
+        PKG_ROOT_DIR="/"
+fi
+
+#First check target machines password file, THEN check
+#NIS/NIS+/whatever
+
+grep '^postgres:' $PKG_ROOT_DIR/etc/passwd >/dev/null
+if [ $? -ne 0 ] ; then
+        getent passwd postgres >/dev/null
+        if [ $? -ne 0 ] ; then
+                NEEDUSER=1
+        fi
+fi
+
+if [ "$NEEDUSER" = 1 ] ; then
+        echo adding postgres user
+        chroot $PKG_ROOT_DIR /usr/sbin/useradd postgres
+        chroot $PKG_ROOT_DIR /usr/sbin/usermod -s /bin/sh -d $PGSQLHOME postgres
+else
+        echo postgres user detected
+fi
+
+# Start the server again...
+/etc/init.d/cswpostgres start
+
+
+cat <<EOF
+*** Important information ***
+
+Please make sure you read
+
+${PKG_ROOT_DIR}opt/csw/postgresql/share/doc/README-CSW.txt
+
+for information on running this package of PostgreSQL.
+
+EOF
+


Property changes on: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/postinstall
___________________________________________________________________
Added: svn:executable
   + *

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/preremove
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/preremove	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/preremove	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Stops the server if running...
+# Thanks to James Lee for his advice on this :)
+if [ -x /etc/init.d/cswpostgres ]; then
+  . /etc/init.d/cswpostgres > /dev/null
+  /etc/init.d/cswpostgres status && /etc/init.d/cswpostgres stop
+  /etc/init.d/cswpostgres status && exit 2
+fi
+exit 0
+


Property changes on: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/preremove
___________________________________________________________________
Added: svn:executable
   + *

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresql/prototype.append
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresql/prototype.append	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresql/prototype.append	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,8 @@
+f none /etc/init.d/cswpostgres=cswpostgres 0744 root sys
+f none /opt/csw/etc/postgresql.conf.csw=postgresql.conf.csw 0755 root sys
+f none /opt/csw/postgresql/share/doc/README-CSW.txt=README-CSW.txt 0644 root sys
+s none /etc/rc3.d/S10cswpostgres=../init.d/cswpostgres
+s none /etc/rc0.d/K90cswpostgres=../init.d/cswpostgres
+s none /etc/rc1.d/K90cswpostgres=../init.d/cswpostgres
+s none /etc/rc2.d/K90cswpostgres=../init.d/cswpostgres
+s none /etc/rcS.d/K90cswpostgres=../init.d/cswpostgres

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/copyright
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/copyright	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/copyright	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,23 @@
+PostgreSQL Database Management System
+(formerly known as Postgres, then as Postgres95)
+
+Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
+
+Portions Copyright (c) 1994, The Regents of the University of California
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose, without fee, and without a written agreement
+is hereby granted, provided that the above copyright notice and this
+paragraph and the following two paragraphs appear in all copies.
+
+IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
+DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
+LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
+DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
+PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/depend
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/depend	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/depend	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,5 @@
+P	CSWlibpq
+P       CSWreadline
+P       CSWosslrt
+P       CSWzlib
+

Added: csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/pkginfo
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/pkginfo	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/postgresqlcontrib/pkginfo	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,8 @@
+PKG=CSWpostgresqlcontrib
+NAME=postgresqlcontrib - utilities not part of the core PostgreSQL distribution
+VERSION=8.3.3,REV=2008.06.26
+CATEGORY=application
+VENDOR=http://www.postgresql.org/  packaged for CSW by Mark Round
+HOTLINE=http://www.blastwave.org/bugtrack/
+EMAIL=mark at blastwave.org
+

Added: csw/mgar/pkg/postgresql/trunk/legacy/scripts/env
===================================================================
--- csw/mgar/pkg/postgresql/trunk/legacy/scripts/env	                        (rev 0)
+++ csw/mgar/pkg/postgresql/trunk/legacy/scripts/env	2008-12-12 21:15:09 UTC (rev 2567)
@@ -0,0 +1,21 @@
+#!/usr/bin/bash
+# Sets some common variables
+
+BASE="/export/medusa/mark"
+SRC="/export/medusa/src"
+
+USER="mark"
+GROUP="`groups | awk '{print $1}'`"
+
+PATH="/opt/SUNWspro/bin:/opt/csw/bin:$PATH"
+LD_OPTIONS_64="-R/opt/csw/lib/64 -L/opt/csw/lib/64" 
+LD_OPTIONS_32="-R/opt/csw/lib -L/opt/csw/lib"
+
+CC_SPARC_64="cc  -xtarget=ultra -xarch=v9"
+CC_SPARC_32="cc  -xarch=v8"
+
+#CC_SPARC_64="cc -fast -xtarget=ultra -xarch=v9"
+#CC_SPARC_32="cc -fast -xarch=v8"
+
+CC_INTEL_32="cc -xarch=386"
+CC_INTEL_64="cc -xtarget=opteron -xarch=amd64"


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list