View | Details | Raw Unified | Return to bug 244304 | Differences between
and this patch

Collapse All | Expand All

(-)net-mgmt/netdata/Makefile (-1 / +4 lines)
Lines 1-108 Link Here
1
# Created by: Mahdi Mokhtari <mokhi64@gmail.com>
1
# Created by: Mahdi Mokhtari <mokhi64@gmail.com>
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	netdata
4
PORTNAME=	netdata
5
PORTVERSION=	1.20.0
5
PORTVERSION=	1.20.0
6
PORTREVISION=	1
6
PORTREVISION=	1
7
DISTVERSIONPREFIX=	v
7
DISTVERSIONPREFIX=	v
8
CATEGORIES=	net-mgmt
8
CATEGORIES=	net-mgmt
9
9
10
MAINTAINER=	mmokhi@FreeBSD.org
10
MAINTAINER=	mmokhi@FreeBSD.org
11
COMMENT=	Scalable distributed realtime performance and health monitoring
11
COMMENT=	Scalable distributed realtime performance and health monitoring
12
12
13
LICENSE=	GPLv3
13
LICENSE=	GPLv3
14
14
15
LIB_DEPENDS=	libuuid.so:misc/e2fsprogs-libuuid
15
LIB_DEPENDS=	libuuid.so:misc/e2fsprogs-libuuid
16
16
17
RUN_DEPENDS=	bash:shells/bash \
17
RUN_DEPENDS=	bash:shells/bash \
18
		curl:ftp/curl \
18
		curl:ftp/curl \
19
		${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} \
19
		${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} \
20
		${PYTHON_PKGNAMEPREFIX}urllib3>0:net/py-urllib3@${PY_FLAVOR}
20
		${PYTHON_PKGNAMEPREFIX}urllib3>0:net/py-urllib3@${PY_FLAVOR}
21
21
22
USES=		autoreconf cpe pathfix pkgconfig:both python shebangfix ssl
22
USES=		autoreconf cpe pathfix pkgconfig:both python shebangfix ssl
23
23
24
USE_GITHUB=	yes
24
USE_GITHUB=	yes
25
25
26
SHEBANG_GLOB=	*
26
SHEBANG_GLOB=	*
27
27
28
NETDATA_CACHE=	/var/cache/${PORTNAME}
28
NETDATA_CACHE=	/var/cache/${PORTNAME}
29
NETDATA_LOG=	/var/log/${PORTNAME}
29
NETDATA_LOG=	/var/log/${PORTNAME}
30
NETDATA_PERST=	/var/db/${PORTNAME}
30
NETDATA_PERST=	/var/db/${PORTNAME}
31
31
32
GNU_CONFIGURE=	yes
32
GNU_CONFIGURE=	yes
33
CONFIGURE_ARGS=	--disable-unit-tests
33
CONFIGURE_ARGS=	--disable-unit-tests
34
CPPFLAGS+=	-D_WANT_VMMETER
34
CPPFLAGS+=	-D_WANT_VMMETER
35
INSTALL_TARGET=	install-strip
35
INSTALL_TARGET=	install-strip
36
36
37
SUB_LIST=	NETDATA_CACHE=${NETDATA_CACHE} \
37
SUB_LIST=	NETDATA_CACHE=${NETDATA_CACHE} \
38
		NETDATA_LOG=${NETDATA_LOG} \
38
		NETDATA_LOG=${NETDATA_LOG} \
39
		NETDATA_PERST=${NETDATA_PERST}
39
		NETDATA_PERST=${NETDATA_PERST}
40
40
41
PLIST_SUB=	NETDATA_CACHE=${NETDATA_CACHE} \
41
PLIST_SUB=	NETDATA_CACHE=${NETDATA_CACHE} \
42
		NETDATA_LOG=${NETDATA_LOG} \
42
		NETDATA_LOG=${NETDATA_LOG} \
43
		NETDATA_PERST=${NETDATA_PERST}
43
		NETDATA_PERST=${NETDATA_PERST}
