1 # $NetBSD: Makefile,v 1.15 2012/07/12 18:57:28 marino Exp $
3 PKGNAME= ${DISTNAME:C/-/84-server-/}
4 COMMENT= PostgreSQL database server programs
6 PKG_DESTDIR_SUPPORT= user-destdir
8 # mips has no TAS implementation
9 NOT_FOR_PLATFORM= *-*-mips
11 .include "../../databases/postgresql84/Makefile.common"
13 CONFIGURE_ARGS+= --with-openssl
15 INSTALL_DIRS= src/backend
16 INSTALL_DIRS+= src/backend/utils/mb/conversion_procs
17 INSTALL_DIRS+= src/backend/snowball
18 INSTALL_DIRS+= src/timezone
21 BUILD_DIRS+= ${INSTALL_DIRS}
25 # PostgreSQL has loadable server-side language modules.
27 # Explicitly set DLOPEN_REQUIRE_PTHREADS to "no" on NetBSD as NetBSD-2.x
28 # had problems with mixing dlopen() and pthreads, which blows up in
29 # PostgreSQL's backend (pkg/28729). This works on older and newer
30 # versions of NetBSD as well since they don't have the bad interaction
31 # between dlopen() and pthreads.
32 .if ${OPSYS} == "NetBSD"
33 DLOPEN_REQUIRE_PTHREADS= no
35 .include "../../mk/dlopen.buildlink3.mk"
37 # If we're using libltdl to provide "dlopen" functionality, then add the
38 # dependency and make sure that we link against -lltdl.
39 .if !empty(USE_LIBLTDL:M[yY][eE][sS])
41 . include "../../devel/libltdl/buildlink3.mk"
44 # PGUSER username of the database administrator
45 # PGGROUP group of the database administrator
46 # PGHOME home directory of the database administrator and location of
50 PGHOME?= ${PREFIX}/${PGUSER}
51 FILES_SUBST+= PGUSER=${PGUSER}
52 FILES_SUBST+= PGGROUP=${PGGROUP}
53 FILES_SUBST+= PGHOME=${PGHOME}
56 PKG_GROUPS_VARS+= PGGROUP
57 PKG_USERS_VARS+= PGUSER
59 PKG_GROUPS= ${PGGROUP}
60 PKG_USERS= ${PGUSER}:${PGGROUP}
61 PKG_GECOS.${PGUSER}= PostgreSQL database administrator
62 PKG_HOME.${PGUSER}= ${PGHOME}
66 .include "../../databases/postgresql84-client/buildlink3.mk"
67 .include "../../security/openssl/buildlink3.mk"
69 # Avoid conflict between "${SSLBASE}/include/openssl/des.h" and
70 # "/usr/include/crypt.h" -- we want the definitions in the former.
72 .if ${OPSYS} == "SunOS"
73 touch ${BUILDLINK_DIR}/include/crypt.h
76 .include "../../mk/bsd.pkg.mk"