pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/databases/postgresql74-server Initial import of Postgr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f6a3b22d85ff
branches:  trunk
changeset: 473351:f6a3b22d85ff
user:      recht <recht%pkgsrc.org@localhost>
date:      Mon Apr 19 00:04:22 2004 +0000

description:
Initial import of PostgreSQL 7.4.2
Database 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 package contains the database server programs.

diffstat:

 databases/postgresql74-server/DEINSTALL        |   20 +++
 databases/postgresql74-server/DESCR            |    9 +
 databases/postgresql74-server/MESSAGE          |   17 ++
 databases/postgresql74-server/Makefile         |   80 ++++++++++++++
 databases/postgresql74-server/PLIST            |   55 +++++++++
 databases/postgresql74-server/files/man.server |    4 +
 databases/postgresql74-server/files/pgsql.sh   |  142 +++++++++++++++++++++++++
 7 files changed, 327 insertions(+), 0 deletions(-)

diffs (truncated from 355 to 300 lines):

diff -r 706cb4413552 -r f6a3b22d85ff databases/postgresql74-server/DEINSTALL
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql74-server/DEINSTALL   Mon Apr 19 00:04:22 2004 +0000
@@ -0,0 +1,20 @@
+# $NetBSD: DEINSTALL,v 1.1.1.1 2004/04/19 00:04:23 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 706cb4413552 -r f6a3b22d85ff databases/postgresql74-server/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql74-server/DESCR       Mon Apr 19 00:04:22 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 706cb4413552 -r f6a3b22d85ff databases/postgresql74-server/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql74-server/MESSAGE     Mon Apr 19 00:04:22 2004 +0000
@@ -0,0 +1,17 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2004/04/19 00:04:22 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 706cb4413552 -r f6a3b22d85ff databases/postgresql74-server/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql74-server/Makefile    Mon Apr 19 00:04:22 2004 +0000
@@ -0,0 +1,80 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/04/19 00:04:23 recht Exp $
+
+PKGNAME=               postgresql-server-${BASE_VERS}
+SVR4_PKGNAME=          pstgs
+COMMENT=               PostgreSQL database server programs
+
+DEPENDS+=              postgresql-client>=${BASE_VERS}:../../databases/postgresql74-client
+
+# mips has no TAS implementation
+NOT_FOR_PLATFORM=      *-*-mips
+
+.include "../../databases/postgresql74/Makefile.common"
+
+USE_PKGINSTALL=                yes
+DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/DEINSTALL
+MESSAGE_SRC=           ${.CURDIR}/MESSAGE
+
+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-build:
+       ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${WRKSRC}/src/backend && \
+       ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} \
+               ../../src/include/parser/parse.h ../../src/include/utils/fmgroids.h
+       ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${WRKSRC}/src/port && \
+               ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS}
+
+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:
+       ${EGREP} -v "^#" ${FILESDIR}/man.server > ${WRKDIR}/man_tar
+       ${TAR} -zxm -C ${PREFIX}/man -T ${WRKDIR}/man_tar               \
+               -f ${WRKSRC}/doc/man.tar.gz
+
+.include "../../databases/postgresql74-lib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 706cb4413552 -r f6a3b22d85ff databases/postgresql74-server/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql74-server/PLIST       Mon Apr 19 00:04:22 2004 +0000
@@ -0,0 +1,55 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/04/19 00:04:23 recht Exp $
+bin/postgres
+bin/postmaster
+etc/rc.d/pgsql
+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
+${PKGLOCALEDIR}/locale/cs/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/de/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/es/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/hr/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/hu/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/it/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/nb/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/pt_BR/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/ru/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/sv/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/tr/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/zh_CN/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/zh_TW/LC_MESSAGES/postgres.mo
+share/postgresql/conversion_create.sql
+share/postgresql/information_schema.sql
+share/postgresql/pg_hba.conf.sample
+share/postgresql/pg_ident.conf.sample
+share/postgresql/postgres.bki
+share/postgresql/postgres.description
+share/postgresql/postgresql.conf.sample
+share/postgresql/sql_features.txt
+@comment in postgresql74-client: @dirrm share/postgresql
+@comment in postgresql74-lib: @dirrm lib/postgresql
diff -r 706cb4413552 -r f6a3b22d85ff databases/postgresql74-server/files/man.server
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql74-server/files/man.server    Mon Apr 19 00:04:22 2004 +0000
@@ -0,0 +1,4 @@
+# $NetBSD: man.server,v 1.1.1.1 2004/04/19 00:04:23 recht Exp $
+#
+man1/postgres.1
+man1/postmaster.1
diff -r 706cb4413552 -r f6a3b22d85ff databases/postgresql74-server/files/pgsql.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql74-server/files/pgsql.sh      Mon Apr 19 00:04:22 2004 +0000
@@ -0,0 +1,142 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: pgsql.sh,v 1.1.1.1 2004/04/19 00:04:24 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()
+{



Home | Main Index | Thread Index | Old Index