freebsd-ports/sysutils/graylog/Makefile
Dave Cottlehuber f7f7152bfd sysutils/graylog: update to 5.2.3
- fix warnings in log4j config

PR:		276098
Reported by:	rob2g2-freebsd@bitbert.com
Sponsored by:	SkunkWerks, GmbH
2024-01-04 16:38:19 +00:00

71 lines
2 KiB
Makefile

PORTNAME= graylog
DISTVERSION= 5.2.3
CATEGORIES= sysutils java
MASTER_SITES= https://downloads.graylog.org/releases/
DISTFILES= graylog/${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= dch@FreeBSD.org
COMMENT= Tool for centralized log collection
WWW= https://www.graylog.org/
LICENSE= APACHE20 SSPLv1
LICENSE_COMB= multi
LICENSE_NAME_SSPLv1= Server Side Public License
LICENSE_FILE_SSPLv1= ${WRKSRC}/LICENSE
LICENSE_PERMS_SSPLv1= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
USES= cpe tar:tgz
USE_JAVA= yes
JAVA_VERSION= 17+
JAVA_EXTRACT= yes
JAVA_RUN= yes
NO_BUILD= yes
NO_ARCH= yes
USE_RC_SUBR= graylog
SUB_FILES= log4j2.xml pkg-message
GRAYLOGUSER?= graylog
GRAYLOGGROUP?= ${GRAYLOGUSER}
USERS= ${GRAYLOGUSER}
GROUPS= ${GRAYLOGGROUP}
GRAYLOG_DATA_DIR= /var/db/graylog
GRAYLOG_LOGS_DIR= /var/log/graylog
SUB_LIST= GRAYLOG_DATA_DIR=${GRAYLOG_DATA_DIR} \
GRAYLOG_LOGS_DIR=${GRAYLOG_LOGS_DIR} \
GRAYLOGGROUP=${GRAYLOGGROUP} \
GRAYLOGUSER=${GRAYLOGUSER} \
JAVA_HOME=${JAVA_HOME}
PLIST_SUB= DISTVERSION=${DISTVERSION} \
GRAYLOG_DATA_DIR=${GRAYLOG_DATA_DIR} \
GRAYLOG_LOGS_DIR=${GRAYLOG_LOGS_DIR} \
GRAYLOGGROUP=${GRAYLOGGROUP} \
GRAYLOGUSER=${GRAYLOGUSER} \
PORTNAME=${PORTNAME}
post-extract:
${REINPLACE_CMD} -E \
-e 's,^bin_dir .+,bin_dir = ${LOCALBASE}/share/graylog/bin,' \
-e 's,^data_dir .+,data_dir = /var/db/graylog,' \
-e 's,^message_journal_dir .+,message_journal_dir = ${GRAYLOG_DATA_DIR}/journal,' \
-e 's,^node_id_file .+,node_id_file = ${ETCDIR}/server/node-id,' \
${WRKSRC}/graylog.conf.example
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}/plugin
@${MKDIR} ${STAGEDIR}${ETCDIR}/server
@${MKDIR} ${STAGEDIR}${GRAYLOG_DATA_DIR}/journal
@${MKDIR} ${STAGEDIR}${GRAYLOG_LOGS_DIR}
${INSTALL_DATA} ${WRKSRC}/graylog.jar ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/graylog.conf.example \
${STAGEDIR}${ETCDIR}/graylog.conf.sample
${INSTALL_DATA} ${WRKDIR}/log4j2.xml \
${STAGEDIR}${ETCDIR}/log4j2.xml.sample
cd ${WRKSRC}/plugin && \
${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/plugin/
.include <bsd.port.mk>