void-packages/srcpkgs/netdata/template

71 lines
2.0 KiB
Bash

# Template file for 'netdata'
pkgname=netdata
version=1.28.0
revision=2
wrksrc="${pkgname}-v${version}"
build_style=gnu-configure
configure_args="--with-user=_netdata ac_cv_file_externaldeps_libbpf_libbpf_a=no"
hostmakedepends="pkg-config autoconf automake"
makedepends="json-c-devel judy-devel libcap-devel liblz4-devel libmnl-devel
libnetfilter_acct-devel openssl-devel libuuid-devel libuv-devel zlib-devel"
depends="libcap-progs"
short_desc="Real-time performance monitoring, done right"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://www.netdata.cloud/"
distfiles="https://github.com/netdata/netdata/releases/download/v${version}/netdata-v${version}.tar.gz"
checksum=44801e240b1883a98d203156397cc8d9232492f3136891e61074e2e7facbf1a8
python_version=3
make_dirs="
/var/lib/netdata 0755 _netdata _netdata
/var/lib/netdata/registry 0755 _netdata root
/var/cache/netdata 0755 _netdata _netdata
/var/log/netdata 0755 _netdata _netdata
"
system_accounts="_netdata"
conf_files="/etc/${pkgname}/*.conf"
subpackages="netdata-plugins-python"
case "$XBPS_TARGET_MACHINE" in
ppc64*) ;;
ppc*) _without_node=yes ;;
esac
if [ -z "$_without_node" ]; then
subpackages+=" netdata-plugins-nodejs"
fi
pre_configure() {
autoreconf -ivf
}
post_install() {
vsv netdata
vcopy ${FILESDIR}/netdata.conf etc/$pkgname/
if [ -n "$_without_node" ]; then
rm -rf ${DESTDIR}/usr/libexec/netdata/node.d
rm -rf ${DESTDIR}/usr/libexec/netdata/plugins.d/node.d.plugin
fi
}
netdata-plugins-nodejs_package() {
short_desc+=" - NodeJS Plugins"
depends="${sourcepkg}>=${version}_${revision} virtual?nodejs-runtime"
pkg_install() {
vmove usr/libexec/netdata/plugins.d/node.d.plugin
vmove usr/libexec/netdata/node.d
}
}
netdata-plugins-python_package() {
short_desc+=" - Python Plugins"
depends="${sourcepkg}>=${version}_${revision} python3"
pkg_install() {
vmove usr/libexec/netdata/plugins.d/python.d.plugin
vmove usr/libexec/netdata/python.d
vmove etc/netdata/python.d
}
}