blob: 112e6bb489e0e0fe0ae8ff7e8d51fe30c536b1a5 (
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
PORTNAME= zookeeper
PORTVERSION= 3.8.0
CATEGORIES= devel java
MASTER_SITES= APACHE/${PORTNAME}/${PORTNAME}-${PORTVERSION} \
APACHE/logging/log4j/${ZOOKEEPER_LOG4J2_VERSION}/:log4j2
DISTNAME= apache-${PORTNAME}-${PORTVERSION}-bin
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= dmitry.wagin@ya.ru
COMMENT= Coordination Service for Distributed Applications
WWW= https://zookeeper.apache.org/
LICENSE= APACHE20
RUN_DEPENDS= libzookeeper>=${PORTVERSION}:devel/libzookeeper
USES= cpe
CPE_VENDOR= apache
USE_JAVA= yes
JAVA_VERSION= 8+
JAVA_RUN= yes
USE_RC_SUBR= zookeeper
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
NO_ARCH= yes
NO_BUILD= yes
SUB_FILES= zkCli.sh
SUB_LIST= JAVA=${JAVA} \
ZOOKEEPER_GROUP=${ZOOKEEPER_GROUP} \
ZOOKEEPER_LOGDIR=${ZOOKEEPER_LOGDIR} \
ZOOKEEPER_USER=${ZOOKEEPER_USER}
ZOOKEEPER_CONFS= configuration.xsl zoo.cfg
ZOOKEEPER_USER?= zookeeper
ZOOKEEPER_GROUP?= zookeeper
ZOOKEEPER_DBDIR?= /var/db/zookeeper
ZOOKEEPER_LOGDIR?= /var/log/zookeeper
ZOOKEEPER_LOG4J2_VERSION?= 2.17.2
USERS= ${ZOOKEEPER_USER}
GROUPS= ${ZOOKEEPER_GROUP}
PLIST_SUB= PORTVERSION=${PORTVERSION} \
ZOOKEEPER_DBDIR=${ZOOKEEPER_DBDIR} \
ZOOKEEPER_GROUP=${ZOOKEEPER_GROUP} \
ZOOKEEPER_LOGDIR=${ZOOKEEPER_LOGDIR} \
ZOOKEEPER_USER=${ZOOKEEPER_USER}
PORTDOCS= *
OPTIONS_DEFINE= DOCS LOG4J2
OPTIONS_SUB= yes
LOG4J2_DESC= Use log4j-2 instead Logback
LOG4J2_DISTFILES= apache-log4j-${ZOOKEEPER_LOG4J2_VERSION}-bin${EXTRACT_SUFX}:log4j2
LOG4J2_PLIST_SUB= ZOOKEEPER_LOG4J2_VERSION=${ZOOKEEPER_LOG4J2_VERSION}
LOG4J2_JARS= log4j-api-${ZOOKEEPER_LOG4J2_VERSION}.jar \
log4j-core-${ZOOKEEPER_LOG4J2_VERSION}.jar \
log4j-slf4j-impl-${ZOOKEEPER_LOG4J2_VERSION}.jar
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})
do-install-LOG4J2-on:
${RM} ${STAGEDIR}${DATADIR}/logback-*
.for f in ${LOG4J2_JARS}
${INSTALL_DATA} ${WRKDIR}/apache-log4j-${ZOOKEEPER_LOG4J2_VERSION}-bin/${f} ${STAGEDIR}${DATADIR}/
.endfor
${INSTALL_DATA} ${FILESDIR}/log4j2.properties ${STAGEDIR}${ETCDIR}/log4j2.properties.sample
do-install-LOG4J2-off:
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/conf/logback.xml ${STAGEDIR}${ETCDIR}/logback.xml.sample
.include <bsd.port.mk>
|