8a6773db9a
ChangeLog: https://zookeeper.apache.org/doc/r3.8.1/releasenotes.html PR: 269716 Reported by: dmitry.wagin@ya.ru
90 lines
2.8 KiB
Makefile
90 lines
2.8 KiB
Makefile
PORTNAME= zookeeper
|
|
PORTVERSION= 3.8.1
|
|
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.19.0
|
|
|
|
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>
|