2000-08-25 11:34:13 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.35 2000/08/25 15:34:13 brad Exp $
|
1999-04-01 01:20:02 -05:00
|
|
|
# $FreeBSD: Makefile,v 1.25 1998/04/22 08:28:07 asami Exp $
|
1997-11-20 15:34:05 -05:00
|
|
|
|
2000-08-25 11:34:13 -04:00
|
|
|
VERSION= 7.0.2
|
|
|
|
DISTNAME= postgresql-${VERSION}
|
1997-11-20 15:34:05 -05:00
|
|
|
CATEGORIES= databases
|
2000-08-25 11:34:13 -04:00
|
|
|
NEED_VERSION= 1.320
|
2000-05-23 12:31:41 -04:00
|
|
|
MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \
|
|
|
|
ftp://gd.tuwien.ac.at/db/www.postgresql.org/pub/%SUBDIR%/ \
|
|
|
|
ftp://ftp.cwb.fnn.net/pub/Linux/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://looking-glass.usask.ca/pub/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://linux.netfirm.net/pub/Linux/PostgreSQL/%SUBDIR%/ \
|
|
|
|
ftp://sunsite.uniandes.edu.co/pub/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ftp.fi.muni.cz/pub/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ftp.sunsite.auc.dk/mirrors/www.postgresql.org/%SUBDIR%/ \
|
|
|
|
ftp://postgresql.matrix.fi/%SUBDIR%/ \
|
|
|
|
ftp://ftp.fr.postgresql.org/%SUBDIR%/ \
|
|
|
|
ftp://ftp.de.postgresql.org/%SUBDIR%/ \
|
|
|
|
ftp://ftp.ntua.gr/pub/databases/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ftp.postgreSQL.uli.it/%SUBDIR%/ \
|
|
|
|
ftp://mirror.nucba.ac.jp/mirror/postgresql/pub/%SUBDIR%/ \
|
|
|
|
ftp://ring.ip-kyoto.ad.jp/pub/misc/db/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ring.crl.go.jp/pub/misc/db/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ring.saitama-u.ac.jp/pub/misc/db/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ring.astem.or.jp/pub/misc/db/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ring.exp.fujixerox.co.jp/pub/misc/db/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ring.jah.ne.jp/pub/misc/db/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ring.etl.go.jp.jp/pub/misc/db/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ring.asahi-net.or.jp/pub/misc/db/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ring.so-net.ne.jp/pub/misc/db/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ring.aist.go.jp/pub/misc/db/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://jordan.ce.yeungnam.ac.kr/pub/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ftp.kr.postgresql.org/pub/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://postgresql.linux.com.mx/pub/postgresql/pub/%SUBDIR%/ \
|
|
|
|
ftp://postgresql.godzone.net.nz/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://postgresql.iphil.net/%SUBDIR%/ \
|
|
|
|
ftp://ftp.sai.msu.su/unix/database/pgsql/%SUBDIR%/ \
|
|
|
|
ftp://www.sk.postgresql.org/pub/linux/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ftp.linux.co.za/pub/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ftp.sunet.se/pub/unix/databases/relational/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ftp.danyk.ch/postgres/%SUBDIR%/ \
|
|
|
|
ftp://ftp.ccit.edu.tw/packages/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ftp.siamu.ac.th/pub/pub2/ftp.postgresql.org/%SUBDIR%/ \
|
|
|
|
ftp://postgresql.rmplc.co.uk/pub/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ftp.scyph.org/pub/Mirrors/ftp.postgresql.org/%SUBDIR%/ \
|
|
|
|
ftp://mars.capital-data.com/pub/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ftp.digex.net/pub/packages/database/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://ftp.iodynamics.com/pub/mirror/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://postgresql.nextpath.com/pub/postgresql/%SUBDIR%/ \
|
|
|
|
ftp://www.ndesign.com.ua/pub/psql/%SUBDIR%/ \
|
|
|
|
ftp://postgresql.netafric.ci/%SUBDIR%/
|
2000-08-25 11:34:13 -04:00
|
|
|
MASTER_SITE_SUBDIR= v${VERSION}
|
|
|
|
DISTFILES= postgresql-${VERSION}.base.tar.gz \
|
|
|
|
postgresql-${VERSION}.support.tar.gz \
|
|
|
|
postgresql-${VERSION}.docs.tar.gz
|
|
|
|
DIST_SUBDIR= postgresql
|
|
|
|
|
|
|
|
HOMEPAGE= http://www.postgresql.org/
|
|
|
|
|
|
|
|
MAINTAINER= pvk@openbsd.ru
|
2000-05-23 12:31:41 -04:00
|
|
|
|
2000-08-25 11:34:13 -04:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
2000-05-23 12:31:41 -04:00
|
|
|
|
2000-08-25 11:34:13 -04:00
|
|
|
FAKE_FLAGS= POSTGRESDIR="${WRKINST}${PREFIX}/pgsql"
|
|
|
|
|
|
|
|
USE_GMAKE= yes
|
|
|
|
MAKE_FILE= GNUmakefile
|
|
|
|
CONFIGURE_STYLE= simple
|
|
|
|
CONFIGURE_ARGS= --prefix="${PREFIX}/pgsql" --enable-locale \
|
|
|
|
--with-template=openbsd --with-libraries="${PREFIX}/lib" \
|
|
|
|
--srcdir="${WRKSRC}"
|
|
|
|
CONFIGURE_ENV= POSTGRESDIR="${PREFIX}/pgsql"
|
|
|
|
|
|
|
|
FLAVORS= tcl
|
2000-05-23 12:31:41 -04:00
|
|
|
FLAVOR?=
|
|
|
|
|
2000-08-25 11:34:13 -04:00
|
|
|
MULTI_PACKAGES= -docs
|
|
|
|
SUBPACKAGE?=
|
|
|
|
|
2000-05-23 12:31:41 -04:00
|
|
|
.if ${FLAVOR:L:Mtcl}
|
|
|
|
LIB_DEPENDS= tcl83::lang/tcl/8.3 tk83::x11/tk/8.3
|
|
|
|
TCL_INCDIR= ${LOCALBASE}/include/tcl8.3
|
|
|
|
TK_INCDIR= ${LOCALBASE}/include/tk8.3
|
2000-08-25 11:34:13 -04:00
|
|
|
MAKE_ENV= USE_TCL=true TCL_INCDIR="${TCL_INCDIR}" TK_INCDIR="${TK_INCDIR}"
|
|
|
|
CONFIGURE_ARGS+= --with-tcl \
|
|
|
|
--with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" \
|
|
|
|
--with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}"
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --with-includes="${PREFIX}/include"
|
1998-05-06 12:55:37 -04:00
|
|
|
.endif
|
1997-11-20 15:34:05 -05:00
|
|
|
|
2000-05-23 12:31:41 -04:00
|
|
|
DOCDIR= ${WRKSRC}/../doc
|
1997-11-20 15:34:05 -05:00
|
|
|
|
2000-05-23 12:31:41 -04:00
|
|
|
DOCS= ${WRKSRC}/../COPYRIGHT ${WRKSRC}/../HISTORY \
|
|
|
|
${WRKSRC}/../INSTALL ${WRKSRC}/../README \
|
2000-08-25 11:34:13 -04:00
|
|
|
${WRKSRC}/../README.OpenBSD ${WRKSRC}/../register.txt \
|
|
|
|
${DOCDIR}/FAQ ${DOCDIR}/FAQ_DEV ${DOCDIR}/README.Charsets \
|
2000-05-23 12:31:41 -04:00
|
|
|
${DOCDIR}/README.fsync ${DOCDIR}/README.inet \
|
|
|
|
${DOCDIR}/README.locale ${DOCDIR}/README.mb \
|
|
|
|
${DOCDIR}/README.mb.jp ${DOCDIR}/TODO
|
1999-11-10 21:24:29 -05:00
|
|
|
|
|
|
|
PGUSER= pgsql
|
|
|
|
PGBIN= ${PREFIX}/pgsql/bin
|
|
|
|
PGLIB= ${PREFIX}/pgsql/lib
|
|
|
|
PGDATA= /var/pgsql/data
|
|
|
|
|
2000-08-25 11:34:13 -04:00
|
|
|
WRKDIST= ${WRKDIR}/${DISTNAME}/src
|
|
|
|
|
2000-05-23 12:31:41 -04:00
|
|
|
.if ${FLAVOR:L:Mtcl}
|
1999-12-07 06:47:47 -05:00
|
|
|
post-patch:
|
2000-02-10 20:09:59 -05:00
|
|
|
@mv ${WRKSRC}/bin/pgaccess/main.tcl \
|
1999-12-07 06:47:47 -05:00
|
|
|
${WRKSRC}/bin/pgaccess/main.tcl.orig
|
2000-05-23 12:31:41 -04:00
|
|
|
@sed -e "s=wish=${LOCALBASE}/bin/wish8.3=" \
|
1999-12-07 06:47:47 -05:00
|
|
|
${WRKSRC}/bin/pgaccess/main.tcl.orig \
|
|
|
|
> ${WRKSRC}/bin/pgaccess/main.tcl
|
|
|
|
.endif
|
|
|
|
|
2000-05-23 12:31:41 -04:00
|
|
|
post-build:
|
|
|
|
@mkdir -p ${WRKBUILD}/pgwrap
|
|
|
|
@cp ${FILESDIR}/pgwrap.c ${FILESDIR}/pgwrap.h ${WRKBUILD}/pgwrap
|
2000-02-10 20:09:59 -05:00
|
|
|
@sed -e "s,@PGUSER@,${PGUSER},g" -e "s,@PGBIN@,${PGBIN},g" \
|
1999-11-10 21:24:29 -05:00
|
|
|
-e "s,@PGLIB@,${PGLIB},g" -e "s,@PGDATA@,${PGDATA},g" \
|
|
|
|
-e "s,@PREFIX@,${PREFIX},g" < ${FILESDIR}/Makefile.in \
|
2000-05-23 12:31:41 -04:00
|
|
|
> ${WRKBUILD}/pgwrap/Makefile
|
2000-02-10 20:09:59 -05:00
|
|
|
@sed -e "s,@PREFIX@,${PREFIX},g" \
|
1999-11-10 21:24:29 -05:00
|
|
|
< ${FILESDIR}/README.OpenBSD.in \
|
2000-05-23 12:31:41 -04:00
|
|
|
> ${WRKSRC}/../README.OpenBSD
|
|
|
|
(cd ${WRKBUILD}/pgwrap; ${MAKE} depend && ${MAKE})
|
1999-11-10 21:24:29 -05:00
|
|
|
|
|
|
|
post-install:
|
2000-05-23 12:31:41 -04:00
|
|
|
${INSTALL_PROGRAM} ${WRKBUILD}/pgwrap/pgwrap ${PREFIX}/bin
|
2000-08-25 11:34:13 -04:00
|
|
|
@cd ${DOCDIR} && ${MAKE_PROGRAM} POSTGRESDIR="${PREFIX}/pgsql" man
|
1999-11-10 21:24:29 -05:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pgsql
|
2000-05-23 12:31:41 -04:00
|
|
|
${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/pgsql
|
2000-08-25 11:34:13 -04:00
|
|
|
@cd ${DOCDIR} && ${MAKE_PROGRAM} PGDOCS="${PREFIX}/share/doc/pgsql" all
|
2000-05-23 12:31:41 -04:00
|
|
|
${INSTALL_DATA} ${DOCDIR}/*.ps* ${PREFIX}/share/doc/pgsql
|
1999-11-10 21:24:29 -05:00
|
|
|
|
1997-11-20 15:34:05 -05:00
|
|
|
.include <bsd.port.mk>
|
2000-05-23 12:31:41 -04:00
|
|
|
|
2000-08-25 11:34:13 -04:00
|
|
|
.if ${SUBPACKAGE} == "-docs"
|
|
|
|
PKGNAME:=postgresql-docs-${VERSION}
|
|
|
|
.endif
|
|
|
|
|
2000-05-23 12:31:41 -04:00
|
|
|
.if ${FLAVOR:L:Mtcl} && !defined(NO_SHARED_LIBS)
|
|
|
|
SED_PLIST+=-e '/%%SHARED-tcl%%/r${PKGDIR}/PFRAG.tcl.shared' -e '//d'
|
|
|
|
.else if ${FLAVOR:L:Mtcl} && defined(NO_SHARED_LIBS) && \
|
|
|
|
${NO_SHARED_LIBS:U} == YES
|
|
|
|
SED_PLIST+=-e '/%%SHARED-tcl%%/d'
|
|
|
|
.endif
|