more fixes

This commit is contained in:
form 1998-06-17 06:27:17 +00:00
parent 83aa2b6027
commit b01887975c
4 changed files with 26 additions and 16 deletions

View File

@ -3,7 +3,7 @@
# Date created: 6 May 1998
# Whom: Oleg Safiullin <form@vs.itam.nsc.ru>
#
# $OpenBSD: Makefile,v 1.6 1998/06/17 05:41:24 form Exp $
# $OpenBSD: Makefile,v 1.7 1998/06/17 06:27:17 form Exp $
# FreeBSD: Makefile,v 1.25 1998/04/22 08:28:07 asami Exp
#
@ -15,8 +15,6 @@ MAINTAINER= form@vs.itam.nsc.ru
BUILD_DEPENDS= bison:${PORTSDIR}/devel/bison
# if you want to use the tcl/tk frontend pgaccess, then you need to build
# postgresql with tcl support by typing: make USE_TCL=yes
.if defined(USE_TCL)
MAKE_ENV= USE_TCL=true TCL_INCDIR=${PREFIX}/include/tcl8.0
LIB_DEPENDS= tcl80\\.1\\.:${PORTSDIR}/lang/tcl80 \
@ -24,6 +22,8 @@ LIB_DEPENDS= tcl80\\.1\\.:${PORTSDIR}/lang/tcl80 \
WITH_TCL= --with-tcl
.endif
DBPREFIX= /var/db
NO_PACKAGE= "Requires pgsql uid"
WRKSRC= ${WRKDIR}/${DISTNAME}/src
@ -82,7 +82,7 @@ post-install:
>> ${PREFIX}/pgsql/.profile; \
${ECHO} "# note: PGDATA overwrites the -D startup option" \
>> ${PREFIX}/pgsql/.profile; \
${ECHO} "PGDATA=${PREFIX}/pgsql/data" \
${ECHO} "PGDATA=${DBPREFIX}/pgsql/data" \
>> ${PREFIX}/pgsql/.profile; \
${ECHO} "DISPLAY=:0" \
>> ${PREFIX}/pgsql/.profile; \
@ -96,10 +96,13 @@ post-install:
>> ${PREFIX}/pgsql/.profile; \
fi
@ chown -R pgsql:pgsql ${PREFIX}/pgsql
@ if [ ! -d ${PREFIX}/pgsql/data ]; then \
@ if [ ! -d ${DBPREFIX}/pgsql/data ]; then \
${MKDIR} -p ${DBPREFIX}/pgsql/data; \
chown pgsql:pgsql ${DBPREFIX}/pgsql ${DBPREFIX}/pgsql/data; \
chmod 700 ${DBPREFIX}/pgsql/data; \
${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...'; \
${LDCONFIG} -m ${PREFIX}/pgsql/lib; \
su -l pgsql -c '${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data'; \
su -l pgsql -c '${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${DBPREFIX}/pgsql/data'; \
else \
${ECHO} 'Found existing PostgreSQL database(s) -- skipping database initializing...'; \
fi

View File

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: pgsql.sh.tmpl,v 1.4 1998/05/06 16:55:40 form Exp $
# $Id: pgsql.sh.tmpl,v 1.5 1998/06/17 06:27:18 form Exp $
# pgsql.sh - postgresql startup file for FreeBSD and possibly *BSD (untested)
@ -10,16 +10,15 @@
# - modified the postmaster startup sequence as suggested in the
# INSTALL file which was given as example for FreeBSD 2.2 (andreas)
# - removed the commandline option
# -D!!PREFIX!!/pgsql/data \
# -D/var/db/pgsql/data \
# because the postmaster process, which starts up under the
# environment of the pgsql user, sets this with the PGDATA
# environment variable in !!PREFIX!!/pgsql/.profile
#
[ -d !!PREFIX!!/pgsql/lib ] && /sbin/ldconfig -m !!PREFIX!!/pgsql/lib
[ -d !!PREFIX!!/pgsql/lib -a -x /sbin/ldconfig ] && /sbin/ldconfig -m !!PREFIX!!/pgsql/lib
[ -x !!PREFIX!!/pgsql/bin/postmaster ] && {
su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/postmaster -i -S -o -F \
-D!!PREFIX!!/pgsql/data > !!PREFIX!!/pgsql/errlog'
if [ -x !!PREFIX!!/pgsql/bin/postmaster ]; then
su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/postmaster -i -S -o -F -D/var/db/pgsql/data 2>&1 >/var/db/pgsql/errlog'
echo -n ' pgsql'
}
fi

View File

@ -2,7 +2,8 @@
Now that PostgreSQL is installed, you should read the documentation and
implementation guides. These can be found at:
http://www.PostgreSQL.org/docs
/usr/local/share/doc/pgsql
http://www.PostgreSQL.org/docs
You may wish to subscribe to the PostgreSQL user-support mailing list.
Send an e-mail to pgsql-questions-request@postgresql.org with the
@ -11,3 +12,11 @@ text "subscribe" in the message body.
If you build PostgreSQL with TCL support, then you can use the
TCL/TK based database frontend "pgaccess" for database operations.
Add this line to /etc/rc.local if you wish to start PostgreSQL
automatically:
[ -x /usr/local/etc/rc.d/pgsql.sh ] && /usr/local/etc/rc.d/pgsql.sh
If you are upgrading previous version of this port, please note that
database directory has been moved from /usr/local/pgsql/data
to /var/db/pgsql/data.

View File

@ -19,7 +19,6 @@ pgsql/bin/pg_version
pgsql/bin/postgres
pgsql/bin/postmaster
pgsql/bin/psql
@unexec rm -f %D/pgsql/errlog
pgsql/include/access/attnum.h
pgsql/include/c.h
pgsql/include/commands/trigger.h
@ -243,7 +242,7 @@ share/doc/pgsql/userguide.ps
@dirrm pgsql/man/manl
@dirrm pgsql/man
@unexec echo "***"
@unexec echo "*** Please remove /usr/local/pgsql manually, if you don't"
@unexec echo "*** Please remove /var/db/pgsql manually, if you don't"
@unexec echo "*** want to keep existing databases. Also you should remove"
@unexec echo "*** pgsql entries from /etc/master.passwd and /etc/group"
@unexec echo "*** if won't install pgsql again."