1997-04-10 15:15:12 -04:00
|
|
|
# New ports collection makefile for: PostgreSQL
|
1998-11-22 16:33:20 -05:00
|
|
|
# Version required: 6.4
|
|
|
|
# Date created: November 13, 1998
|
1997-06-14 15:40:05 -04:00
|
|
|
# Whom: Marc G. Fournier <scrappy@FreeBSD.ORG>
|
1997-04-09 11:30:55 -04:00
|
|
|
#
|
1998-11-24 00:09:06 -05:00
|
|
|
# $Id: Makefile,v 1.29 1998/11/22 21:33:19 scrappy Exp $
|
1998-04-22 04:28:07 -04:00
|
|
|
#
|
1998-04-21 17:52:10 -04:00
|
|
|
|
1998-11-22 16:33:20 -05:00
|
|
|
DISTNAME= postgresql-v6.4
|
1998-11-24 00:09:06 -05:00
|
|
|
PKGNAME= postgresql-6.4
|
1997-04-09 11:30:55 -04:00
|
|
|
CATEGORIES= databases
|
1998-04-21 17:52:10 -04:00
|
|
|
MASTER_SITES= ftp://ftp.postgresql.org/pub/
|
1997-10-03 10:13:36 -04:00
|
|
|
|
1997-06-14 15:40:05 -04:00
|
|
|
MAINTAINER= andreas@FreeBSD.ORG
|
1997-04-10 15:15:12 -04:00
|
|
|
|
1997-10-04 18:43:26 -04:00
|
|
|
# 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)
|
1998-11-22 16:33:20 -05:00
|
|
|
TCL_INCDIR= ${PREFIX}/include/tcl8.0
|
|
|
|
TK_INCDIR= ${PREFIX}/include/tk8.0
|
|
|
|
MAKE_ENV= USE_TCL=true TCL_INCDIR=${TCL_INCDIR}
|
|
|
|
LIB_DEPENDS= tcl80.1:${PORTSDIR}/lang/tcl80 tk80.1:${PORTSDIR}/x11-toolkits/tk80
|
|
|
|
WITH_TCL= --with-tcl --with-tclconfig="${PREFIX}/lib/tcl8.0 ${PREFIX}/lib/tk8.0"
|
1997-10-04 18:43:26 -04:00
|
|
|
.endif
|
|
|
|
|
1997-04-10 15:15:12 -04:00
|
|
|
NO_PACKAGE= "Requires pgsql uid"
|
1997-06-14 15:40:05 -04:00
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}/src
|
1997-10-04 18:43:26 -04:00
|
|
|
|
1997-04-10 15:15:12 -04:00
|
|
|
USE_GMAKE= YES
|
1997-10-04 18:43:26 -04:00
|
|
|
MAKEFILE= GNUmakefile
|
1997-06-14 15:40:05 -04:00
|
|
|
HAS_CONFIGURE= YES
|
1997-12-23 20:21:47 -05:00
|
|
|
CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \
|
1997-06-14 15:40:05 -04:00
|
|
|
--enable-locale \
|
1998-04-21 17:52:10 -04:00
|
|
|
--with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \
|
1998-11-22 16:33:20 -05:00
|
|
|
--with-includes="/usr/local/include ${TCL_INCDIR} ${TK_INCDIR}" ${WITH_TCL} \
|
1998-04-21 17:52:10 -04:00
|
|
|
--with-libraries=/usr/local/lib
|
1997-04-10 15:15:12 -04:00
|
|
|
|
1998-11-22 16:33:20 -05:00
|
|
|
INSTALL_TARGET= install install-man
|
|
|
|
|
1997-06-14 15:40:05 -04:00
|
|
|
MAN1= cleardbdir.1 createdb.1 createuser.1 destroydb.1 \
|
1998-11-22 16:33:20 -05:00
|
|
|
destroyuser.1 ecpg.1 initdb.1 initlocation.1 \
|
|
|
|
ipcclean.1 pg_dump.1 pg_dumpall.1 pg_passwd.1 \
|
|
|
|
pg_upgrade.1 postgres.1 postmaster.1 psql.1
|
|
|
|
MAN3= catalogs.3 libpq.3
|
|
|
|
MAN5= pg_hba.conf.5
|
1998-04-21 17:52:10 -04:00
|
|
|
MANL= abort.l alter_table.l alter_user.l begin.l close.l cluster.l \
|
1997-06-14 15:40:05 -04:00
|
|
|
commit.l copy.l create_aggregate.l create_database.l \
|
1998-04-21 17:52:10 -04:00
|
|
|
create_function.l create_index.l create_language.l \
|
|
|
|
create_operator.l create_rule.l create_sequence.l \
|
|
|
|
create_table.l create_trigger.l create_type.l create_user.l \
|
|
|
|
create_version.l create_view.l declare.l delete.l drop.l \
|
|
|
|
drop_aggregate.l drop_database.l drop_function.l drop_index.l \
|
|
|
|
drop_language.l drop_operator.l drop_rule.l drop_sequence.l \
|
|
|
|
drop_table.l drop_trigger.l drop_type.l drop_user.l \
|
|
|
|
drop_view.l end.l explain.l fetch.l grant.l insert.l listen.l \
|
1998-11-22 16:33:20 -05:00
|
|
|
load.l lock.l move.l notify.l reset.l revoke.l rollback.l \
|
|
|
|
select.l set.l show.l sql.l update.l vacuum.l
|
1997-10-03 10:13:36 -04:00
|
|
|
|
1997-04-10 15:15:12 -04:00
|
|
|
MANPREFIX= ${PREFIX}/pgsql
|
1997-04-09 11:30:55 -04:00
|
|
|
|
1997-10-04 18:43:26 -04:00
|
|
|
pre-fetch:
|
|
|
|
.if !defined(USE_TCL)
|
|
|
|
@${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:"
|
|
|
|
@${ECHO_MSG} " make USE_TCL=yes"
|
|
|
|
.else
|
|
|
|
@${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"."
|
|
|
|
.endif
|
|
|
|
|
1997-10-03 10:13:36 -04:00
|
|
|
post-build:
|
|
|
|
@ ${ECHO} "------------------------------------------------------------"
|
|
|
|
@ ${ECHO} "Dump existing databases, before installing new db version !!"
|
|
|
|
@ ${ECHO} "Detailed instructions, see INSTALL file under ${WRKDIR}... "
|
|
|
|
@ ${ECHO} "------------------------------------------------------------"
|
|
|
|
|
1997-04-09 11:30:55 -04:00
|
|
|
pre-install:
|
1997-12-04 06:44:52 -05:00
|
|
|
.if defined(PACKAGE_BUILDING)
|
|
|
|
/bin/rm -rf ${PREFIX}/pgsql
|
|
|
|
.endif
|
1997-06-14 15:40:05 -04:00
|
|
|
@ ${MKDIR} ${PREFIX}/pgsql
|
1997-10-03 10:13:36 -04:00
|
|
|
@ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser
|
1997-04-09 11:30:55 -04:00
|
|
|
|
|
|
|
post-install:
|
1997-06-14 15:40:05 -04:00
|
|
|
@ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \
|
1997-10-03 10:13:36 -04:00
|
|
|
${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \
|
1997-06-14 15:40:05 -04:00
|
|
|
> ${PREFIX}/pgsql/.profile; \
|
1997-10-03 10:13:36 -04:00
|
|
|
${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/bin" \
|
|
|
|
>> ${PREFIX}/pgsql/.profile; \
|
|
|
|
${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \
|
1997-06-14 15:40:05 -04:00
|
|
|
>> ${PREFIX}/pgsql/.profile; \
|
1997-10-05 17:00:49 -04:00
|
|
|
${ECHO} "# note: PGDATA overwrites the -D startup option" \
|
|
|
|
>> ${PREFIX}/pgsql/.profile; \
|
1997-10-03 10:13:36 -04:00
|
|
|
${ECHO} "PGDATA=${PREFIX}/pgsql/data" \
|
1997-06-14 15:40:05 -04:00
|
|
|
>> ${PREFIX}/pgsql/.profile; \
|
1997-10-04 19:38:59 -04:00
|
|
|
${ECHO} "DISPLAY=:0" \
|
|
|
|
>> ${PREFIX}/pgsql/.profile; \
|
|
|
|
${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \
|
1997-06-14 15:40:05 -04:00
|
|
|
>> ${PREFIX}/pgsql/.profile; \
|
1997-10-03 10:13:36 -04:00
|
|
|
${ECHO} "# if you want to make regression tests use this TZ" \
|
|
|
|
>> ${PREFIX}/pgsql/.profile; \
|
|
|
|
${ECHO} "#TZ=PST8PDT" \
|
|
|
|
>> ${PREFIX}/pgsql/.profile; \
|
|
|
|
${ECHO} "#export TZ" \
|
1997-06-14 15:40:05 -04:00
|
|
|
>> ${PREFIX}/pgsql/.profile; \
|
|
|
|
fi
|
1997-06-14 17:10:42 -04:00
|
|
|
@ chown -R pgsql:pgsql ${PREFIX}/pgsql
|
1997-10-03 10:13:36 -04:00
|
|
|
@ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...'
|
1998-10-15 22:42:29 -04:00
|
|
|
@ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib
|
1997-06-14 15:40:05 -04:00
|
|
|
@ su -l pgsql -c '${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data'
|
1997-10-03 10:13:36 -04:00
|
|
|
@ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \
|
|
|
|
> ${PREFIX}/etc/rc.d/pgsql.sh
|
|
|
|
@ chmod 554 ${PREFIX}/etc/rc.d/pgsql.sh
|
|
|
|
@ chown root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh
|
1997-06-14 15:40:05 -04:00
|
|
|
@ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql
|
1997-06-14 17:10:42 -04:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${MKDIR} ${PREFIX}/share/doc/pgsql
|
1997-10-03 10:13:36 -04:00
|
|
|
${CP} -r ${WRKDIR}/${DISTNAME}/doc/* ${PREFIX}/share/doc/pgsql
|
1997-06-14 17:10:42 -04:00
|
|
|
.endif
|
1997-04-10 15:15:12 -04:00
|
|
|
.if !defined(BATCH)
|
1997-06-14 15:40:05 -04:00
|
|
|
@ more -e ${FILESDIR}/post-install-notes
|
1997-04-09 11:30:55 -04:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|