pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/postgresql73-server reimport of postgresql-s...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/02a8573af8c1
branches:  trunk
changeset: 478493:02a8573af8c1
user:      recht <recht%pkgsrc.org@localhost>
date:      Sat Jul 24 22:20:31 2004 +0000

description:
reimport of postgresql-server as postgresql73-server

PostgreSQL is a robust, next-generation, Object-Relational DBMS (ORDBMS),
derived from the Berkeley Postgres database management system.  While
PostgreSQL retains the powerful object-relational data model, rich data types
and easy extensibility of Postgres, it replaces the PostQuel query language
with an extended subset of SQL.

PostgreSQL is free and the complete source is available.

This is the meta-package for the PostgreSQL database system.

diffstat:

 databases/postgresql73-server/DEINSTALL        |   20 +++
 databases/postgresql73-server/DESCR            |    9 +
 databases/postgresql73-server/MESSAGE          |   17 ++
 databases/postgresql73-server/Makefile         |   73 ++++++++++++
 databases/postgresql73-server/PLIST            |   38 ++++++
 databases/postgresql73-server/files/man.server |    4 +
 databases/postgresql73-server/files/pgsql.sh   |  142 +++++++++++++++++++++++++
 7 files changed, 303 insertions(+), 0 deletions(-)

diffs (truncated from 331 to 300 lines):

