# Contributor: Carlo Landmeter # Maintainer: Kevin Daudt pkgname=netdata pkgver=1.18.1 pkgrel=1 pkgdesc="Real-time performance monitoring" url="https://www.netdata.cloud/" license="GPL-3.0-or-later" arch="all" depends="bash" makedepends="zlib-dev e2fsprogs-dev linux-headers libcap-dev automake autoconf" pkgusers="netdata" pkggroups="netdata" subpackages="$pkgname-openrc $pkgname-nodejs::noarch $pkgname-python::noarch" install="$pkgname.pre-install" source="$pkgname-$pkgver.tar.gz::https://github.com/netdata/netdata/archive/v$pkgver.tar.gz $pkgname.initd" build() { autoreconf -i ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --with-zlib \ --with-math \ --with-webdir=/usr/share/webapss/netdata \ --with-user=netdata make } check() { make check } package() { make DESTDIR="$pkgdir" install chgrp -R $pkggroups "$pkgdir"/usr/share/webapss/netdata chown -R $pkgusers:$pkggroups $pkgdir/var/lib/netdata \ $pkgdir/var/cache/netdata install -Dm755 $srcdir/$pkgname.initd \ $pkgdir/etc/init.d/$pkgname install -Dm644 ./system/netdata.conf $pkgdir/etc/netdata/netdata.conf # cap needed for disk I/O utilization reporting setcap cap_dac_read_search,cap_sys_ptrace+ep \ "$pkgdir"/usr/libexec/netdata/plugins.d/apps.plugin } nodejs() { pkgdesc="$pkgdesc (nodejs support)" depends="$pkgname nodejs" mkdir -p "$subpkgdir"/etc/netdata mkdir -p "$subpkgdir"/usr/libexec/netdata/plugins.d mkdir -p "$subpkgdir"/usr/lib/netdata/conf.d mv $pkgdir/usr/libexec/netdata/node.d \ $subpkgdir/usr/libexec/netdata mv $pkgdir/usr/libexec/netdata/plugins.d/node.d.plugin \ $subpkgdir/usr/libexec/netdata/plugins.d mv $pkgdir/etc/netdata/node.d \ $subpkgdir/etc/netdata/ mv $pkgdir/usr/lib/netdata/conf.d/node.d.conf \ $subpkgdir/usr/lib/netdata/conf.d } python() { pkgdesc="$pkgdesc (python3 support)" depends="$pkgname python3" mkdir -p "$subpkgdir"/etc/netdata mkdir -p "$subpkgdir"/usr/libexec/netdata/plugins.d mkdir -p "$subpkgdir"/usr/lib/netdata/conf.d mv $pkgdir/usr/libexec/netdata/python.d \ "$subpkgdir"/usr/libexec/netdata mv $pkgdir/usr/libexec/netdata/plugins.d/python.d.plugin \ "$subpkgdir"/usr/libexec/netdata/plugins.d mv $pkgdir/etc/netdata/python.d \ $subpkgdir/etc/netdata/ mv $pkgdir/usr/lib/netdata/conf.d/python.d \ $subpkgdir/usr/lib/netdata/conf.d mv $pkgdir/usr/lib/netdata/conf.d/python.d.conf \ $subpkgdir/usr/lib/netdata/conf.d } sha512sums="fb72f4729e05ab83fe9462e31b10fc40243472ea9f6cbb9421e2ca549810f2f80b28b05e886faa66e15c53b317ee559a3e0fb3d382c36a424dd39fec779918d9 netdata-1.18.1.tar.gz 0cc96162524bec0562e7ba0449d7d39ca6edd1928e2c1ac9f579a1fe5ea442f8ce670d04e84d2cac7c09843a9df7ed8151a6a3d2377713ffba4c86b43b8d9096 netdata.initd"