summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorrecht <recht@pkgsrc.org>2004-04-19 00:04:22 +0000
committerrecht <recht@pkgsrc.org>2004-04-19 00:04:22 +0000
commit20a77dfda27bad93f52138f3f5c59b555312f043 (patch)
tree92085838b09802c5445ddd0c046a282961389d1b /databases
parent0ef8a7fa057f8a64b6f5fa494b92546c849fa902 (diff)
downloadpkgsrc-20a77dfda27bad93f52138f3f5c59b555312f043.tar.gz
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 (limited to 'databases')
-rw-r--r--databases/postgresql74-server/DEINSTALL20
-rw-r--r--databases/postgresql74-server/DESCR9
-rw-r--r--databases/postgresql74-server/MESSAGE17
-rw-r--r--databases/postgresql74-server/Makefile80
-rw-r--r--databases/postgresql74-server/PLIST55
-rw-r--r--databases/postgresql74-server/files/man.server4
-rw-r--r--databases/postgresql74-server/files/pgsql.sh142
7 files changed, 327 insertions, 0 deletions
diff --git a/databases/postgresql74-server/DEINSTALL b/databases/postgresql74-server/DEINSTALL
new file mode 100644
index 00000000000..14bf7207882
--- /dev/null
+++ b/databases/postgresql74-server/DEINSTALL
@@ -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 --git a/databases/postgresql74-server/DESCR b/databases/postgresql74-server/DESCR
new file mode 100644
index 00000000000..68bb2b05748
--- /dev/null
+++ b/databases/postgresql74-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/postgresql74-server/MESSAGE b/databases/postgresql74-server/MESSAGE
new file mode 100644
index 00000000000..d42972aceaa
--- /dev/null
+++ b/databases/postgresql74-server/MESSAGE
@@ -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 --git a/databases/postgresql74-server/Makefile b/databases/postgresql74-server/Makefile
new file mode 100644
index 00000000000..5ab74b3b521
--- /dev/null
+++ b/databases/postgresql74-server/Makefile
@@ -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 --git a/databases/postgresql74-server/PLIST b/databases/postgresql74-server/PLIST
new file mode 100644
index 00000000000..2c232039fb0
--- /dev/null
+++ b/databases/postgresql74-server/PLIST
@@ -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 --git a/databases/postgresql74-server/files/man.server b/databases/postgresql74-server/files/man.server
new file mode 100644
index 00000000000..27bfd9b91a9
--- /dev/null
+++ b/databases/postgresql74-server/files/man.server
@@ -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 --git a/databases/postgresql74-server/files/pgsql.sh b/databases/postgresql74-server/files/pgsql.sh
new file mode 100644
index 00000000000..93815de5852
--- /dev/null
+++ b/databases/postgresql74-server/files/pgsql.sh
@@ -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()
+{
+ 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