70 lines
2 KiB
Bash
70 lines
2 KiB
Bash
# Template file for 'netdata'
|
|
pkgname=netdata
|
|
version=1.24.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 libressl-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="http://my-netdata.io"
|
|
distfiles="https://github.com/netdata/netdata/releases/download/v${version}/netdata-v${version}.tar.gz"
|
|
checksum=e7d6691fdce893b5a341fc2ee11b3b4f951e7b426031fae4178e669066c264c0
|
|
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
|
|
}
|
|
}
|