Files

139 lines
5.1 KiB
Tcl
Raw Permalink Normal View History

2021-04-21 10:06:40 -06:00
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
2025-03-18 19:02:13 -04:00
PortGroup cmake 1.1
2024-01-30 21:32:03 -05:00
PortGroup github 1.0
PortGroup legacysupport 1.1
2021-04-21 10:06:40 -06:00
2025-04-30 04:22:06 +03:00
# clock_gettime, utimensat
legacysupport.newest_darwin_requires_legacy 16
2025-04-29 15:09:53 +03:00
2025-12-03 05:09:48 +03:00
github.setup netdata netdata 2.8.1 v
2021-04-21 10:06:40 -06:00
github.tarball_from releases
2024-01-30 21:32:03 -05:00
revision 0
2021-04-21 10:06:40 -06:00
categories sysutils
license GPL-3
2025-03-18 19:02:13 -04:00
maintainers {gmail.com:herby.gillot @herbygillot} \
openmaintainer
2021-04-21 10:06:40 -06:00
description Real-time performance monitoring done right
long_description Netdata's distributed, real-time monitoring Agent \
collects thousands of metrics from systems, hardware, \
containers, and applications with zero configuration. \
It runs permanently on all your physical/virtual servers, \
containers, cloud deployments, and edge/IoT devices, and \
is perfectly safe to install on your systems mid-incident \
without any preparation.
2021-04-22 11:30:15 -06:00
2025-04-29 15:09:53 +03:00
# defined in CMakeLists
compiler.cxx_standard 2014
2021-04-22 11:30:15 -06:00
compiler.thread_local_storage \
yes
2025-04-30 04:22:06 +03:00
# fails to build on <10.12 with Xcode Clang
compiler.blacklist-append \
{clang < 900}
2021-04-22 11:30:15 -06:00
2025-04-29 15:09:53 +03:00
depends_build-append path:bin/git:git \
port:pkgconfig
2021-04-21 10:06:40 -06:00
2025-03-18 19:02:13 -04:00
depends_lib-append bin:curl:curl \
lib:libuuid:libuuid \
2024-02-16 22:31:42 -05:00
path:lib/libssl.dylib:openssl \
2024-01-30 21:32:03 -05:00
path:lib/pkgconfig/libuv.pc:libuv \
2025-03-18 19:02:13 -04:00
port:brotli \
2021-04-21 10:06:40 -06:00
port:json-c \
port:judy \
2024-01-30 21:32:03 -05:00
port:libyaml \
2025-03-18 19:02:13 -04:00
port:protobuf-c \
port:lz4 \
port:pcre2 \
port:snappy \
port:zstd
2021-04-21 10:06:40 -06:00
2025-03-18 19:02:13 -04:00
distname ${name}-v${version}
2021-04-21 10:06:40 -06:00
2025-12-03 05:09:48 +03:00
checksums rmd160 109a6322a541c629ad822eb44f05d40b6f88a3bd \
sha256 373b61241d5cc80addeb0cc6c9f434abf363333081056a7d7ba6ea1f46ba6f06 \
size 16478236
2021-04-21 10:06:40 -06:00
set netdata_user netdata
set netdata_group netdata
2025-03-18 19:02:13 -04:00
set netdata_web_subpath share/${name}/web
2021-04-21 10:06:40 -06:00
set netdata_conf_dir ${prefix}/etc/${name}
set netdata_cache_dir ${prefix}/var/cache/${name}
set netdata_log_dir ${prefix}/var/log/${name}
set netdata_lib_dir ${prefix}/var/lib/${name}
2025-03-18 19:02:13 -04:00
set netdata_web_dir ${prefix}/${netdata_web_subpath}
2025-12-03 05:09:48 +03:00
configure.args-append -DENABLE_PLUGIN_OTEL=NO \
-DENABLE_PLUGIN_GO=NO \
2025-04-13 00:22:08 -04:00
-DWEB_DIR=${netdata_web_subpath}
2021-04-21 10:06:40 -06:00
add_users ${netdata_user} group=${netdata_group}
2025-12-03 05:09:48 +03:00
variant otel_plugin description {Enable OpenTelemetry plugin} {
configure.args-append -DENABLE_PLUGIN_OTEL=YES
depends_build-append port:rust \
port:cargo
}
2025-04-13 00:22:08 -04:00
variant go_plugin description {Enable Go plugin} {
configure.args-append -DENABLE_PLUGIN_GO=YES
depends_build-append port:go
}
notes "
Go plugin is now a variant. To install, use \"+go\":
Ie.,
$ sudo port install netdata +go
"
2021-04-22 11:30:15 -06:00
if { ${name} eq ${subport} } {
startupitem.create yes
startupitem.executable ${prefix}/sbin/netdata -D
2021-04-21 10:06:40 -06:00
2021-04-22 11:30:15 -06:00
destroot.keepdirs-append \
${destroot}${netdata_cache_dir} \
${destroot}${netdata_log_dir} \
${destroot}${netdata_lib_dir}
2021-04-21 10:06:40 -06:00
2025-04-29 15:09:53 +03:00
post-patch {
2025-03-18 19:02:13 -04:00
reinplace -E {s|usr/bin|bin|g} ${worksrcpath}/CMakeLists.txt
reinplace -E {s|usr/lib|lib|g} ${worksrcpath}/CMakeLists.txt
reinplace -E {s|usr/sbin|sbin|g} ${worksrcpath}/CMakeLists.txt
reinplace -E {s|usr/share|share|g} ${worksrcpath}/CMakeLists.txt
}
2021-04-22 11:30:15 -06:00
post-destroot {
xinstall -m 0644 ${worksrcpath}/system/netdata.conf ${destroot}${netdata_conf_dir}
2021-04-21 10:06:40 -06:00
2021-04-22 11:30:15 -06:00
reinplace "s|NETDATA_USER_CONFIG_DIR=\"/|NETDATA_USER_CONFIG_DIR=\"${prefix}/|" ${destroot}${netdata_conf_dir}/edit-config
reinplace "s|NETDATA_STOCK_CONFIG_DIR=\"/|NETDATA_STOCK_CONFIG_DIR=\"${prefix}/|" ${destroot}${netdata_conf_dir}/edit-config
2021-04-21 10:06:40 -06:00
2021-04-22 11:30:15 -06:00
xinstall -d -o ${netdata_user} -g ${netdata_group} ${destroot}${netdata_cache_dir}
xinstall -d -o ${netdata_user} -g ${netdata_group} ${destroot}${netdata_log_dir}
xinstall -d -o ${netdata_user} -g ${netdata_group} ${destroot}${netdata_lib_dir}
touch ${destroot}${netdata_conf_dir}/.opt-out-from-anonymous-statistics
system "chown -R ${netdata_user}:${netdata_group} ${destroot}${netdata_web_dir}"
}
}
subport ${name}-dashboard {
2025-03-18 19:02:13 -04:00
PortGroup obsolete 1.0
name netdata-dashboard
version 3.0.4
revision 0
2021-04-22 11:30:15 -06:00
description Static assets for the Netdata Agent dashboard.
long_description {*}${description}
2025-03-18 19:02:13 -04:00
replaced_by netdata
2021-04-21 10:06:40 -06:00
}