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

Collapse All | Expand All

(-)net-mgmt/netdata/Makefile (-3 / +6 lines)
Lines 1-106 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.19.0
5
PORTVERSION=	1.19.0
6
DISTVERSIONPREFIX=	v
6
DISTVERSIONPREFIX=	v
7
PORTREVISION=	1
7
PORTREVISION=	2
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
19
20
USES=		autoreconf cpe pathfix pkgconfig:both python shebangfix ssl
20
USES=		autoreconf cpe pathfix pkgconfig:both python shebangfix ssl
21
21
22
USE_GITHUB=	yes
22
USE_GITHUB=	yes
23
23
24
SHEBANG_GLOB=	*
24
SHEBANG_GLOB=	*
25
25
26
NETDATA_CACHE=	/var/cache/${PORTNAME}
26
NETDATA_CACHE=	/var/cache/${PORTNAME}
27
NETDATA_LOG=	/var/log/${PORTNAME}
27
NETDATA_LOG=	/var/log/${PORTNAME}
28
NETDATA_PERST=	/var/db/${PORTNAME}
28
NETDATA_PERST=	/var/db/${PORTNAME}
29
29
30
GNU_CONFIGURE=	yes
30
GNU_CONFIGURE=	yes
31
CPPFLAGS+=	-D_WANT_VMMETER -I${LOCALBASE}/include
31
CPPFLAGS+=	-D_WANT_VMMETER -I${LOCALBASE}/include
32
LIBS+=		-L${LOCALBASE}/lib
32
LIBS+=		-L${LOCALBASE}/lib
33
INSTALL_TARGET=	install-strip
33
INSTALL_TARGET=	install-strip
34
34
35
SUB_LIST=	NETDATA_CACHE=${NETDATA_CACHE} \
35
SUB_LIST=	NETDATA_CACHE=${NETDATA_CACHE} \
36
		NETDATA_LOG=${NETDATA_LOG} \
36
		NETDATA_LOG=${NETDATA_LOG} \
37
		NETDATA_PERST=${NETDATA_PERST}
37
		NETDATA_PERST=${NETDATA_PERST}
38
38
39
PLIST_SUB=	NETDATA_CACHE=${NETDATA_CACHE} \
39
PLIST_SUB=	NETDATA_CACHE=${NETDATA_CACHE} \
40
		NETDATA_LOG=${NETDATA_LOG} \
40
		NETDATA_LOG=${NETDATA_LOG} \
41
		NETDATA_PERST=${NETDATA_PERST}
41
		NETDATA_PERST=${NETDATA_PERST}
42
42
43
USE_RC_SUBR=	${PORTNAME}
43
USE_RC_SUBR=	${PORTNAME}
44
SUB_FILES=	${PORTNAME}.conf.sample
44
SUB_FILES=	${PORTNAME}.conf.sample
45
45
46
USERS=		netdata
46
USERS=		netdata
47
GROUPS=		netdata
47
GROUPS=		netdata
48
48
49
OPTIONS_DEFINE=		CUPS DBENGINE FREEIPMI JSON LTO
49
OPTIONS_DEFINE=		CUPS DBENGINE FREEIPMI GODPLUGIN JSON LTO
50
OPTIONS_SUB=		YES
50
OPTIONS_SUB=		YES
51
OPTIONS_DEFAULT=	DBENGINE JSON
51
OPTIONS_DEFAULT=	DBENGINE GODPLUGIN JSON
52
OPTIONS_DEFAULT_FreeBSD_12=	LTO
52
OPTIONS_DEFAULT_FreeBSD_12=	LTO
53
OPTIONS_DEFAULT_FreeBSD_13=	LTO
53
OPTIONS_DEFAULT_FreeBSD_13=	LTO
54
OPTIONS_DEFAULT+=	${OPTIONS_DEFAULT_${OPSYS}_${OSREL:R}}
54
OPTIONS_DEFAULT+=	${OPTIONS_DEFAULT_${OPSYS}_${OSREL:R}}
55
55
56
CUPS_DESC=		Enable support for cups
56
CUPS_DESC=		Enable support for cups
57
CUPS_CONFIGURE_ENABLE=	plugin-cups
57
CUPS_CONFIGURE_ENABLE=	plugin-cups
58
CUPS_LIB_DEPENDS=	libcups.so:print/cups
58
CUPS_LIB_DEPENDS=	libcups.so:print/cups
59
59
60
DBENGINE_DESC=			Enable support for database engine
60
DBENGINE_DESC=			Enable support for database engine
61
DBENGINE_CONFIGURE_ENABLE=	dbengine
61
DBENGINE_CONFIGURE_ENABLE=	dbengine
62
DBENGINE_LIB_DEPENDS=		libJudy.so:devel/judy \
62
DBENGINE_LIB_DEPENDS=		libJudy.so:devel/judy \
63
				liblz4.so:archivers/liblz4 \
63
				liblz4.so:archivers/liblz4 \
64
				libuv.so:devel/libuv
64
				libuv.so:devel/libuv
