<commit_before># Created by: <NAME> <<EMAIL>>
# $FreeBSD$

PORTNAME=	kapacitor
PORTVERSION=	1.4.0
DISTVERSIONPREFIX=	v
CATEGORIES=	net-mgmt

MAINTAINER=	<EMAIL>
COMMENT=	Time-series data collection

LICENSE=	MIT

ONLY_FOR_ARCHS=	amd64 armv6 armv7 i386

BUILD_DEPENDS=	go>=1.6.0:lang/go

USE_RC_SUBR=	kapacitord

USE_GITHUB=	yes

GH_ACCOUNT=	influxdata:DEFAULT

# This should work, but go gets confused with the symlinks.
#GH_SUBDIR=	src/github.com/${GH_ACCOUNT_DEFAULT}/${PORTNAME}

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}/

.include <bsd.port.pre.mk>

.if ${OPSYS} == "FreeBSD" && ((${OSVERSION} >= 1100513 && ${OSVERSION} < 1200000) || \
        ${OSVERSION} >= 1200015)
SUB_LIST+=      KAPACITORD_LOGCMD="daemon"
.else
SUB_LIST+=      KAPACITORD_LOGCMD="logger"
.endif

post-patch:
	@${MKDIR} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}
	@cd ${WRKSRC} && ${MV} \
	BLOB_STORE_DESIGN.md CHANGELOG.md CONTRIBUTING.md DESIGN.md Gopkg.lock \
	Gopkg.toml LICENSE_OF_DEPENDENCIES.md README.md alert alert.go auth \
	autoscale.go barrier.go batch.go bufpool build.py build.sh circle-test.sh \
	circle.yml client clock cmd combine.go combine_test.go command default.go \
	delete.go derivative.go doc.go edge edge.go etc eval.go examples expr.go \<commit_msg>fix tabs<commit_after># Created by: <NAME> <<EMAIL>>
# $FreeBSD$

PORTNAME=	kapacitor
PORTVERSION=	1.4.0
DISTVERSIONPREFIX=	v
CATEGORIES=	net-mgmt

MAINTAINER=	<EMAIL>
COMMENT=	Time-series data collection

LICENSE=	MIT

ONLY_FOR_ARCHS=	amd64 armv6 armv7 i386

BUILD_DEPENDS=	go>=1.6.0:lang/go

USE_RC_SUBR=	kapacitord

USE_GITHUB=	yes

GH_ACCOUNT=	influxdata:DEFAULT

# This should work, but go gets confused with the symlinks.
#GH_SUBDIR=	src/github.com/${GH_ACCOUNT_DEFAULT}/${PORTNAME}

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}/

.include <bsd.port.pre.mk>

.if ${OPSYS} == "FreeBSD" && ((${OSVERSION} >= 1100513 && ${OSVERSION} < 1200000) || \
	${OSVERSION} >= 1200015)
SUB_LIST+=	KAPACITORD_LOGCMD="daemon"
.else
SUB_LIST+=	KAPACITORD_LOGCMD="logger"
.endif

post-patch:
	@${MKDIR} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}
	@cd ${WRKSRC} && ${MV} \
	BLOB_STORE_DESIGN.md CHANGELOG.md CONTRIBUTING.md DESIGN.md Gopkg.lock \
	Gopkg.toml LICENSE_OF_DEPENDENCIES.md README.md alert alert.go auth \
	autoscale.go barrier.go batch.go bufpool build.py build.sh circle-test.sh \
	circle.yml client clock cmd combine.go combine_test.go command default.go \
	delete.go derivative.go doc.go edge edge.go etc eval.go examples expr.go \
{'fraction_non_alphanumeric': 0.12847033206314643, 'fraction_numerical': 0.018508437670114317, 'mean_word_length': 5.135225375626043, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '636018', 'n_tokens_mistral': 1639, 'n_tokens_neox': 1578, 'n_words': 279}