openbsd-ports/geo/postgis/Makefile
eric d2114b762c PostGIS adds support for geographic objects to the PostgreSQL
object-relational database.  In effect, PostGIS "spatially enables"
the PostgreSQL server, allowing it to be used as a backend spatial
database for geographic information systems (GIS), much like ESRI's
SDE or Oracle's Spatial extension.  PostGIS follows the OpenGIS
"Simple Features Specification for SQL" and has been certified as
compliant with the "Types and Functions" profile.

ok simon@
2007-12-08 19:47:47 +00:00

61 lines
1.6 KiB
Makefile

# $OpenBSD: Makefile,v 1.1.1.1 2007/12/08 19:47:47 eric Exp $
SHARED_ONLY= Yes
COMMENT= geographic objects support for PostgreSQL
DISTNAME= postgis-1.3.2
CATEGORIES= geo databases
HOMEPAGE= http://www.postgis.org/
MAINTAINER= Eric Faurot <eric@openbsd.org>
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${HOMEPAGE}download/
WANTLIB= c
MODULES= converters/libiconv
LIB_DEPENDS= proj::devel/proj \
pq:postgresql-client-*:databases/postgresql \
geos_c::geo/geos
RUN_DEPENDS= :postgresql-server-*:databases/postgresql,-server
BUILD_DEPENDS= ${RUN_DEPENDS}
USE_GMAKE= Yes
CONFIGURE_ENV= PGXS=1 \
LDFLAGS=-L${LOCALBASE}/lib \
CPPFLAGS=-I${LOCALBASE}/include
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= --with-pgsql-src=${LOCALBASE}/lib/postgresql/pgxs \
--enable-autoconf \
--with-proj \
--with-geos \
--datadir=${PREFIX}/share/postgresql/contrib \
--libdir=${PREFIX}/lib/postgresql
post-install:
${INSTALL_SCRIPT_DIR} ${PREFIX}/libexec/postgis/utils
${INSTALL_SCRIPT} ${WRKSRC}/utils/*.pl ${PREFIX}/libexec/postgis/utils
${INSTALL_DATA} ${WRKSRC}/utils/README ${PREFIX}/libexec/postgis/utils
cd ${WRKSRC}/doc && ${MAKE_PROGRAM} install
###
### Note on running regress
###
# - make sure you do not have a postgresql server currently running
# - as user _postgresql, in another terminal, run:
# $ mkdir /tmp/pg && initdb -D /tmp/pg -U postgres && postgres -D /tmp/pg
# - run make regress
do-regress: install
cd ${WRKSRC}/regress && PGUSER=postgres ${MAKE_PROGRAM}
.include <bsd.port.mk>