Summary: Linux real time system monitoring, over the web
Name: netdata
Version: 1.0.0
-Release: 0.4
+Release: 0.7
License: GPL v3+
Group: Applications/System
Source0: https://github.com/firehol/netdata/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 1.202
BuildRequires: zlib-devel
+Suggests: %{name}-nodejs
Provides: group(netdata)
Provides: user(netdata)
Requires(postun): /usr/sbin/groupdel
Requires(pre): /usr/sbin/useradd
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _libexecdir %{_prefix}/lib
+
%description
netdata is the fastest way to visualize metrics. It is a resource
efficient, highly optimized system for collecting and visualizing any
so that you can get insights of what is happening now and what just
happened, on your systems and applications.
+%package nodejs
+Summary: netdata node.js plugins
+Group: Applications/System
+URL: https://github.com/firehol/netdata/wiki/General-Info---node.d
+Requires: %{name} = %{version}-%{release}
+Requires: nodejs
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
+
+%description nodejs
+node.d.plugin is a netdata plugin that provides an abstraction layer
+to allow easy and quick development of data collectors in node.js. It
+also manages all its data collectors (placed in node.d) using a single
+instance of node, thus lowering the memory footprint of data
+collection.
+
%prep
%setup -q
%{__autoheader}
%{__automake}
%configure \
+ --libdir=%{_libexecdir} \
--with-zlib \
--with-math \
%{__enable_disable nfacct plugin-nfacct} \
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
%{__rm} $RPM_BUILD_ROOT/var/{cache,log}/netdata/.keep
%defattr(-,root,root,-)
%{_libexecdir}/%{name}/charts.d
-%{_libexecdir}/%{name}/node.d
%{_libexecdir}/%{name}/plugins.d
+
+%files nodejs
+%defattr(644,root,root,755)
+%dir %{_libexecdir}/%{name}/node.d
+%{_libexecdir}/%{name}/node.d/README.md
+%{_libexecdir}/%{name}/node.d/node_modules
+%attr(755,root,root) %{_libexecdir}/%{name}/node.d/*.node.js