1997-04-10 15:15:12 -04:00
|
|
|
# New ports collection makefile for: PostgreSQL
|
1998-11-22 16:33:20 -05:00
|
|
|
# Date created: November 13, 1998
|
1999-08-31 02:53:31 -04:00
|
|
|
# Whom: Marc G. Fournier <scrappy@FreeBSD.org>
|
1997-04-09 11:30:55 -04:00
|
|
|
#
|
1999-08-25 01:28:01 -04:00
|
|
|
# $FreeBSD$
|
1998-04-22 04:28:07 -04:00
|
|
|
#
|
1998-04-21 17:52:10 -04:00
|
|
|
|
2000-04-08 18:49:07 -04:00
|
|
|
PORTNAME= postgresql
|
2001-08-21 00:31:39 -04:00
|
|
|
PORTVERSION= 7.1.3
|
1997-04-09 11:30:55 -04:00
|
|
|
CATEGORIES= databases
|
2001-04-21 07:34:34 -04:00
|
|
|
MASTER_SITES= ftp://ftp.iodynamics.com/pub/mirror/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ftp.postgresql.org/pub/%SUBDIR%/ \
|
2000-06-20 01:08:07 -04:00
|
|
|
ftp://ftp.de.postgresql.org/%SUBDIR%/ \
|
|
|
|
ftp://ftp.digex.net/pub/packages/database/postgresql/%SUBDIR%/ \
|
2001-04-24 06:47:36 -04:00
|
|
|
ftp://ftp.sunet.se/pub/unix/databases/relational/postgresql/%SUBDIR%/ \
|
2001-05-27 10:31:05 -04:00
|
|
|
ftp://ftp.chg.ru/pub/databases/postgresql/%SUBDIR%/ \
|
|
|
|
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,misc/db/postgresql/&,}
|
2000-06-20 01:08:07 -04:00
|
|
|
MASTER_SITE_SUBDIR= source/v${PORTVERSION}
|
2001-04-21 07:34:34 -04:00
|
|
|
DISTFILES= ${PORTNAME}-base-${PORTVERSION}${EXTRACT_SUFX} \
|
|
|
|
${PORTNAME}-opt-${PORTVERSION}${EXTRACT_SUFX}
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
DISTFILES+= ${PORTNAME}-docs-${PORTVERSION}${EXTRACT_SUFX}
|
|
|
|
.endif
|
1997-10-03 10:13:36 -04:00
|
|
|
|
2000-12-08 01:12:19 -05:00
|
|
|
MAINTAINER= girgen@partitur.se
|
1997-04-10 15:15:12 -04:00
|
|
|
|
2001-04-21 07:34:34 -04:00
|
|
|
DIST_SUBDIR= postgresql
|
2000-12-10 22:22:07 -05:00
|
|
|
|
2000-06-20 01:08:07 -04:00
|
|
|
INSTALLS_SHLIB= YES
|
1997-10-04 18:43:26 -04:00
|
|
|
|
2000-04-17 16:56:06 -04:00
|
|
|
DOCDIR= ${WRKDIR}/${DISTNAME}/doc
|
2001-04-21 07:34:34 -04:00
|
|
|
PLIST= ${WRKDIR}/.PLIST.generated
|
1997-10-04 18:43:26 -04:00
|
|
|
|
1997-04-10 15:15:12 -04:00
|
|
|
USE_GMAKE= YES
|
1997-06-14 15:40:05 -04:00
|
|
|
HAS_CONFIGURE= YES
|
2001-04-21 07:34:34 -04:00
|
|
|
CONFIGURE_ARGS= --enable-locale \
|
|
|
|
--enable-syslog --with-CXX \
|
|
|
|
--sysconfdir=${PREFIX}/etc/postgresql \
|
2000-04-16 20:18:05 -04:00
|
|
|
--with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \
|
1999-06-05 15:55:24 -04:00
|
|
|
--with-libraries=${PREFIX}/lib
|
2001-04-21 07:34:34 -04:00
|
|
|
.if defined(WITH_OLD_LAYOUT)
|
|
|
|
CONFIGURE_ARGS+=--docdir=${PREFIX}/share/doc --includedir=${PREFIX}/pgsql/include \
|
|
|
|
--datadir=${PREFIX}/share \
|
|
|
|
--with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \
|
|
|
|
--prefix=${PREFIX}/pgsql
|
|
|
|
PG_PREFIX= pgsql/
|
|
|
|
PG_INCLUDE= pgsql/include
|
|
|
|
LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib
|
|
|
|
MANPREFIX= ${PREFIX}/pgsql
|
|
|
|
.else
|
|
|
|
GNU_CONFIGURE= YES
|
|
|
|
CONFIGURE_ARGS+=--docdir=${PREFIX}/share/doc --includedir=${PREFIX}/include/pgsql
|
|
|
|
PG_PREFIX=""
|
|
|
|
PG_INCLUDE= include/pgsql
|
|
|
|
.endif
|
|
|
|
|
2001-04-25 13:17:56 -04:00
|
|
|
PLIST_SUB= PG_PREFIX="${PG_PREFIX}" PG_INCLUDE="${PG_INCLUDE}" WITH_TCL="${WITH_TCL}"
|
1997-04-10 15:15:12 -04:00
|
|
|
|
2000-05-24 10:11:19 -04:00
|
|
|
MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \
|
2001-04-21 07:34:34 -04:00
|
|
|
dropuser.1 ecpg.1 initdb.1 initlocation.1 ipcclean.1 pg_config.1 \
|
|
|
|
pg_ctl.1 pg_dump.1 pg_dumpall.1 pg_passwd.1 pg_restore.1 \
|
|
|
|
pgaccess.1 pgtclsh.1 pgtksh.1 postgres.1 postmaster.1 psql.1 \
|
2000-05-24 10:11:19 -04:00
|
|
|
vacuumdb.1
|
|
|
|
MANL= abort.l alter_group.l alter_table.l alter_user.l \
|
2001-04-21 07:34:34 -04:00
|
|
|
begin.l checkpoint.l close.l cluster.l comment.l commit.l copy.l \
|
2000-05-24 10:11:19 -04:00
|
|
|
create_aggregate.l create_constraint_trigger.l \
|
|
|
|
create_database.l create_function.l create_group.l \
|
|
|
|
create_index.l create_language.l create_operator.l \
|
|
|
|
create_rule.l create_sequence.l create_table.l \
|
|
|
|
create_table_as.l create_trigger.l create_type.l \
|
|
|
|
create_user.l create_view.l declare.l delete.l \
|
|
|
|
drop_aggregate.l drop_database.l drop_function.l \
|
|
|
|
drop_group.l drop_index.l drop_language.l \
|
|
|
|
drop_operator.l drop_rule.l drop_sequence.l \
|
1998-04-21 17:52:10 -04:00
|
|
|
drop_table.l drop_trigger.l drop_type.l drop_user.l \
|
2000-05-24 10:11:19 -04:00
|
|
|
drop_view.l end.l explain.l fetch.l grant.l insert.l \
|
|
|
|
listen.l load.l lock.l move.l notify.l reindex.l \
|
|
|
|
reset.l revoke.l rollback.l select.l select_into.l \
|
2001-04-21 07:34:34 -04:00
|
|
|
set.l set_constraints.l set_transaction.l show.l \
|
|
|
|
truncate.l unlisten.l update.l vacuum.l
|
1997-04-09 11:30:55 -04:00
|
|
|
|
2000-12-10 22:22:07 -05:00
|
|
|
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
|
|
|
|
WRKDIR="${WRKDIR}" \
|
|
|
|
FILESDIR="${FILESDIR}" \
|
|
|
|
TOUCH="${TOUCH}" \
|
|
|
|
MKDIR="${MKDIR}" \
|
|
|
|
NO_OPENSSL="${NO_OPENSSL}" \
|
|
|
|
DISTNAME="${DISTNAME}"
|
|
|
|
|
2001-06-12 23:16:57 -04:00
|
|
|
# We must .include here because we need the Makefile.inc @ pre-install
|
|
|
|
# to determine the correct plist.
|
2001-05-27 08:10:49 -04:00
|
|
|
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
|
|
|
|
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
|
2001-07-27 07:56:39 -04:00
|
|
|
.else
|
|
|
|
# make utility targets like depends and describe happy
|
|
|
|
LIB_DEPENDS= tcl83:${PORTSDIR}/lang/tcl83 \
|
|
|
|
tk83:${PORTSDIR}/x11-toolkits/tk83
|
2001-05-27 08:10:49 -04:00
|
|
|
.endif
|
|
|
|
|
2001-06-12 23:16:57 -04:00
|
|
|
pre-everything:
|
|
|
|
@ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql
|
|
|
|
|
1997-04-09 11:30:55 -04:00
|
|
|
pre-install:
|
2001-04-21 07:34:34 -04:00
|
|
|
@ ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PORTNAME} PRE-INSTALL
|
2001-07-27 07:56:39 -04:00
|
|
|
.if !defined(BATCH)
|
2001-04-21 07:34:34 -04:00
|
|
|
# remind folks twice for a while, so they really don't miss the layout shift
|
|
|
|
@ ${SED} "s|/usr/local|${PREFIX}|g" < ${PKGMESSAGE} | head -n 25 | more -e
|
1997-12-04 06:44:52 -05:00
|
|
|
.endif
|
2001-04-21 07:34:34 -04:00
|
|
|
@ ${CP} ${PKGDIR}/pkg-plist ${PLIST}
|
|
|
|
.if defined(WITHOUT_MULTIBYTE)
|
|
|
|
@${CP} ${PLIST} ${PLIST}.nomulti ;\
|
|
|
|
${GREP} -v bin/pg_encoding ${PLIST}.nomulti > ${PLIST}
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_TCL)
|
|
|
|
@ ${CP} ${PLIST} ${PLIST}.notcl ;\
|
|
|
|
${CAT} ${PKGDIR}/${TCL_PLIST} ${PLIST}.notcl > ${PLIST} ;\
|
|
|
|
${RM} ${PLIST}.notcl
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_ODBC)
|
|
|
|
@ ${CP} ${PLIST} ${PLIST}.noodbc ;\
|
|
|
|
${CAT} ${PKGDIR}/pkg-plist.odbc ${PLIST}.noodbc > ${PLIST} ;\
|
|
|
|
${RM} ${PLIST}.noodbc
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_JDBC)
|
|
|
|
@ ${CP} ${PLIST} ${PLIST}.nojdbc ;\
|
|
|
|
${CAT} ${PKGDIR}/pkg-plist.jdbc ${PLIST}.nojdbc > ${PLIST} ;\
|
|
|
|
${RM} ${PLIST}.nojdbc
|
|
|
|
.endif
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${PLIST}
|
2000-12-10 22:22:07 -05:00
|
|
|
.endif
|
1997-04-09 11:30:55 -04:00
|
|
|
|
|
|
|
post-install:
|
2001-04-21 07:34:34 -04:00
|
|
|
# install shell defaults for pgsql user
|
|
|
|
.for i in profile cshrc
|
|
|
|
@ ${SED} "s|%%PREFIX%%|${PREFIX}|g; s|%%PG_PREFIX%%|${PG_PREFIX}|g" \
|
|
|
|
< ${FILESDIR}/dot.$i.in \
|
|
|
|
> ${PREFIX}/share/postgresql/dot.$i.dist; \
|
|
|
|
${CP} ${PREFIX}/share/postgresql/dot.$i.dist ~pgsql/; \
|
|
|
|
if [ ! -f ~pgsql/.$i ]; then \
|
|
|
|
${CP} ${PREFIX}/share/postgresql/dot.$i.dist ~pgsql/.$i; \
|
1997-06-14 15:40:05 -04:00
|
|
|
fi
|
2001-04-21 07:34:34 -04:00
|
|
|
.endfor
|
|
|
|
@ ${SED} -e "s|%%PREFIX%%|${PREFIX}|g; s|%%PG_PREFIX%%|${PG_PREFIX}|g" \
|
|
|
|
< ${FILESDIR}/pgsql.sh.tmpl \
|
2001-03-15 14:26:26 -05:00
|
|
|
> ${PREFIX}/etc/rc.d/010.pgsql.sh
|
|
|
|
@ ${CHMOD} 554 ${PREFIX}/etc/rc.d/010.pgsql.sh
|
2001-06-01 02:05:18 -04:00
|
|
|
@ ${CHOWN} root:pgsql ${PREFIX}/etc/rc.d/010.pgsql.sh
|
2000-04-16 20:18:05 -04:00
|
|
|
.if defined(WITH_TCL)
|
2000-12-10 22:22:07 -05:00
|
|
|
# Preparing a loadable TCL-package (pkgIndex.tcl)
|
2001-04-25 13:17:56 -04:00
|
|
|
@${MKDIR} ${PREFIX}/lib/tcl${WITH_TCL}/Pgtcl1.3
|
2001-04-21 07:34:34 -04:00
|
|
|
@${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/pkgIndex.tcl.in \
|
2001-04-25 13:17:56 -04:00
|
|
|
> ${PREFIX}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl
|
1999-06-29 16:21:49 -04:00
|
|
|
.endif
|
2000-04-16 20:18:05 -04:00
|
|
|
.if defined(WITH_JDBC)
|
2000-06-20 01:08:07 -04:00
|
|
|
@ ${MKDIR} -m 0555 ${PREFIX}/share/java/classes
|
2001-04-23 00:13:02 -04:00
|
|
|
@ ${INSTALL_DATA} ${WRKSRC}/src/interfaces/jdbc/jars/postgresql.jar \
|
2000-05-24 10:11:19 -04:00
|
|
|
${PREFIX}/share/java/classes/postgresql.jar
|
1999-06-29 16:21:49 -04:00
|
|
|
@ ${ECHO_MSG} "---------------------------------------------------------"
|
2000-05-24 10:11:19 -04:00
|
|
|
@ ${ECHO_MSG} "Putting postgresql.jar in"
|
|
|
|
@ ${ECHO_MSG} "${PREFIX}/share/java/classes/postgresql.jar"
|
1999-06-29 16:21:49 -04:00
|
|
|
@ ${ECHO_MSG} "Add this to your CLASSPATH!"
|
2000-05-25 05:35:25 -04:00
|
|
|
@ ${ECHO_MSG} "ALSO NOTE: path inside jar file modified from 6.5.x:"
|
|
|
|
@ ${ECHO_MSG} " 'postgresql.*' -> 'org.postgresql.*'!"
|
1999-06-29 16:21:49 -04:00
|
|
|
@ ${ECHO_MSG} "---------------------------------------------------------"
|
|
|
|
.if !defined(NOPORTDOCS)
|
2001-04-21 07:34:34 -04:00
|
|
|
@ ${MKDIR} -m 0555 ${PREFIX}/share/examples/postgresql ;\
|
|
|
|
cd ${WRKSRC}/src/interfaces/jdbc/example ;\
|
|
|
|
pax -rw . ${PREFIX}/share/examples/postgresql
|
|
|
|
.for i in README Implementation
|
|
|
|
@ ${INSTALL_DATA} ${WRKSRC}/src/interfaces/jdbc/$i \
|
|
|
|
${PREFIX}/share/examples/postgresql
|
|
|
|
.endfor
|
|
|
|
@ ${ECHO_MSG} "---------------------------------------------------------------"
|
|
|
|
@ ${ECHO_MSG} "Putting java examples into ${PREFIX}/share/examples/postgresql"
|
|
|
|
@ ${ECHO_MSG} "---------------------------------------------------------------"
|
1997-06-14 17:10:42 -04:00
|
|
|
.endif
|
1997-04-09 11:30:55 -04:00
|
|
|
.endif
|
1999-07-21 03:16:27 -04:00
|
|
|
.if !defined(DEBUG_FLAGS)
|
2001-04-21 07:34:34 -04:00
|
|
|
.for file in ecpg pg_dump pg_id pg_passwd pg_restore postgres psql
|
|
|
|
@ strip ${PREFIX}/${PG_PREFIX}bin/${file}
|
1999-06-29 16:21:49 -04:00
|
|
|
.endfor
|
1999-07-21 03:16:27 -04:00
|
|
|
.endif
|
2001-04-21 07:34:34 -04:00
|
|
|
# information overload mode activated, sorry about this... ;-)
|
|
|
|
@ ${CAT} ${FILESDIR}/post-install-notes ${PKGMESSAGE} |\
|
|
|
|
${SED} "s|/usr/local|${PREFIX}|g" |\
|
|
|
|
tee ${PREFIX}/share/postgresql/post-install-notes ;\
|
|
|
|
${INSTALL_DATA} ${PREFIX}/share/postgresql/post-install-notes ~pgsql/. ;\
|
|
|
|
${CHOWN} -R pgsql:pgsql ~pgsql/.
|
|
|
|
.if defined(WITH_OLD_LAYOUT)
|
|
|
|
@ ${CHOWN} root:pgsql ${PREFIX}/${PG_PREFIX}lib
|
|
|
|
.endif
|
1997-04-09 11:30:55 -04:00
|
|
|
|
2000-12-10 22:22:07 -05:00
|
|
|
post-clean:
|
|
|
|
@ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
|
|
|
|
|
2001-04-21 07:34:34 -04:00
|
|
|
post-extract: ${POSTEXTRACT}
|
|
|
|
|
1997-04-09 11:30:55 -04:00
|
|
|
.include <bsd.port.mk>
|