# $FreeBSD$

PORTNAME=netifyd
PORTVERSION=3.00
PORTREVISION=1
CATEGORIES=security
MASTER_SITES=http://download.netify.ai/netify/freebsd/
MAINTAINER=team@netify.ai
COMMENT=Netify Agent - Deep-packet Inspection Server
LICENSE=GPLv3+
LICENSE_FILE=${WRKSRC}/LICENSE

RUN_DEPENDS=libunwind>=20170615:devel/libunwind \
	google-perftools>=2.7:devel/google-perftools

USES=gmake libtool
USE_RC_SUBR=netifyd
USE_LDCONFIG=yes

SUB_LIST=PACKAGE_TARNAME=netifyd

GNU_CONFIGURE=1

CONFIGURE_ARGS=\
	CC=clang CXX=clang++ CPPFLAGS=-I/usr/local/include \
	--disable-conntrack --disable-inotify

INSTALL_TARGET=install-strip

post-install:
	${MKDIR} ${STAGEDIR}/var/run/netifyd
	${MV} ${STAGEDIR}/usr/local/etc/netifyd.conf ${STAGEDIR}/usr/local/etc/netifyd.conf.sample
	${MV} ${STAGEDIR}/usr/local/etc/netify.d/netify-sink.conf ${STAGEDIR}/usr/local/etc/netify.d/netify-sink.conf.sample

.include <bsd.port.mk>
