Fixup fromcvs/togit conversion
[pkgsrcv2.git] / databases / postgresql84-server / Makefile
1 # $NetBSD: Makefile,v 1.15 2012/07/12 18:57:28 marino Exp $
2
3 PKGNAME=        ${DISTNAME:C/-/84-server-/}
4 COMMENT=        PostgreSQL database server programs
5
6 PKG_DESTDIR_SUPPORT=    user-destdir
7
8 # mips has no TAS implementation
9 NOT_FOR_PLATFORM=       *-*-mips
10
11 .include "../../databases/postgresql84/Makefile.common"
12
13 CONFIGURE_ARGS+=        --with-openssl
14
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
19 INSTALL_DIRS+=  src/pl
20 BUILD_DIRS=     src/port
21 BUILD_DIRS+=    ${INSTALL_DIRS}
22
23 LIBS.SunOS+=    -lintl
24
25 # PostgreSQL has loadable server-side language modules.
26 #
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
34 .endif
35 .include "../../mk/dlopen.buildlink3.mk"
36
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])
40 DL_LIBS+=       -lltdl
41 .  include "../../devel/libltdl/buildlink3.mk"
42 .endif
43
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
47 #               the databases
48 PGUSER?=                pgsql
49 PGGROUP?=               pgsql
50 PGHOME?=                ${PREFIX}/${PGUSER}
51 FILES_SUBST+=           PGUSER=${PGUSER}
52 FILES_SUBST+=           PGGROUP=${PGGROUP}
53 FILES_SUBST+=           PGHOME=${PGHOME}
54 BUILD_DEFS+=            PGHOME
55
56 PKG_GROUPS_VARS+=       PGGROUP
57 PKG_USERS_VARS+=        PGUSER
58
59 PKG_GROUPS=             ${PGGROUP}
60 PKG_USERS=              ${PGUSER}:${PGGROUP}
61 PKG_GECOS.${PGUSER}=    PostgreSQL database administrator
62 PKG_HOME.${PGUSER}=     ${PGHOME}
63
64 RCD_SCRIPTS=            pgsql
65
66 .include "../../databases/postgresql84-client/buildlink3.mk"
67 .include "../../security/openssl/buildlink3.mk"
68
69 # Avoid conflict between "${SSLBASE}/include/openssl/des.h" and
70 # "/usr/include/crypt.h" -- we want the definitions in the former.
71 post-wrapper:
72 .if ${OPSYS} == "SunOS"
73         touch ${BUILDLINK_DIR}/include/crypt.h
74 .endif
75
76 .include "../../mk/bsd.pkg.mk"