@cryptotaxi247 / netdata-1 / commits / 33336e1ea

* EAPI -> 6 + made "hybrid" ebuild, which switches between release and live builds, just symlink the file like netdata-1.0.0.ebuild -> netdata-9999.ebuild + USE=nodejs to pull (any) nodejs version * add more runtime dependencies (mostly needed by plugins.d/charts.d.plugin) + checks for (but only warns) CONFIG_KSM enabled Kernel + installs Open-RC and systemd startup scripts

* EAPI -> 6 + made "hybrid" ebuild, which switches between release and live builds, just symlink the file like netdata-1.0.0.ebuild -> netdata-9999.ebuild + USE=nodejs to pull (any) nodejs version * add more runtime dependencies (mostly needed by plugins.d/charts.d.plugin) + checks for (but only warns) CONFIG_KSM enabled Kernel + installs Open-RC and systemd startup scripts

Christian Bricart committed Apr 2, 2016 at 00:21 UTC 33336e1ea8cabece26686112383fcf6ad4ba740d
1 file changed +60 -15
netdata-9999.ebuild
+60 -15
@@ -1,47 +1,92 @@
1 -# Copyright 1999-2015 Gentoo Foundation
1 +# Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 -EAPI=5
5 +EAPI=6
6 +
7 +inherit linux-info systemd user
8 +
9 +if [[ ${PV} == "9999" ]] ; then
10 + EGIT_REPO_URI="git://github.com/firehol/${PN}.git"
11 + EGIT_BRANCH="master"
12 + inherit git-r3 autotools
13 + SRC_URI=""
14 + KEYWORDS=""
15 +else
16 + SRC_URI="http://firehol.org/download/${PN}/releases/v${PV}/${P}.tar.xz"
17 +fi
18
7 -inherit autotools git-2 user
19
20 DESCRIPTION="Linux real time system monitoring, over the web!"
21 HOMEPAGE="https://github.com/firehol/netdata"
11 -EGIT_REPO_URI="https://github.com/firehol/netdata"
22
13 -LICENSE="GPL-2+"
23 +LICENSE="GPL-3+"
24 SLOT="0"
15 -KEYWORDS=""
16 -IUSE="nfacct +zlib"
25 +KEYWORDS="~amd64 ~x86"
26 +IUSE="+zlib nfacct nodejs"
27
18 -RDEPEND="zlib? ( sys-libs/zlib )
28 +# most unconditional dependencies are for plugins.d/charts.d.plugin:
29 +RDEPEND=">=app-shells/bash-4
30 + sys-apps/sed
31 + sys-apps/grep
32 + virtual/awk
33 + net-misc/curl
34 + net-misc/wget
35 +
36 + zlib? ( sys-libs/zlib )
37 +
38 nfacct? (
39 net-firewall/nfacct
40 net-libs/libmnl
41 + )
42 +
43 + nodejs? (
44 + net-libs/nodejs
45 )"
46 +
47 DEPEND="${RDEPEND}
48 virtual/pkgconfig"
49
50 +# check for Kernel-Samepage-Merging (CONFIG_KSM)
51 +CONFIG_CHECK="
52 + ~KSM
53 +"
54 +
55 pkg_setup() {
27 - enewgroup netdata
28 - enewuser netdata -1 -1 / netdata
56 + linux-info_pkg_setup
57 +
58 + enewgroup ${PN}
59 + enewuser ${PN} -1 -1 / ${PN}
60 +}
61 +
62 +src_unpack() {
63 + if [[ ${PV} == "9999" ]] ; then
64 + git-r3_src_unpack
65 + fi
66 + default
67 }
68
69 src_prepare() {
32 - eautoreconf
70 + if [[ ${PV} == "9999" ]] ; then
71 + eautoreconf
72 + fi
73 + default
74 }
75
76 src_configure() {
77 econf \
37 - --localstatedir="${EROOT}var" \
78 + --localstatedir=/var \
79 $(use_enable nfacct plugin-nfacct) \
80 $(use_with zlib) \
40 - --with-user=netdata
81 + --with-user=${PN} \
82 + || die "configure failed"
83 }
84
85 src_install() {
86 default
45 - fowners netdata /var/log/netdata
46 - rm -fr "${ED}/var/cache/netdata"
87 +
88 + fowners ${PN} /var/log/netdata
89 +
90 + newinitd system/netdata-openrc ${PN}
91 + systemd_newunit system/netdata-systemd ${PN}.service
92 }