65
65
66
FREEIPMI_DESC=			Enable support for freeipmi
66
FREEIPMI_DESC=			Enable support for freeipmi
67
FREEIPMI_CONFIGURE_ENABLE=	plugin-freeipmi
67
FREEIPMI_CONFIGURE_ENABLE=	plugin-freeipmi
68
FREEIPMI_LIB_DEPENDS=		libfreeipmi.so:sysutils/freeipmi
68
FREEIPMI_LIB_DEPENDS=		libfreeipmi.so:sysutils/freeipmi
69
69
70
GODPLUGIN_DESC=		Enable the go collector plugin
71
GODPLUGIN_RUN_DEPENDS=	${LOCALBASE}/libexec/netdata/plugins.d/god.plugin:net-mgmt/netdata-go
72
70
JSON_DESC=		Enable support for json
73
JSON_DESC=		Enable support for json
71
JSON_CONFIGURE_ENABLE=	jsonc
74
JSON_CONFIGURE_ENABLE=	jsonc
72
JSON_LIB_DEPENDS=	libjson-c.so:devel/json-c
75
JSON_LIB_DEPENDS=	libjson-c.so:devel/json-c
73
76
74
LTO_DESC=		Use Link-Time Optimization
77
LTO_DESC=		Use Link-Time Optimization
75
LTO_CONFIGURE_ENABLE=	lto
78
LTO_CONFIGURE_ENABLE=	lto
76
LTO_USES=		compiler:c11
79
LTO_USES=		compiler:c11
77
80
78
.include <bsd.port.options.mk>
81
.include <bsd.port.options.mk>
79
.if ${PORT_OPTIONS:MLTO} && ${OPSYS}_${OSREL:R} == FreeBSD_11
82
.if ${PORT_OPTIONS:MLTO} && ${OPSYS}_${OSREL:R} == FreeBSD_11
80
BROKEN=		Link-Time Optimization breaks compilation on FreeBSD 11
83
BROKEN=		Link-Time Optimization breaks compilation on FreeBSD 11
81
.endif
84
.endif
82
85
83
post-patch:
86
post-patch:
84
	@${REINPLACE_CMD} -e 's|%%NETDATA_CACHE%%|${NETDATA_CACHE}|g' \
87
	@${REINPLACE_CMD} -e 's|%%NETDATA_CACHE%%|${NETDATA_CACHE}|g' \
85
	    ${PATCH_WRKSRC}/configure.ac
88
	    ${PATCH_WRKSRC}/configure.ac
86
	@${REINPLACE_CMD} -e 's|%%NETDATA_LOG%%|${NETDATA_LOG}|g' \
89
	@${REINPLACE_CMD} -e 's|%%NETDATA_LOG%%|${NETDATA_LOG}|g' \
87
	    ${PATCH_WRKSRC}/configure.ac
90
	    ${PATCH_WRKSRC}/configure.ac
88
	@${REINPLACE_CMD} -e 's|%%NETDATA_PERST%%|${NETDATA_PERST}|g' \
91
	@${REINPLACE_CMD} -e 's|%%NETDATA_PERST%%|${NETDATA_PERST}|g' \
89
	    ${PATCH_WRKSRC}/configure.ac
92
	    ${PATCH_WRKSRC}/configure.ac
90
	@${REINPLACE_CMD} -e 's|%%ETCDIR%%|${ETCDIR}|g' \
93
	@${REINPLACE_CMD} -e 's|%%ETCDIR%%|${ETCDIR}|g' \
91
	    ${PATCH_WRKSRC}/configure.ac
94
	    ${PATCH_WRKSRC}/configure.ac
92
	@${REINPLACE_CMD} -e 's|%%PYTHON%%|${PYTHON_CMD}|g' \
95
	@${REINPLACE_CMD} -e 's|%%PYTHON%%|${PYTHON_CMD}|g' \
93
	    ${PATCH_WRKSRC}/collectors/python.d.plugin/python.d.plugin.in
96
	    ${PATCH_WRKSRC}/collectors/python.d.plugin/python.d.plugin.in
94
97
95
post-install:
98
post-install:
96
	${MKDIR} ${STAGEDIR}${ETCDIR}
99
	${MKDIR} ${STAGEDIR}${ETCDIR}
97
	${INSTALL_DATA} ${WRKDIR}/netdata.conf.sample ${STAGEDIR}${ETCDIR}/netdata.conf.sample
100
	${INSTALL_DATA} ${WRKDIR}/netdata.conf.sample ${STAGEDIR}${ETCDIR}/netdata.conf.sample
98
	${MKDIR} ${STAGEDIR}${NETDATA_CACHE}
101
	${MKDIR} ${STAGEDIR}${NETDATA_CACHE}
99
	${MKDIR} ${STAGEDIR}${NETDATA_LOG}
102
	${MKDIR} ${STAGEDIR}${NETDATA_LOG}
100
	${MKDIR} ${STAGEDIR}${NETDATA_PERST}
103
	${MKDIR} ${STAGEDIR}${NETDATA_PERST}
101
	(for file in ${STAGEDIR}${LOCALBASE}/lib/${PORTNAME}/conf.d/*.conf \
104
	(for file in ${STAGEDIR}${LOCALBASE}/lib/${PORTNAME}/conf.d/*.conf \
102
			${STAGEDIR}${LOCALBASE}/lib/${PORTNAME}/conf.d/*/*.conf; do \
105
			${STAGEDIR}${LOCALBASE}/lib/${PORTNAME}/conf.d/*/*.conf; do \
103
		${MV} $$file $$file".sample"; \
106
		${MV} $$file $$file".sample"; \
104
	done)
107
	done)
105
108
106
.include <bsd.port.mk>
109
.include <bsd.port.mk>

Return to bug 244304