From: Craig Andrews Date: Fri, 24 Jun 2016 16:40:15 +0000 (-0400) Subject: net-analyzer/netdata: add ebuilds for versions 1.2.0 and 9999 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=76a80a3953dcb014877e3390fcd9923de9c23469;p=gentoo.git net-analyzer/netdata: add ebuilds for versions 1.2.0 and 9999 Note that these ebuilds are based on the ones currently in upstream's git repository: https://github.com/firehol/netdata/blob/cd2deef34b42b8f1326493c2c40f71d2ebeaec24/netdata-9999.ebuild Except that the KSM messaging has been removed as it doesn't seem appropriate. Gentoo-bug: 586970 Closes: https://github.com/gentoo/gentoo/pull/1736 Signed-off-by: David Seifert --- diff --git a/net-analyzer/netdata/Manifest b/net-analyzer/netdata/Manifest new file mode 100644 index 000000000000..d69d88a786de --- /dev/null +++ b/net-analyzer/netdata/Manifest @@ -0,0 +1 @@ +DIST netdata-1.2.0.tar.xz 1254000 SHA256 5c1ff3fe0501b654cd92dbba3fe4c0fc125736b58d604340f138df80fb1de1ce SHA512 0c43e89c7cb52a5dde2aec13b06496ffb70fcb1952cf74156bd4400f3520b4136a94b5390077a4e5e3278a8e175dcc14505a456efafec5fdf0759af4846e03f4 WHIRLPOOL 211fabbecfd4b0ffe8f6fb5dbdc28cf08a743c4544e29dd500187547107500c1b42a95677d8de746cce367d4a59c17ff29328c47b0de65208004e6de65d63277 diff --git a/net-analyzer/netdata/metadata.xml b/net-analyzer/netdata/metadata.xml new file mode 100644 index 000000000000..ca4b03cea3c1 --- /dev/null +++ b/net-analyzer/netdata/metadata.xml @@ -0,0 +1,21 @@ + + + + + candrews@integralblue.com + Craig Andrews + Proxied maintainer; set to assignee in all bugs + + + proxy-maint@gentoo.org + Proxy Maintainers + + + Enable compression via zlib + Enable the nfacct plugin + Enable use of nodejs (which some plugins use) + + + Linux real time system monitoring web interface + + diff --git a/net-analyzer/netdata/netdata-1.2.0.ebuild b/net-analyzer/netdata/netdata-1.2.0.ebuild new file mode 100644 index 000000000000..93b70ba211ab --- /dev/null +++ b/net-analyzer/netdata/netdata-1.2.0.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit linux-info systemd user + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://github.com/firehol/${PN}.git" + inherit git-r3 autotools + SRC_URI="" + KEYWORDS="" +else + SRC_URI="https://firehol.org/download/${PN}/releases/v${PV}/${P}.tar.xz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Linux real time system monitoring, done right!" +HOMEPAGE="https://github.com/firehol/netdata https://my-netdata.io/" + +LICENSE="GPL-3+ MIT BSD" +SLOT="0" +IUSE="+compression nfacct nodejs" + +# most unconditional dependencies are for plugins.d/charts.d.plugin: +RDEPEND=" + >=app-shells/bash-4:0 + net-misc/curl + net-misc/wget + virtual/awk + compression? ( sys-libs/zlib ) + nfacct? ( + net-firewall/nfacct + net-libs/libmnl + ) + nodejs? ( + net-libs/nodejs + )" + +DEPEND="${RDEPEND} + virtual/pkgconfig" + +: ${NETDATA_USER:=netdata} +: ${NETDATA_GROUP:=netdata} + +pkg_setup() { + linux-info_pkg_setup + + enewgroup ${PN} + enewuser ${PN} -1 -1 / ${PN} +} + +src_prepare() { + default + [[ ${PV} == "9999" ]] && eautoreconf +} + +src_configure() { + econf \ + --localstatedir=/var \ + --with-user=${NETDATA_USER} \ + $(use_enable nfacct plugin-nfacct) \ + $(use_with compression zlib) +} + +src_install() { + default + + fowners ${NETDATA_USER}:${NETDATA_GROUP} /var/log/netdata + fowners ${NETDATA_USER}:${NETDATA_GROUP} /var/cache/netdata + + chown -Rc ${NETDATA_USER}:${NETDATA_GROUP} "${ED}"/usr/share/${PN} || die + + newinitd system/netdata-openrc ${PN} + systemd_dounit system/netdata.service +} diff --git a/net-analyzer/netdata/netdata-9999.ebuild b/net-analyzer/netdata/netdata-9999.ebuild new file mode 100644 index 000000000000..93b70ba211ab --- /dev/null +++ b/net-analyzer/netdata/netdata-9999.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit linux-info systemd user + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://github.com/firehol/${PN}.git" + inherit git-r3 autotools + SRC_URI="" + KEYWORDS="" +else + SRC_URI="https://firehol.org/download/${PN}/releases/v${PV}/${P}.tar.xz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Linux real time system monitoring, done right!" +HOMEPAGE="https://github.com/firehol/netdata https://my-netdata.io/" + +LICENSE="GPL-3+ MIT BSD" +SLOT="0" +IUSE="+compression nfacct nodejs" + +# most unconditional dependencies are for plugins.d/charts.d.plugin: +RDEPEND=" + >=app-shells/bash-4:0 + net-misc/curl + net-misc/wget + virtual/awk + compression? ( sys-libs/zlib ) + nfacct? ( + net-firewall/nfacct + net-libs/libmnl + ) + nodejs? ( + net-libs/nodejs + )" + +DEPEND="${RDEPEND} + virtual/pkgconfig" + +: ${NETDATA_USER:=netdata} +: ${NETDATA_GROUP:=netdata} + +pkg_setup() { + linux-info_pkg_setup + + enewgroup ${PN} + enewuser ${PN} -1 -1 / ${PN} +} + +src_prepare() { + default + [[ ${PV} == "9999" ]] && eautoreconf +} + +src_configure() { + econf \ + --localstatedir=/var \ + --with-user=${NETDATA_USER} \ + $(use_enable nfacct plugin-nfacct) \ + $(use_with compression zlib) +} + +src_install() { + default + + fowners ${NETDATA_USER}:${NETDATA_GROUP} /var/log/netdata + fowners ${NETDATA_USER}:${NETDATA_GROUP} /var/cache/netdata + + chown -Rc ${NETDATA_USER}:${NETDATA_GROUP} "${ED}"/usr/share/${PN} || die + + newinitd system/netdata-openrc ${PN} + systemd_dounit system/netdata.service +}