# Contributor: Carlo Landmeter # Maintainer: Kevin Daudt pkgname=netdata pkgver=1.42.0 pkgrel=1 pkgdesc="Real-time performance monitoring" url="https://www.netdata.cloud/" license="GPL-3.0-or-later" arch="all" depends="bash" makedepends=" abseil-cpp-dev autoconf automake e2fsprogs-dev json-c-dev libcap-dev libuv-dev linux-headers lz4-dev openssl-dev>3 protobuf-dev yaml-dev zlib-dev " checkdepends="cmocka-dev" pkgusers="netdata" pkggroups="netdata" subpackages="$pkgname-openrc $pkgname-python::noarch" install="$pkgname.pre-install" options="!check" # Broken tests _aclk_schemas_commit=40703f5e0258b3f4a97d3767e0f4e6833801b7d1 _ml_dlib_commit=021cbbb1c2ddec39d8dd4cb6abfbbafdf1cf4482 _mqtt_websockets_commit=cb553fd1a6929b107f36ba0c320575449b9752b6 _h2o_commit=7359e98d78d018a35f5da7523feac69f64eddb4b _c_rbuf_commit=51485be511f8c1d592b699f09f7c783aa2270375 _c_rhash_commit=f6c21836b921535ab818c7f72b77346d25f60d8e source="$pkgname-$pkgver.tar.gz::https://github.com/netdata/netdata/archive/v$pkgver.tar.gz aclk-schemas-$_aclk_schemas_commit.tar.gz::https://github.com/netdata/aclk-schemas/archive/$_aclk_schemas_commit.tar.gz dlib-$_ml_dlib_commit.tar.gz::https://github.com/davisking/dlib/archive/$_ml_dlib_commit.tar.gz mqtt_websockets-$_mqtt_websockets_commit.tar.gz::https://github.com/underhood/mqtt_websockets/archive/$_mqtt_websockets_commit.tar.gz h2o-$_h2o_commit.tar.gz::https://github.com/h2o/h2o/archive/$_h2o_commit.tar.gz c-rbuf-$_c_rbuf_commit.tar.gz::https://github.com/underhood/c-rbuf/archive/$_c_rbuf_commit.tar.gz c_rhash-$_c_rhash_commit.tar.gz::https://github.com/underhood/c_rhash/archive/$_c_rhash_commit.tar.gz cxx17-2.patch protobuf-23.patch $pkgname.initd $pkgname.confd " copy_submodule() { local name=$1 local commit=$2 local dest=$3 cp -r \ $srcdir/$name-$commit \ -T "$builddir"/$dest } prepare() { copy_submodule aclk-schemas "$_aclk_schemas_commit" aclk/aclk-schemas copy_submodule dlib "$_ml_dlib_commit" ml/dlib copy_submodule mqtt_websockets "$_mqtt_websockets_commit" mqtt_websockets copy_submodule h2o "$_h2o_commit" web/server/h2o/libh2o copy_submodule c-rbuf "$_c_rbuf_commit" mqtt_websockets/c-rbuf copy_submodule c_rhash "$_c_rhash_commit" mqtt_websockets/c_rhash default_prepare autoreconf -i } build() { CXXFLAGS="$CXXFLAGS -std=c++17" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --with-zlib \ --with-math \ --enable-https \ --with-webdir=/usr/share/webapps/netdata \ --with-user=netdata make } check() { msg "check" make check } package() { make DESTDIR="$pkgdir" install chgrp -R $pkggroups "$pkgdir"/usr/share/webapps/netdata install -Dm755 $srcdir/$pkgname.initd $pkgdir/etc/init.d/$pkgname install -Dm644 $srcdir/$pkgname.confd $pkgdir/etc/conf.d/$pkgname install -Dm644 ./system/netdata.conf $pkgdir/etc/netdata/netdata.conf install -d -m0750 -o netdata -g netdata \ "$pkgdir"/var/lib/netdata \ "$pkgdir"/var/log/netdata \ "$pkgdir"/var/cache/netdata } 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=" c96295131ceea360e8fb958ed4c9f0f46eb643056ec37e44ebfe4eca018a0a2034d654c60970f5e0875ace2caadda5cfbd5ecc10f3bab9696c69970e03c63ed2 netdata-1.42.0.tar.gz e30095ddd879e4fed5f68240d2ab13d100eaf80b8b582fc461aa6f0306c8d688a4843b1a2bbf14a8694af58103b2bc9d81aff4b2ac57bb1993697910230f7083 aclk-schemas-40703f5e0258b3f4a97d3767e0f4e6833801b7d1.tar.gz 814e3ee5811b43349a218c2b6595e53c1daf5db2c9346b2ec0ff6475cc83b1803adad3f3210f51e219d6523fcf839543087b94eb18501ee144128fb169bd9c0b dlib-021cbbb1c2ddec39d8dd4cb6abfbbafdf1cf4482.tar.gz 4639c318c5613f40375b4d9615e39b97e1287f78a01ec180ff03bb9990e7bf6cdc70980c8ed07e55d27472d2399f9e94a9b22238fed554f11e122ee5f9bce257 mqtt_websockets-cb553fd1a6929b107f36ba0c320575449b9752b6.tar.gz 8d1de96000778a742547b0481159130162d846ec61f70856a88580099f8b91691729de44831cf95a5dc85836c1b5b34ad75ab61677260f0e1c2c30f4abf143db h2o-7359e98d78d018a35f5da7523feac69f64eddb4b.tar.gz c65c3c72c60654ef575f485b45c0389198a91b307f39ce984baa4d2fc519c62d645fd226f076b2ec059a97599be8892a8270ffb57bba575c0390181244aff228 c-rbuf-51485be511f8c1d592b699f09f7c783aa2270375.tar.gz 2082de803895a1499006e683f3173205b5033c9f788f1d5a5944463c1da5bc8d8661a187e7a0ec23f9f0e0251557741f72d54a7732a3ad010930e16fa04a0853 c_rhash-f6c21836b921535ab818c7f72b77346d25f60d8e.tar.gz 39cc473fbfff28862a9c3dbbfe59005c57ccee6664bb328924c2124a8f1faeb5e6247a6405a7e498c01a975e826582c28e66b7dd4552b8923ded446bf42609cd cxx17-2.patch cfe712c6038f483fd276633330bb0cfc92c2779585e1855295da0d54e7f380d4a201a8bd25b939b69df65a8fe5a1dfa6debbcd9f4e8ca88c1caad3869fcc55a0 protobuf-23.patch 89d5e31a9ff05678bd42b79777069137bb7cb140079fb3c8a8ca52ffdcad0f800eef7a458c065a2ef10fbdd01e96ce5321b59a3d57a7528aa874a49d5a88a8b8 netdata.initd 990ea3f485d9d5ffda50e5f6169704a209d51d18a5d75f97de742b8539c764745f9f59489007d5d1091cdf9f25e8e46519c32fc43cfe527fe2fc8426b0344612 netdata.confd "