blob: b1b4eda92e4387a938a4e322a9f9fcdea914ad00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# $NetBSD: Makefile,v 1.19 2002/04/04 07:41:05 jlam Exp $
PKGNAME= postgresql-server-${BASE_VERS}
COMMENT= PostgreSQL database server programs
DEPENDS+= postgresql-client>=${BASE_VERS}:../../databases/postgresql-client
# mips has no TAS implementation
NOT_FOR_PLATFORM= *-*-mips
USE_BUILDLINK_ONLY= YES
.include "../../databases/postgresql/Makefile.common"
CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_DIR}
DIRS_TO_BUILD= src/backend
.if defined(USE_PAM)
.include "../../security/PAM/buildlink.mk"
CONFIGURE_ARGS+= --with-pam
.endif
# PGUSER username of the database administrator
# PGGROUP group of the database administrator
# PGHOME home directory of the database administrator and location of
# the databases
#
PGUSER?= pgsql
PGGROUP?= pgsql
PGHOME?= ${PREFIX}/${PGUSER}
FILES_SUBST+= PGUSER=${PGUSER}
FILES_SUBST+= PGHOME=${PGHOME}
BUILD_DEFS= PGUSER PGROUP PGHOME
PKG_USERS= ${PGUSER}:${PGGROUP}::PostgreSQL\\ database\\ administrator:${PGHOME}:${SH}
PKG_GROUPS= ${PGGROUP}
RCD_SCRIPTS= pgsql
OWN_DIRS_PERMS= ${PGHOME} ${PGUSER} ${PGGROUP} 0755
DEINSTALL_EXTRA_TMPL= ${PKGDIR}/DEINSTALL
do-build:
.for DIR in ${DIRS_TO_BUILD}
cd ${WRKSRC}/${DIR} && ${SETENV} ${MAKE_ENV} \
${MAKE_PROGRAM} ${ALL_TARGET}
.endfor
pre-install:
@case "X${PGUSER}" in \
Xbin|Xetc|Xinclude|Xinfo|Xlib|Xlibdata|Xlibexec|Xman|Xsbin|Xshare) \
${ECHO} "You have chosen PGUSER=${PGUSER} which will"; \
${ECHO} "cause trouble, because the postgres home directory"; \
${ECHO} "would be ${PGHOME}. Please"; \
${ECHO} "set PGUSER to something more reasonable"; \
${ECHO} "like pgsql."; \
${ECHO} ""; \
${FALSE}; \
;; \
esac
${SED} ${FILES_SUBST_SED} ${FILESDIR}/pgsql.sh > ${WRKDIR}/pgsql.sh
do-install:
.for DIR in ${DIRS_TO_BUILD}
cd ${WRKSRC}/${DIR} && ${SETENV} ${MAKE_ENV} \
${MAKE_PROGRAM} ${INSTALL_TARGET}
.endfor
post-install:
${GTAR} zxCf ${PREFIX}/man ${WRKSRC}/doc/man.tar.gz \
`${SED} -e "s|^#.*||" ${FILESDIR}/man.server`
${INSTALL_SCRIPT} ${WRKDIR}/pgsql.sh ${PREFIX}/etc/rc.d/pgsql
.include "../../databases/postgresql-lib/buildlink.mk"
.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
|