diff -r abc2ac9eefc3 -r 02a8573af8c1 databases/postgresql73-server/DEINSTALL
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql73-server/DEINSTALL   Sat Jul 24 22:20:31 2004 +0000
@@ -0,0 +1,20 @@
+# $NetBSD: DEINSTALL,v 1.1.1.1 2004/07/24 22:20:32 recht Exp $
+
+case ${STAGE} in
+DEINSTALL)
+       ${CAT} << EOF
+===========================================================================
+
+If you intend to upgrade your PostgreSQL installation, you may need to
+perform a dump-and-restore to move your current databases into the newer
+PostgreSQL installation.  Please dump your databases *prior* to installing
+the new PostgreSQL.
+
+Please see the Backup and Restore section of the PostgreSQL Administrator's
+Guide (databases/postgresql-docs) for complete information on how to
+perform the databases dump.
+
+===========================================================================
+EOF
+       ;;
+esac
diff -r abc2ac9eefc3 -r 02a8573af8c1 databases/postgresql73-server/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql73-server/DESCR       Sat Jul 24 22:20:31 2004 +0000
@@ -0,0 +1,9 @@
+PostgreSQL is a robust, next-generation, Object-Relational DBMS (ORDBMS),
+derived from the Berkeley Postgres database management system.  While
+PostgreSQL retains the powerful object-relational data model, rich data types
+and easy extensibility of Postgres, it replaces the PostQuel query language
+with an extended subset of SQL.
+
+PostgreSQL is free and the complete source is available.
+
+This package contains the database server programs.
diff -r abc2ac9eefc3 -r 02a8573af8c1 databases/postgresql73-server/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql73-server/MESSAGE     Sat Jul 24 22:20:31 2004 +0000
@@ -0,0 +1,17 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2004/07/24 22:20:31 recht Exp $
+
+To enable this package, put the following into your /etc/rc.conf:
+
+       pgsql=yes
+       pgsql_flags="-i"        # allows TCP/IP connections
+       pgsql_flags="-i -l"     # enables SSL connections (TCP/IP and
+                               # ~pgsql/data/server.crt required)
+
+and ensure that
+
+       ${RCD_SCRIPTS_DIR}/pgsql start
+
+is run at the appropriate time.
+
+===========================================================================
diff -r abc2ac9eefc3 -r 02a8573af8c1 databases/postgresql73-server/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql73-server/Makefile    Sat Jul 24 22:20:31 2004 +0000
@@ -0,0 +1,73 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/07/24 22:20:32 recht Exp $
+
+PKGNAME=               postgresql73-server-${BASE_VERS}
+SVR4_PKGNAME=          pstgs
+COMMENT=               PostgreSQL database server programs
+
+DEPENDS+=      postgresql73-client>=${BASE_VERS}:../../databases/postgresql73-client
+
+# mips has no TAS implementation
+NOT_FOR_PLATFORM=      *-*-mips
+
+USE_BUILDLINK3=                yes
+
+.include "../../databases/postgresql73/Makefile.common"
+
+USE_PKGINSTALL=                yes
+DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/DEINSTALL
+
+CONFIGURE_ARGS+=       --with-openssl=${SSLBASE}
+BUILD_DIRS=            ${WRKSRC}/src/backend
+BUILD_DIRS+=           ${WRKSRC}/src/backend/utils/mb/conversion_procs
+
+.if defined(USE_PAM)
+.  include "../../security/PAM/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-pam
+.endif
+
+# PGUSER       username of the database administrator
+# PGGROUP      group of the database administrator
+# PGHOME       home directory of the database administrator and location of
+#              the databases
+#
+PGUSER?=               pgsql
+PGGROUP?=              pgsql
+PGHOME?=               ${PREFIX}/${PGUSER}
+FILES_SUBST+=          PGUSER=${PGUSER}
+FILES_SUBST+=          PGGROUP=${PGGROUP}
+FILES_SUBST+=          PGHOME=${PGHOME}
+BUILD_DEFS=            PGUSER PGGROUP PGHOME
+
+PKG_USERS=             ${PGUSER}:${PGGROUP}::PostgreSQL\\ database\\ administrator:${PGHOME}:${SH}
+PKG_GROUPS=            ${PGGROUP}
+
+RCD_SCRIPTS=           pgsql
+
+post-buildlink:
+#
+# Avoid conflict between "${LOCALBASE}/include/openssl/des.h" and
+# "/usr/include/crypt.h" -- we want the definitions in the former.
+#
+.if (${OPSYS} == "SunOS")
+       ${TOUCH} ${BUILDLINK_DIR}/include/crypt.h
+.endif
+
+pre-install:
+       @case "X${PGUSER}" in                                           \
+       Xbin|Xetc|Xinclude|Xinfo|Xlib|Xlibdata|Xlibexec|Xman|Xsbin|Xshare) \
+               ${ECHO} "You have chosen PGUSER=${PGUSER} which will";  \
+               ${ECHO} "cause trouble, because the postgres home directory"; \
+               ${ECHO} "would be ${PGHOME}.  Please";                  \
+               ${ECHO} "set PGUSER to something more reasonable";      \
+               ${ECHO} "like pgsql.";                                  \
+               ${ECHO} "";                                             \
+               ${FALSE};                                               \
+               ;;                                                      \
+       esac
+
+post-install:
+       ${GTAR} zxCf ${PREFIX}/man ${WRKSRC}/doc/man.tar.gz             \
+               `${SED} -e "s|^#.*||" ${FILESDIR}/man.server`
+
+.include "../../databases/postgresql73-lib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r abc2ac9eefc3 -r 02a8573af8c1 databases/postgresql73-server/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql73-server/PLIST       Sat Jul 24 22:20:31 2004 +0000
@@ -0,0 +1,38 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/07/24 22:20:32 recht Exp $
+bin/postgres
+bin/postmaster
+lib/postgresql/ascii_and_mic.so
+lib/postgresql/cyrillic_and_mic.so
+lib/postgresql/euc_cn_and_mic.so
+lib/postgresql/euc_jp_and_sjis.so
+lib/postgresql/euc_kr_and_mic.so
+lib/postgresql/euc_tw_and_big5.so
+lib/postgresql/latin2_and_win1250.so
+lib/postgresql/latin_and_mic.so
+lib/postgresql/utf8_and_ascii.so
+lib/postgresql/utf8_and_big5.so
+lib/postgresql/utf8_and_cyrillic.so
+lib/postgresql/utf8_and_euc_cn.so
+lib/postgresql/utf8_and_euc_jp.so
+lib/postgresql/utf8_and_euc_kr.so
+lib/postgresql/utf8_and_euc_tw.so
+lib/postgresql/utf8_and_gb18030.so
+lib/postgresql/utf8_and_gbk.so
+lib/postgresql/utf8_and_iso8859.so
+lib/postgresql/utf8_and_iso8859_1.so
+lib/postgresql/utf8_and_johab.so
+lib/postgresql/utf8_and_sjis.so
+lib/postgresql/utf8_and_tcvn.so
+lib/postgresql/utf8_and_uhc.so
+lib/postgresql/utf8_and_win1250.so
+lib/postgresql/utf8_and_win1256.so
+lib/postgresql/utf8_and_win874.so
+man/man1/postgres.1
+man/man1/postmaster.1
+share/postgresql/conversion_create.sql
+share/postgresql/postgres.bki
+share/postgresql/postgres.description
+share/postgresql/pg_hba.conf.sample
+share/postgresql/pg_ident.conf.sample
+share/postgresql/postgresql.conf.sample
+@unexec ${RMDIR} -p %D/share/postgresql 2>/dev/null || ${TRUE}
diff -r abc2ac9eefc3 -r 02a8573af8c1 databases/postgresql73-server/files/man.server
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql73-server/files/man.server    Sat Jul 24 22:20:31 2004 +0000
@@ -0,0 +1,4 @@
+# $NetBSD: man.server,v 1.1.1.1 2004/07/24 22:20:32 recht Exp $
+#
+man1/postgres.1
+man1/postmaster.1
diff -r abc2ac9eefc3 -r 02a8573af8c1 databases/postgresql73-server/files/pgsql.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql73-server/files/pgsql.sh      Sat Jul 24 22:20:31 2004 +0000
@@ -0,0 +1,142 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: pgsql.sh,v 1.1.1.1 2004/07/24 22:20:32 recht Exp $
+#
+# PostgreSQL database rc.d control script
+#
+# PROVIDE: pgsql
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# You will need to set some variables in /etc/rc.conf to start PostgreSQL:
+#
+# pgsql=YES
+#
+# The following variables are optional:
+#
+#      pgsql_flags="-i"                # allows TCP/IP connections
+#      pgsql_flags="-i -l"             # enables SSL connections
+#      pgsql_home="/path/to/home"      # path to pgsql database directory
+#
+# "pgsql_flags" contains options for the PostgreSQL postmaster.  See
+# postmaster(1) for possible options.
+
+if [ -f /etc/rc.subr ]; then
+       . /etc/rc.subr
+fi
+
+name="pgsql"
+rcvar=$name
+pgsql_user="@PGUSER@"
+pgsql_group="@PGGROUP@"
+eval pgsql_home="~$pgsql_user"
+
+command="@PREFIX@/bin/postmaster"
+ctl_command="@PREFIX@/bin/pg_ctl"
+extra_commands="initdb"
+
+if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
+       load_rc_config $name
+elif [ -f /etc/rc.conf ]; then
+       . /etc/rc.conf
+fi
+
+pidfile="${pgsql_home}/data/postmaster.pid"
+common_args="-D ${pgsql_home}/data"
+start_command_args="-w -s -l ${pgsql_home}/errlog"
+stop_command_args="-s -m fast"
+
+initdb_cmd="pgsql_initdb"
+start_precmd="pgsql_precmd"
+start_cmd="pgsql_doit start"
+restart_cmd="pgsql_doit restart"
+stop_cmd="pgsql_doit stop"
+
+ulimit -n 4096
+
+pgsql_precmd()
+{
+       if [ ! -d ${pgsql_home}/data/base ]; then
+               pgsql_initdb
+       fi
+}
+
+pgsql_initdb()
+{
+       initdb="@PREFIX@/bin/initdb"
+
+       if [ ! -x ${initdb} ]; then
+               return 1
+       fi
+       if [ -d ${pgsql_home}/data/base ]; then
+               @ECHO@ "The PostgreSQL template databases have already been initialized."
+               @ECHO@ "Skipping database initialization."
+       else
+               @ECHO@ "Initializing PostgreSQL databases."
+               @MKDIR@ -p ${pgsql_home}
+               @CHOWN@ ${pgsql_user} ${pgsql_home}
+               @CHGRP@ ${pgsql_group} ${pgsql_home}
+               @CHMOD@ 0750 ${pgsql_home}
+               eval doit_command=\"${initdb} ${common_args} ${flags}\"
+               doit="@SU@ -m ${pgsql_user} -c '${doit_command}'"
+               eval $doit
+       fi
+}
+
+pgsql_doit()
+{
+       action=$1
+
+       case ${action} in
+       start|restart)
+               if [ -n "${pgsql_flags}" ]; then
+                       start_command_args="${start_command_args} -o \\\"${pgsql_flags}\\\""
+               fi
+               command_args="${common_args} ${start_command_args} ${command_args}"
+               ;;
+       stop)
+               command_args="${common_args} ${stop_command_args} ${command_args}"
+               ;;
+       *)
+               command_args="${common_args} ${command_args}"
+               ;;
+       esac
+
+       if [ ! -x ${ctl_command} ]; then
+               return
+       fi
+
+       case ${action} in
+       start)          @ECHO@ "Starting ${name}." ;;
+       stop)           @ECHO@ "Stopping ${name}." ;;



Home | Main Index | Thread Index | Old Index