freebsd-ports/net-mgmt/kapacitor/Makefile
Rene Ladan 3c6fba3a38 Clean up ports after FreeBSD 12.0 reached end-of-life.
emulators/mesen is left out for now, as it breaks on 11.3

Submitted by:	rene
Reviewed by:	jbeich, zeising
X-Differential Revision:	https://reviews.freebsd.org/D24211
2020-03-31 16:15:16 +00:00

61 lines
1.5 KiB
Makefile

# Created by: Stefan Lambrev <cheffo@freebsd-bg.org>
# $FreeBSD$
PORTNAME= kapacitor
DISTVERSIONPREFIX= v
DISTVERSION= 1.5.1
CATEGORIES= net-mgmt
MAINTAINER= cheffo@freebsd-bg.org
COMMENT= Time-series data collection
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
ONLY_FOR_ARCHS= amd64 armv6 armv7 i386
USES= go
USE_RC_SUBR= kapacitord
USE_GITHUB= yes
GH_ACCOUNT= influxdata
GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME}
GO_BUILDFLAGS+= -ldflags "-X main.version=${DISTVERSION}"
GO_TARGET= ./cmd/kapacitor \
./cmd/kapacitord
SUB_FILES= kapacitord
SUB_LIST+= KAPACITORD_USER=${KAPACITORD_USER} \
KAPACITORD_GROUP=${KAPACITORD_GROUP} \
KAPACITORD_DBDIR=${KAPACITORD_DBDIR} \
KAPACITORD_LOGDIR=${KAPACITORD_LOGDIR}
PLIST_SUB= KAPACITORD_USER=${KAPACITORD_USER} \
KAPACITORD_GROUP=${KAPACITORD_GROUP} \
KAPACITORD_DBDIR=${KAPACITORD_DBDIR} \
KAPACITORD_LOGDIR=${KAPACITORD_LOGDIR}
#Use influxd user as it's aleary present in ports system
KAPACITORD_USER= influxd
KAPACITORD_GROUP= influxd
USERS= ${KAPACITORD_USER}
GROUPS= ${KAPACITORD_GROUP}
KAPACITORD_DBDIR= /var/db/${PORTNAME}/
KAPACITORD_LOGDIR= /var/log/${PORTNAME}/
post-install:
${MKDIR} ${STAGEDIR}${KAPACITORD_DBDIR} \
${STAGEDIR}${KAPACITORD_LOGDIR}
@${SED} -i .bak -e \
"s|/var/lib/kapacitor|/var/db/kapacitor|g" \
${WRKSRC}/etc/${PORTNAME}/${PORTNAME}.conf
${INSTALL_DATA} \
${WRKSRC}/etc/${PORTNAME}/${PORTNAME}.conf \
${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
.include <bsd.port.mk>