44
44
45
USE_RC_SUBR=	${PORTNAME}
45
USE_RC_SUBR=	${PORTNAME}
46
SUB_FILES=	${PORTNAME}.conf.sample
46
SUB_FILES=	${PORTNAME}.conf.sample
47
47
48
USERS=		netdata
48
USERS=		netdata
49
GROUPS=		netdata
49
GROUPS=		netdata
50
50
51
OPTIONS_DEFINE=		CUPS DBENGINE FREEIPMI JSON LTO
51
OPTIONS_DEFINE=		CUPS DBENGINE FREEIPMI GOPLUGIN JSON LTO
52
OPTIONS_SUB=		YES
52
OPTIONS_SUB=		YES
53
OPTIONS_DEFAULT=	DBENGINE JSON
53
OPTIONS_DEFAULT=	DBENGINE JSON
54
OPTIONS_DEFAULT_FreeBSD_12=	LTO
54
OPTIONS_DEFAULT_FreeBSD_12=	LTO
55
OPTIONS_DEFAULT_FreeBSD_13=	LTO
55
OPTIONS_DEFAULT_FreeBSD_13=	LTO
56
OPTIONS_DEFAULT+=	${OPTIONS_DEFAULT_${OPSYS}_${OSREL:R}}
56
OPTIONS_DEFAULT+=	${OPTIONS_DEFAULT_${OPSYS}_${OSREL:R}}
57
57
58
CUPS_DESC=		Enable support for cups
58
CUPS_DESC=		Enable support for cups
59
CUPS_CONFIGURE_ENABLE=	plugin-cups
59
CUPS_CONFIGURE_ENABLE=	plugin-cups
60
CUPS_LIB_DEPENDS=	libcups.so:print/cups
60
CUPS_LIB_DEPENDS=	libcups.so:print/cups
61
61
62
DBENGINE_DESC=			Enable support for database engine
62
DBENGINE_DESC=			Enable support for database engine
63
DBENGINE_CONFIGURE_ENABLE=	dbengine
63
DBENGINE_CONFIGURE_ENABLE=	dbengine
64
DBENGINE_LIB_DEPENDS=		libJudy.so:devel/judy \
64
DBENGINE_LIB_DEPENDS=		libJudy.so:devel/judy \
65
				liblz4.so:archivers/liblz4 \
65
				liblz4.so:archivers/liblz4 \
66
				libuv.so:devel/libuv
66
				libuv.so:devel/libuv
67
67
68
FREEIPMI_DESC=			Enable support for freeipmi
68
FREEIPMI_DESC=			Enable support for freeipmi
69
FREEIPMI_CONFIGURE_ENABLE=	plugin-freeipmi
69
FREEIPMI_CONFIGURE_ENABLE=	plugin-freeipmi
70
FREEIPMI_LIB_DEPENDS=		libfreeipmi.so:sysutils/freeipmi
70
FREEIPMI_LIB_DEPENDS=		libfreeipmi.so:sysutils/freeipmi
71
71
72
GOPLUGIN_DESC=		Enable the go collector plugin
73
GOPLUGIN_RUN_DEPENDS=	${LOCALBASE}/libexec/netdata/plugins.d/god.plugin:net-mgmt/netdata-go
74
72
JSON_DESC=		Enable support for json
75
JSON_DESC=		Enable support for json
73
JSON_CONFIGURE_ENABLE=	jsonc
76
JSON_CONFIGURE_ENABLE=	jsonc
74
JSON_LIB_DEPENDS=	libjson-c.so:devel/json-c
77
JSON_LIB_DEPENDS=	libjson-c.so:devel/json-c
75
78
76
LTO_DESC=		Use Link-Time Optimization
79
LTO_DESC=		Use Link-Time Optimization
77
LTO_CONFIGURE_ENABLE=	lto
80
LTO_CONFIGURE_ENABLE=	lto
78
LTO_USES=		compiler:c11
81
LTO_USES=		compiler:c11
79
82
80
.include <bsd.port.options.mk>
83
.include <bsd.port.options.mk>
81
.if ${PORT_OPTIONS:MLTO} && ${OPSYS}_${OSREL:R} == FreeBSD_11
84
.if ${PORT_OPTIONS:MLTO} && ${OPSYS}_${OSREL:R} == FreeBSD_11
82
BROKEN=		Link-Time Optimization breaks compilation on FreeBSD 11
85
BROKEN=		Link-Time Optimization breaks compilation on FreeBSD 11
83
.endif
86
.endif
84
87
85
post-patch:
88
post-patch:
86
	@${REINPLACE_CMD} -e 's|%%NETDATA_CACHE%%|${NETDATA_CACHE}|g' \
