diff options
author | recht <recht@pkgsrc.org> | 2004-07-24 22:20:31 +0000 |
---|---|---|
committer | recht <recht@pkgsrc.org> | 2004-07-24 22:20:31 +0000 |
commit | 06403ecee17b3f479c4749e067fc3463d69869e5 (patch) | |
tree | a41e0d40a27999a63f964e6c462aea23fd8949b9 /databases/postgresql73-server | |
parent | a5001b4d1f4627b2e601371ada8475b6bee15a3d (diff) | |
download | pkgsrc-06403ecee17b3f479c4749e067fc3463d69869e5.tar.gz |
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 (limited to 'databases/postgresql73-server')
-rw-r--r-- | databases/postgresql73-server/DEINSTALL | 20 | ||||
-rw-r--r-- | databases/postgresql73-server/DESCR | 9 | ||||
-rw-r--r-- | databases/postgresql73-server/MESSAGE | 17 | ||||
-rw-r--r-- | databases/postgresql73-server/Makefile | 73 | ||||
-rw-r--r-- | databases/postgresql73-server/PLIST | 38 | ||||
-rw-r--r-- | databases/postgresql73-server/files/man.server | 4 | ||||
-rw-r--r-- | databases/postgresql73-server/files/pgsql.sh | 142 |
7 files changed, 303 insertions, 0 deletions
diff --git a/databases/postgresql73-server/DEINSTALL b/databases/postgresql73-server/DEINSTALL new file mode 100644 index 00000000000..4955e202987 --- /dev/null +++ b/databases/postgresql73-server/DEINSTALL @@ -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 --git a/databases/postgresql73-server/DESCR b/databases/postgresql73-server/DESCR new file mode 100644 index 00000000000..68bb2b05748 --- /dev/null +++ b/databases/postgresql73-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/postgresql73-server/MESSAGE b/databases/postgresql73-server/MESSAGE new file mode 100644 index 00000000000..dacacbbfc2a --- /dev/null +++ b/databases/postgresql73-server/MESSAGE @@ -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 --git a/databases/postgresql73-server/Makefile b/databases/postgresql73-server/Makefile new file mode 100644 index 00000000000..88dbd054806 --- /dev/null +++ b/databases/postgresql73-server/Makefile @@ -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 --git a/databases/postgresql73-server/PLIST b/databases/postgresql73-server/PLIST new file mode 100644 index 00000000000..3707c21b523 --- /dev/null +++ b/databases/postgresql73-server/PLIST @@ -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 --git a/databases/postgresql73-server/files/man.server b/databases/postgresql73-server/files/man.server new file mode 100644 index 00000000000..1a722268ff1 --- /dev/null +++ b/databases/postgresql73-server/files/man.server @@ -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 --git a/databases/postgresql73-server/files/pgsql.sh b/databases/postgresql73-server/files/pgsql.sh new file mode 100644 index 00000000000..cd949a88534 --- /dev/null +++ b/databases/postgresql73-server/files/pgsql.sh @@ -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}." ;; + 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 |