summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2016-06-24 12:40:15 -0400
committerDavid Seifert <soap@gentoo.org>2016-07-01 23:11:18 +0200
commit76a80a3953dcb014877e3390fcd9923de9c23469 (patch)
tree7ed12bd01984df56eb8f611b866b055da44ccecd /net-analyzer/netdata/netdata-9999.ebuild
parentapp-misc/lirc-0.9.4: version bump (diff)
downloadgentoo-76a80a3953dcb014877e3390fcd9923de9c23469.tar.gz
gentoo-76a80a3953dcb014877e3390fcd9923de9c23469.tar.bz2
gentoo-76a80a3953dcb014877e3390fcd9923de9c23469.zip
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 <soap@gentoo.org>
Diffstat (limited to 'net-analyzer/netdata/netdata-9999.ebuild')
-rw-r--r--net-analyzer/netdata/netdata-9999.ebuild77
1 files changed, 77 insertions, 0 deletions
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
+}