# Created by: Muhammad Moinur Rahman <5u623l20@gmail.com>
# $FreeBSD: tags/RELEASE_11_0_0/net/ndpi/Makefile 416073 2016-05-28 22:07:23Z madpilot $

PORTNAME=	ndpi
PORTVERSION=	1.8
CATEGORIES=	net
MASTER_SITES=	SF/ntop/nDPI
DISTNAME=	nDPI-${PORTVERSION}

MAINTAINER=	madpilot@FreeBSD.org
COMMENT=	NTOP-maintained superset of the popular OpenDPI library

LICENSE=	GPLv3

LIB_DEPENDS=	libjson-c.so:devel/json-c

CONFIGURE_ARGS=	--with-pic
CPPFLAGS+=	-I${LOCALBASE}/include/json-c
LDFLAGS+=	-L${LOCALBASE}/lib
LIBS+=		-ljson-c
GNU_CONFIGURE=	yes
USE_LDCONFIG=	yes
USES=	 	alias autoreconf compiler:c++11-lang libtool pathfix pkgconfig tar:tgz
WRKSRC=		${WRKDIR}/nDPI-${PORTVERSION}
INSTALL_TARGET=	install-strip

PLIST_SUB=	MAJOR_VER=${PORTVERSION}.0

post-patch:
	${REINPLACE_CMD} 's|$$(libdir)|$$(libdir)data|' \
		${WRKSRC}/Makefile.am

.include <bsd.port.mk>
