update Sat Jan 16 06:37:00 PST 2010
[pkgsrc.git] / databases / postgresql83-server / Makefile
CommitLineData
9a6a8611 1# $NetBSD: Makefile,v 1.7 2010/01/16 09:30:32 adam Exp $
f68d95b3
C
2
3PKGNAME= postgresql83-server-${BASE_VERS}
4COMMENT= PostgreSQL database server programs
5
6PKG_DESTDIR_SUPPORT= user-destdir
7
8# mips has no TAS implementation
9NOT_FOR_PLATFORM= *-*-mips
10
11.include "../../databases/postgresql83/Makefile.common"
12
13# Use shlibtool (invoked as "$(LIBTOOL)") to build modules.
14USE_LIBTOOL= yes
15PKG_LIBTOOL= ${PKG_SHLIBTOOL}
16
17MESSAGE_SRC= ${.CURDIR}/MESSAGE
18
19CONFIGURE_ARGS+= --with-openssl
20
21BUILD_DIRS= src/backend
22BUILD_DIRS+= src/backend/utils/mb/conversion_procs
23BUILD_DIRS+= src/backend/snowball
24BUILD_DIRS+= src/timezone
25BUILD_DIRS+= src/pl
26
27# PostgreSQL has loadable server-side language modules.
28#
29# Explicitly set DLOPEN_REQUIRE_PTHREADS to "no" on NetBSD as NetBSD-2.x
30# had problems with mixing dlopen() and pthreads, which blows up in
31# PostgreSQL's backend (pkg/28729). This works on older and newer
32# versions of NetBSD as well since they don't have the bad interaction
33# between dlopen() and pthreads.
34#
35.if ${OPSYS} == "NetBSD"
36DLOPEN_REQUIRE_PTHREADS= no
37.endif
38.include "../../mk/dlopen.buildlink3.mk"
39
40# If we're using libltdl to provide "dlopen" functionality, then add the
41# dependency and make sure that we link against -lltdl.
42#
43.if !empty(USE_LIBLTDL:M[yY][eE][sS])
44DL_LIBS+= -lltdl
45. include "../../devel/libltdl/buildlink3.mk"
46.endif
47
48PKG_OPTIONS_VAR= PKG_OPTIONS.postgresql83-server
9a6a8611 49PKG_SUPPORTED_OPTIONS= ldap pam
f68d95b3
C
50.include "../../databases/postgresql83/options.mk"
51
52# PGUSER username of the database administrator
53# PGGROUP group of the database administrator
54# PGHOME home directory of the database administrator and location of
55# the databases
56#
57PGUSER?= pgsql
58PGGROUP?= pgsql
59PGHOME?= ${PREFIX}/${PGUSER}
60FILES_SUBST+= PGUSER=${PGUSER}
61FILES_SUBST+= PGGROUP=${PGGROUP}
62FILES_SUBST+= PGHOME=${PGHOME}
63BUILD_DEFS+= PGHOME
64
65PKG_GROUPS_VARS+= PGGROUP
66PKG_USERS_VARS+= PGUSER
67
68PKG_GROUPS= ${PGGROUP}
69PKG_USERS= ${PGUSER}:${PGGROUP}
70PKG_GECOS.${PGUSER}= PostgreSQL database administrator
71PKG_HOME.${PGUSER}= ${PGHOME}
72PKG_SHELL.${PGUSER}= ${SH}
73
74RCD_SCRIPTS= pgsql
75
76.include "../../databases/postgresql83-client/buildlink3.mk"
77.include "../../security/openssl/buildlink3.mk"
78
79# Avoid conflict between "${SSLBASE}/include/openssl/des.h" and
80# "/usr/include/crypt.h" -- we want the definitions in the former.
81#
82post-wrapper:
83.if ${OPSYS} == "SunOS"
84 touch ${BUILDLINK_DIR}/include/crypt.h
85.endif
86
87pre-build:
88 ${RUN} ${_ULIMIT_CMD} \
89 cd ${WRKSRC}/src/backend && \
90 env ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} \
91 ../../src/include/parser/parse.h \
92 ../../src/include/utils/fmgroids.h
93 ${RUN}${_ULIMIT_CMD} \
94 cd ${WRKSRC}/src/port && \
95 env ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS}
96
97.include "../../mk/bsd.pkg.mk"