blob: 6c8fdac3f6a81d2d6479f4b85d3020e034453d97 (
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
|
PORTNAME= zookeeper
PORTVERSION= 3.6.2
CATEGORIES= devel java
MASTER_SITES= APACHE/${PORTNAME}/${PORTNAME}-${PORTVERSION}
DISTNAME= apache-${PORTNAME}-${PORTVERSION}-bin
MAINTAINER= dmitry.wagin@ya.ru
COMMENT= Coordination Service for Distributed Applications
LICENSE= APACHE20
RUN_DEPENDS= libzookeeper>=${PORTVERSION}:devel/libzookeeper
ZOOKEEPER_CONFS?= configuration.xsl log4j.properties zoo.cfg
ZOOKEEPER_USER?= zookeeper
ZOOKEEPER_GROUP?= zookeeper
ZOOKEEPER_DBDIR?= /var/db/zookeeper
ZOOKEEPER_LOGDIR?= /var/log/zookeeper
USERS= ${ZOOKEEPER_USER}
GROUPS= ${ZOOKEEPER_GROUP}
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
USE_RC_SUBR= zookeeper
SUB_FILES= zookeeper zkCli.sh
SUB_LIST= JAVA=${JAVA} \
ZOOKEEPER_USER=${ZOOKEEPER_USER} \
ZOOKEEPER_GROUP=${ZOOKEEPER_GROUP} \
ZOOKEEPER_LOGDIR=${ZOOKEEPER_LOGDIR}
PLIST_SUB+= PORTVERSION=${PORTVERSION} \
ZOOKEEPER_USER=${ZOOKEEPER_USER} \
ZOOKEEPER_GROUP=${ZOOKEEPER_GROUP} \
ZOOKEEPER_DBDIR=${ZOOKEEPER_DBDIR} \
ZOOKEEPER_LOGDIR=${ZOOKEEPER_LOGDIR}
NO_BUILD= yes
NO_ARCH= yes
USE_JAVA= yes
JAVA_VERSION= 8+
JAVA_RUN= yes
PORTDOCS= *
OPTIONS_DEFINE= DOCS
post-extract:
@${REINPLACE_CMD} "/dataDir/s|=.*|=${ZOOKEEPER_DBDIR}|" ${WRKDIR}/${DISTNAME}/conf/zoo_sample.cfg
@${MV} ${WRKDIR}/${DISTNAME}/conf/zoo_sample.cfg ${WRKDIR}/${DISTNAME}/conf/zoo.cfg
do-install:
@${MKDIR} ${STAGEDIR}${ETCDIR}
.for f in ${ZOOKEEPER_CONFS}
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/conf/${f} ${STAGEDIR}${ETCDIR}/${f}.sample
.endfor
@${MKDIR} ${STAGEDIR}${DATADIR}
(cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR} "-name *\.jar")
${INSTALL_SCRIPT} ${WRKDIR}/zkCli.sh ${STAGEDIR}${PREFIX}/bin/
${MKDIR} ${STAGEDIR}${ZOOKEEPER_LOGDIR}
${MKDIR} ${STAGEDIR}${ZOOKEEPER_DBDIR}
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@(cd ${WRKDIR}/${DISTNAME}/docs && \
${TAR} -cf - . | ${TAR} -xf - -C ${STAGEDIR}${DOCSDIR})
.include <bsd.port.mk>
|