summaryrefslogtreecommitdiffstats
path: root/databases/pgpool-II-33/Makefile
blob: 96d25887e75fb23cc48e925ea082d0d880a742ae (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
77
78
79
80
81
82
83
84
85
86
87
88
# $FreeBSD$

PORTNAME=	pgpool-II
PORTVERSION=	3.3.7
CATEGORIES=	databases
MASTER_SITES=	http://www.pgpool.net/mediawiki/images/
PKGNAMESUFFIX=	33

MAINTAINER=	michelle@sorbs.net
COMMENT=	Connection pool server for PostgreSQL

LICENSE=	MIT

RUN_DEPENDS=	rsync:net/rsync

USES=		gmake libtool perl5 pgsql
WANT_PGSQL=	client
USE_PERL5=	run
GNU_CONFIGURE=	yes
USE_LDCONFIG=	yes
MAKE_ENV=	INSTALL_STRIP_FLAG=${STRIP}

CONFLICTS=	pgpool-3.* pgpool-II-22-2.* pgpool-II-23-2.* pgpool-II-30-3.* pgpool-II-3.*
USE_RC_SUBR=	pgpool

DOCS=		AUTHORS COPYING ChangeLog INSTALL NEWS README README.euc_jp \
		TODO doc/pgpool-en.html doc/pgpool-ja.html doc/pgpool.css \
		doc/tutorial-en.html doc/tutorial-ja.html

OPTIONS_DEFINE+=	DOCS SSL LIBMEMCACHED PAM
OPTIONS_DEFAULT=	SSL PAM

# Buggy configure: adding eg. --without-pam to CONFIGURE_ARGS causes
# USE_PAM to be *defined* in config.h Omit the --with-pam or
# --without-pam flags entirely to leave PAM turned off.  Similarly for
# --with-memcached.

LIBMEMCACHED_DESC=		Build with MemCached support
LIBMEMCACHED_BUILD_DEPENDS=	libmemcached>=1.0:databases/libmemcached
LIBMEMCACHED_CONFIGURE_ON=	--with-memcached=${LOCALBASE}/lib/libmemcached

SSL_DESC=		Build with OpenSSL support
SSL_CONFIGURE_WITH=	openssl
SSL_USE=		OPENSSL=yes

PAM_DESC=		Build with PAM support
PAM_CONFIGURE_ON=	--with-pam
PAM_USE=		PAM=yes

FUNC_CONTRIB_DIR=	${PREFIX}/share/postgresql/contrib
FUNC_LIB_DIR=		${PREFIX}/lib/postgresql

FUNCTIONS=		pgpool-recovery pgpool-regclass
FUNC_CONTRIB=		pgpool-recovery/uninstall_pgpool-recovery.sql \
			pgpool-recovery/pgpool-recovery.sql \
			pgpool-regclass/uninstall_pgpool-regclass.sql \
			pgpool-regclass/pgpool-regclass.sql
FUNC_LIB=		pgpool-recovery/pgpool-recovery.so \
			pgpool-regclass/pgpool-regclass.so

post-build:
.for f in ${FUNCTIONS}
	cd ${WRKSRC}/sql/${f} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD}
.endfor

post-install:
	${MKDIR} ${STAGEDIR}${FUNC_CONTRIB_DIR}
.for f in ${FUNC_CONTRIB}
	${INSTALL_DATA} ${WRKSRC}/sql/${f} ${STAGEDIR}${FUNC_CONTRIB_DIR}
.endfor
	${MKDIR} ${STAGEDIR}${FUNC_LIB_DIR}
.for f in ${FUNC_LIB}
	${INSTALL_LIB} ${WRKSRC}/sql/${f} ${STAGEDIR}${FUNC_LIB_DIR}
.endfor
	${INSTALL_DATA} ${WRKSRC}/sample/dist_def_pgbench.sql \
	    ${STAGEDIR}${DATADIR}
	${INSTALL_DATA} ${WRKSRC}/sample/replicate_def_pgbench.sql \
	    ${STAGEDIR}${DATADIR}
	${MKDIR} ${STAGEDIR}${DATADIR} ${STAGEDIR}${EXAMPLESDIR}
.for f in pgpool_recovery pgpool_recovery_pitr pgpool_remote_start
	${INSTALL_SCRIPT} ${WRKSRC}/sample/${f} ${STAGEDIR}${EXAMPLESDIR}
.endfor
	${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ${DOCS}
	${INSTALL_MAN} ${WRKSRC}/$f ${STAGEDIR}${DOCSDIR}
.endfor

.include <bsd.port.mk>
OpenPOWER on IntegriCloud