89
	@${REINPLACE_CMD} -e 's|%%NETDATA_CACHE%%|${NETDATA_CACHE}|g' \
87
	    ${PATCH_WRKSRC}/configure.ac
90
	    ${PATCH_WRKSRC}/configure.ac
88
	@${REINPLACE_CMD} -e 's|%%NETDATA_LOG%%|${NETDATA_LOG}|g' \
91
	@${REINPLACE_CMD} -e 's|%%NETDATA_LOG%%|${NETDATA_LOG}|g' \
89
	    ${PATCH_WRKSRC}/configure.ac
92
	    ${PATCH_WRKSRC}/configure.ac
90
	@${REINPLACE_CMD} -e 's|%%NETDATA_PERST%%|${NETDATA_PERST}|g' \
93
	@${REINPLACE_CMD} -e 's|%%NETDATA_PERST%%|${NETDATA_PERST}|g' \
91
	    ${PATCH_WRKSRC}/configure.ac
94
	    ${PATCH_WRKSRC}/configure.ac
92
	@${REINPLACE_CMD} -e 's|%%ETCDIR%%|${ETCDIR}|g' \
95
	@${REINPLACE_CMD} -e 's|%%ETCDIR%%|${ETCDIR}|g' \
93
	    ${PATCH_WRKSRC}/configure.ac
96
	    ${PATCH_WRKSRC}/configure.ac
94
	@${REINPLACE_CMD} -e 's|%%PYTHON%%|${PYTHON_CMD}|g' \
97
	@${REINPLACE_CMD} -e 's|%%PYTHON%%|${PYTHON_CMD}|g' \
95
	    ${PATCH_WRKSRC}/collectors/python.d.plugin/python.d.plugin.in
98
	    ${PATCH_WRKSRC}/collectors/python.d.plugin/python.d.plugin.in
96
99
97
post-install:
100
post-install:
98
	${MKDIR} ${STAGEDIR}${ETCDIR}
101
	${MKDIR} ${STAGEDIR}${ETCDIR}
99
	${INSTALL_DATA} ${WRKDIR}/netdata.conf.sample ${STAGEDIR}${ETCDIR}/netdata.conf.sample
102
	${INSTALL_DATA} ${WRKDIR}/netdata.conf.sample ${STAGEDIR}${ETCDIR}/netdata.conf.sample
100
	${MKDIR} ${STAGEDIR}${NETDATA_CACHE}
103
	${MKDIR} ${STAGEDIR}${NETDATA_CACHE}
101
	${MKDIR} ${STAGEDIR}${NETDATA_LOG}
104
	${MKDIR} ${STAGEDIR}${NETDATA_LOG}
102
	${MKDIR} ${STAGEDIR}${NETDATA_PERST}
105
	${MKDIR} ${STAGEDIR}${NETDATA_PERST}
103
	(for file in ${STAGEDIR}${LOCALBASE}/lib/${PORTNAME}/conf.d/*.conf \
106
	(for file in ${STAGEDIR}${LOCALBASE}/lib/${PORTNAME}/conf.d/*.conf \
104
			${STAGEDIR}${LOCALBASE}/lib/${PORTNAME}/conf.d/*/*.conf; do \
107
			${STAGEDIR}${LOCALBASE}/lib/${PORTNAME}/conf.d/*/*.conf; do \
105
		${MV} $$file $$file".sample"; \
108
		${MV} $$file $$file".sample"; \
106
	done)
109
	done)
107
110
108
.include <bsd.port.mk>
111
.include <bsd.port.mk>

Return to bug 244304