summaryrefslogtreecommitdiff
path: root/databases/postgresql80-server
diff options
context:
space:
mode:
authorjdolecek <jdolecek>2005-02-06 12:32:05 +0000
committerjdolecek <jdolecek>2005-02-06 12:32:05 +0000
commit6444f0682179142827f98b0d812a03c5de94bd54 (patch)
treeca025c7eef396d233c2e4340a7c68a2a92ecf72b /databases/postgresql80-server
parent7f0c56087d2b56ae05f634623d4fc8dd952fb5cb (diff)
downloadpkgsrc-6444f0682179142827f98b0d812a03c5de94bd54.tar.gz
PostgreSQL 8.0.1 packages. A dump/restore using pg_dump is required
for those wishing to migrate data from any previous release. Major changes relative to 7.4.x: * Savepoints * Point-in-Time recovery * Tablespaces * Improved buffer management * ALTER TABLE column management improvements Full list of changes is available at: http://www.postgresql.org/docs/8.0/static/release.html#RELEASE-8-0 Also note that PostgreSQL server listens also on localhost (127.0.0.1) by default now.
Diffstat (limited to 'databases/postgresql80-server')
-rw-r--r--databases/postgresql80-server/DEINSTALL20
-rw-r--r--databases/postgresql80-server/DESCR9
-rw-r--r--databases/postgresql80-server/MESSAGE19
-rw-r--r--databases/postgresql80-server/Makefile80
-rw-r--r--databases/postgresql80-server/PLIST61
-rw-r--r--databases/postgresql80-server/files/man.server4
-rw-r--r--databases/postgresql80-server/files/pgsql.sh142
7 files changed, 335 insertions, 0 deletions
diff --git a/databases/postgresql80-server/DEINSTALL b/databases/postgresql80-server/DEINSTALL
new file mode 100644
index 00000000000..761da62253f
--- /dev/null
+++ b/databases/postgresql80-server/DEINSTALL
@@ -0,0 +1,20 @@
+# $NetBSD: DEINSTALL,v 1.1.1.1 2005/02/06 12:32:06 jdolecek 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 --git a/databases/postgresql80-server/DESCR b/databases/postgresql80-server/DESCR
new file mode 100644
index 00000000000..68bb2b05748
--- /dev/null
+++ b/databases/postgresql80-server/DESCR
@@ -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 --git a/databases/postgresql80-server/MESSAGE b/databases/postgresql80-server/MESSAGE
new file mode 100644
index 00000000000..7981e9017d8
--- /dev/null
+++ b/databases/postgresql80-server/MESSAGE
@@ -0,0 +1,19 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2005/02/06 12:32:06 jdolecek Exp $
+
+To enable this package, put the following into your /etc/rc.conf:
+
+ pgsql=yes
+ pgsql_flags="-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.
+
+Note: PostgreSQL 8.0 accepts TCP/IP connections on localhost address
+by default.
+
+===========================================================================
diff --git a/databases/postgresql80-server/Makefile b/databases/postgresql80-server/Makefile
new file mode 100644
index 00000000000..5ae50325f47
--- /dev/null
+++ b/databases/postgresql80-server/Makefile
@@ -0,0 +1,80 @@
+# $NetBSD: Makefile,v 1.1.1.1 2005/02/06 12:32:06 jdolecek Exp $
+
+PKGNAME= postgresql80-server-${BASE_VERS}
+PKGREVISION= # empty
+COMMENT= PostgreSQL database server programs
+
+DEPENDS+= postgresql80-client>=${BASE_VERS}:../../wip/postgresql80-client
+
+# mips has no TAS implementation
+NOT_FOR_PLATFORM= *-*-mips
+
+.include "../../wip/postgresql80/Makefile.common"
+
+USE_PKGINSTALL= yes
+DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/DEINSTALL
+MESSAGE_SRC= ${.CURDIR}/MESSAGE
+
+CONFIGURE_ARGS+= --with-openssl
+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
+ cd ${PG_DIR}/man && ${TAR} -zxm -T ${WRKDIR}/man_tar \
+ -f ${WRKSRC}/doc/man.tar.gz
+
+.include "../../wip/postgresql80-lib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/databases/postgresql80-server/PLIST b/databases/postgresql80-server/PLIST
new file mode 100644
index 00000000000..957df03487f
--- /dev/null
+++ b/databases/postgresql80-server/PLIST
@@ -0,0 +1,61 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2005/02/06 12:32:06 jdolecek 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/information_schema.sql
+${PKGLOCALEDIR}/locale/af/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/cs/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/de/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/es/LC_MESSAGES/postgres.mo
+${PKGLOCALEDIR}/locale/fr/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/sk/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/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/recovery.conf.sample
+share/postgresql/sql_features.txt
+share/postgresql/system_views.sql
+@comment in postgresql80-client: @dirrm share
+@comment in postgresql80-lib: @dirrm man/man1
+@comment in postgresql80-lib: @dirrm lib/postgresql
+@comment in postgresql80-lib: @dirrm bin
diff --git a/databases/postgresql80-server/files/man.server b/databases/postgresql80-server/files/man.server
new file mode 100644
index 00000000000..7a76d2c3193
--- /dev/null
+++ b/databases/postgresql80-server/files/man.server
@@ -0,0 +1,4 @@
+# $NetBSD: man.server,v 1.1.1.1 2005/02/06 12:32:06 jdolecek Exp $
+#
+man1/postgres.1
+man1/postmaster.1
diff --git a/databases/postgresql80-server/files/pgsql.sh b/databases/postgresql80-server/files/pgsql.sh
new file mode 100644
index 00000000000..481fc1e9d14
--- /dev/null
+++ b/databases/postgresql80-server/files/pgsql.sh
@@ -0,0 +1,142 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: pgsql.sh,v 1.1.1.1 2005/02/06 12:32:06 jdolecek 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}." ;;
+ restart) @ECHO@ "Restarting ${name}." ;;
+ esac
+
+ eval doit_command=\"${ctl_command} ${action} ${command_args}\"
+ doit="@SU@ -m ${pgsql_user} -c '${doit_command}'"
+ eval $doit
+}
+
+if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+ fi
+ case "$1" in
+ initdb)
+ eval ${initdb_cmd}
+ ;;
+ restart)
+ eval ${restart_cmd}
+ ;;
+ stop)
+ eval ${stop_cmd}
+ ;;
+ *)
+ eval ${start_precmd}
+ eval ${start_cmd}
+ ;;
+ esac
+fi