aboutsummaryrefslogtreecommitdiff
path: root/net/ntopng/Makefile
blob: 24258f46d1c1e8a8694682a54de6e5bb1b2b00c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
PORTNAME=	ntopng
PORTVERSION=	5.6.d20231023
PORTEPOCH=	1
CATEGORIES=	net

MAINTAINER=	madpilot@FreeBSD.org
COMMENT=	Network monitoring tool with command line and web interfaces
WWW=		https://www.ntop.org/products/traffic-analysis/ntop/

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	librrd.so:databases/rrdtool \
		libzmq.so:net/libzmq4 \
		libcurl.so:ftp/curl \
		libndpi.so:net/ndpi \
		libjson-c.so:devel/json-c \
		libsodium.so:security/libsodium \
		libmaxminddb.so:net/libmaxminddb \
		libexpat.so:textproc/expat2 \
		libzstd.so:archivers/zstd \
		libgcrypt.so:security/libgcrypt \
		libgpg-error.so:security/libgpg-error \
		libhiredis.so:databases/hiredis
BUILD_DEPENDS=	bash:shells/bash

USES=		autoreconf compiler:c++11-lang cpe gmake ldap libtool localbase \
		lua:54 mysql pathfix pkgconfig shebangfix sqlite ssl

SUB_FILES=	ntopng-geoip2update.sh pkg-deinstall pkg-message
SHEBANG_FILES=	httpdocs/misc/ntopng-add-user.sh \
		httpdocs/misc/ntopng-utils-manage-config.in
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--with-ndpi-includes=${LOCALBASE}/include/ndpi

USERS=		ntopng
GROUPS=		ntopng
PLIST_SUB=	NTOPNGUSER="${USERS}" NTOPNGROUP="${GROUPS}"

USE_GITHUB=	yes
GH_TUPLE=	ntop:ntopng-dist:e7a0d8b:dist/httpdocs/dist
GH_ACCOUNT=	ntop
GH_TAGNAME=	1619fe1

CPE_VENDOR=	ntop

OPTIONS_DEFINE=	NLS

OPTIONS_SUB=	yes

NLS_USES=	gettext

USE_RC_SUBR=	ntopng

post-patch:
	@${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' \
		${WRKSRC}/Makefile.in \
		${WRKSRC}/configure.ac.in
	cd ${WRKSRC} && ${SH} autogen.sh

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ntopng
	${MKDIR} ${STAGEDIR}/var/db/ntopng
	${INSTALL_SCRIPT} ${WRKDIR}/ntopng-geoip2update.sh ${STAGEDIR}${PREFIX}/bin
	${RM} ${STAGEDIR}${DATADIR}/httpdocs/misc/ntopng-utils-manage-updates \
		${STAGEDIR}${DATADIR}/httpdocs/misc/ntopng-utils-manage-updates.in

.include <bsd.port.mk>