aboutsummaryrefslogtreecommitdiff
path: root/databases/slony1v2/Makefile
blob: 3c2d04cfd7d2f51218effe70e62f988ae6c469fd (plain) (blame)
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
# Created by: Radim Kolar
# $FreeBSD$

PORTNAME=	slony1v2
PORTVERSION=	2.2.7
CATEGORIES=	databases
MASTER_SITES=	http://main.slony.info/downloads/2.2/source/
DISTNAME=	slony1-${PORTVERSION}
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
		${DISTNAME}-docs${EXTRACT_SUFX}

MAINTAINER=	dgilbert@eicat.ca
COMMENT=	PostgreSQL master to multiple replicas replication system

BUILD_DEPENDS=	${LOCALBASE}/bin/flex:textproc/flex

GNU_CONFIGURE=	yes
USES=		bison gmake shebangfix tar:bzip2 pgsql
WANT_PGSQL=	server
USE_RC_SUBR=	slon
SHEBANG_FILES=	tools/altperl/slonik_restart_node.pl

SUB_FILES=	pkg-message slon-mkservice.sh
SUB_LIST+=	NAME=slon

OPTIONS_DEFINE=	DOCS PERLTOOLS
OPTIONS_SUB=	yes
PERLTOOLS_DESC=	Install perl configuration tools

CONFLICTS?=	slony1-1*

CONFIGURE_ENV+=	FLEX=${LOCALBASE}/bin/flex

PERLTOOLS_USES=	perl5
PERLTOOLS_CONFIGURE_ENV=	PERL=${PERL}
PERLTOOLS_CONFIGURE_ON=		--with-perltools=${LOCALBASE}/sbin
PERLTOOLS_BUILD_DEPENDS=	p5-DBD-Pg>=0:databases/p5-DBD-Pg
PERLTOOLS_RUN_DEPENDS=		p5-DBD-Pg>=0:databases/p5-DBD-Pg

.include <bsd.port.options.mk>

# let configure find postgres stuff in non-standard places
CONFIGURE_ARGS+=--with-pgconfigdir=${LOCALBASE}/bin \
		--with-pgbindir=${LOCALBASE}/bin \
		--with-pgincludedir=${LOCALBASE}/include \
		--with-pgincludeserverdir=${LOCALBASE}/include/postgresql/server \
		--with-pglibdir=${LOCALBASE}/lib \
		--with-pgpkglibdir=${LOCALBASE}/lib/postgresql \
		--with-pgsharedir=${LOCALBASE}/share/postgresql

PORTDOCS=	*

DOCS=		COPYRIGHT INSTALL README README.Unicode RELEASE \
		SAMPLE TODO UPGRADING

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/slon
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/slonik
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/slony_logshipper
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/postgresql/*.so
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	@${MKDIR} ${STAGEDIR}${DOCSDIR}/adminguide
.for _file in ${DOCS}
	${INSTALL_DATA} ${WRKSRC}/${_file} ${STAGEDIR}${DOCSDIR}
.endfor
	${INSTALL_DATA} ${WRKSRC}/doc/adminguide/*.html ${WRKSRC}/doc/adminguide/*.png ${STAGEDIR}${DOCSDIR}/adminguide/
	${INSTALL_SCRIPT} ${WRKDIR}/slon-mkservice.sh ${STAGEDIR}${PREFIX}/sbin/slon-mkservice
	${INSTALL_DATA} ${FILESDIR}/slon.conf-sample ${STAGEDIR}${PREFIX}/etc

.include <bsd.port.mk>