Annotation of pkgsrc/databases/postgresql82-client/Makefile, Revision 1.12.2.2
1.12.2.2! spz 1: # $NetBSD: Makefile,v 1.16 2010/05/30 11:51:19 joerg Exp $
1.1 adam 2:
3: PKGNAME= postgresql82-client-${BASE_VERS}
1.12.2.2! spz 4: PKGREVISION= 1
1.1 adam 5: COMMENT= PostgreSQL database client programs
6:
7: PKG_DESTDIR_SUPPORT= user-destdir
8:
9: .include "../../databases/postgresql82/Makefile.common"
10:
11: USE_TOOLS+= gzip tar
12: USE_LIBTOOL= yes
13: CONFIGURE_ARGS+= --with-openssl
14: CONFIGURE_ARGS+= --with-readline
15: CONFIGURE_ARGS+= --with-zlib
16:
17: CONFLICTS+= postgresql82-lib-[0-9]*
18: CONFLICTS+= postgresql82-docs-[0-9]*
19:
20: # 1. The thread-safety test in ${WRSRC}/src/tools/thread does not pass on
1.2 rmind 21: # NetBSD earler than 4.0 or DragonFly.
1.1 adam 22: # 2. configure with --enable-thread-safety fails on OpenBSD.
1.2 rmind 23: .if (${OPSYS} == "NetBSD" && !empty(OS_VERSION:M[0-3].*)) || \
24: ${OPSYS} == "DragonFly" || ${OPSYS} == "OpenBSD"
1.1 adam 25: PGSQL_THREAD_SAFETY?= no
26: .endif
27: PGSQL_THREAD_SAFETY?= yes
28: BUILD_DEFS+= PGSQL_THREAD_SAFETY
29:
30: .if !empty(PGSQL_THREAD_SAFETY:M[yY][eE][sS])
31: . include "../../mk/pthread.buildlink3.mk"
32: . if (${PTHREAD_TYPE} == "native")
33: CONFIGURE_ARGS+= --enable-thread-safety
34: . endif
35: .endif
36:
1.6 sketch 37: LIBS.SunOS+= -lintl
38:
1.1 adam 39: INSTALL_DIRS= src/include
40: INSTALL_DIRS+= src/interfaces
1.5 adam 41: INSTALL_DIRS+= src/port
1.1 adam 42: INSTALL_DIRS+= src/bin
43: INSTALL_DIRS+= doc
44:
45: BUILD_DIRS= ${INSTALL_DIRS}
46:
47: # Without this, the Darwin build fails (related to -bundle_loader).
48: BUILD_DIRS+= src/backend
49:
50: PKG_OPTIONS_VAR= PKG_OPTIONS.postgresql82-client
51: .include "../../databases/postgresql82/options.mk"
52:
53: .for _file_ in pg_service.conf psqlrc
54: CONF_FILES+= ${PG_DATA_DIR}/${_file_}.sample ${PG_ETC_DIR}/${_file_}
55: .endfor
56:
57: # XXX work around core dumps with the native libedit
58: USE_GNU_READLINE= yes
59:
60: .include "../../devel/readline/buildlink3.mk"
61: .include "../../devel/zlib/buildlink3.mk"
62: .include "../../security/openssl/buildlink3.mk"
63:
1.11 adam 64: SUBST_CLASSES+= pgxs
65: SUBST_STAGE.pgxs= post-build
66: SUBST_MESSAGE.pgxs= Fixing workdir tools references in pgxs Makefile
67: SUBST_FILES.pgxs= src/Makefile.global
68: SUBST_SED.pgxs= -e 's,${WRKDIR}/.tools,${PREFIX},'
69: SUBST_SED.pgxs+= -e 's,${WRKDIR}/.wrapper,${PREFIX},'
70: SUBST_SED.pgxs+= -e 's,${WRKSRC},/dev/null,'
71:
72: INSTALLATION_DIRS+= ${PG_SUBPREFIX}lib/postgresql/pgxs
73: INSTALLATION_DIRS+= ${PG_SUBPREFIX}lib/postgresql/pgxs/config
74: INSTALLATION_DIRS+= ${PG_SUBPREFIX}lib/postgresql/pgxs/src
75: INSTALLATION_DIRS+= ${PG_SUBPREFIX}lib/postgresql/pgxs/src/makefiles
76:
77: DEST_PG_PGXS= ${DESTDIR}${PG_PREFIX}/lib/postgresql/pgxs
78: PG_PGXS_FILES= config/install-sh config/mkinstalldirs
79: PG_PGXS_FILES+= src/makefiles/pgxs.mk src/Makefile.global
80: PG_PGXS_FILES+= src/Makefile.port src/Makefile.shlib
81: PG_PGXS_FILES+= src/nls-global.mk
82:
1.1 adam 83: # On Solaris, avoid conflicts between "${SSLBASE}/include/openssl/des.h"
84: # and "/usr/include/crypt.h" -- we want the definitions in the former.
85: .if ${OPSYS} == "SunOS"
86: post-wrapper:
87: touch ${BUILDLINK_DIR}/include/crypt.h
88: .endif
89:
90: pre-build:
1.7 rillig 91: ${RUN} ${_ULIMIT_CMD} \
1.1 adam 92: cd ${WRKSRC}/src/backend && \
1.7 rillig 93: env ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} \
1.1 adam 94: ../../src/include/parser/parse.h \
95: ../../src/include/utils/fmgroids.h
96:
97: post-install:
98: cd ${WRKSRC}/doc; for file in \
99: FAQ* KNOWN_BUGS MISSING_FEATURES README.* TODO \
100: bug.template; \
101: do \
102: ${INSTALL_DATA} $$file ${DESTDIR}${PG_DOC_DIR}/$$file; \
1.11 adam 103: done
104: for file in ${PG_PGXS_FILES}; do \
105: ${INSTALL_DATA} ${WRKSRC}/$$file ${DEST_PG_PGXS}/$$file;\
106: done
1.1 adam 107: cp -R ${WRKSRC}/doc/TODO.detail ${DESTDIR}${PG_DOC_DIR}
108: chown -R ${DOCOWN}:${DOCGRP} ${DESTDIR}${PG_DOC_DIR}/TODO.detail
109:
110: .include "../../mk/bsd.pkg.mk"
CVSweb <webmaster@jp.NetBSD.org>