3 %bcond_without systemd # systemd
4 %bcond_with nfacct # build with nfacct plugin
6 Summary: Linux real time system monitoring, over the web
11 Group: Applications/System
12 Source0: https://github.com/firehol/netdata/archive/v%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5: 53a432f8849da6bd49b0853dd79551c5
14 URL: http://netdata.firehol.org/
15 BuildRequires: autoconf
16 BuildRequires: automake
17 BuildRequires: libmnl-devel
18 %{?with_nfacct:BuildRequires: libnetfilter_acct-devel}
19 BuildRequires: pkgconfig
20 BuildRequires: rpmbuild(macros) >= 1.202
21 BuildRequires: zlib-devel
22 Provides: group(netdata)
23 Provides: user(netdata)
24 Requires(postun): /usr/sbin/groupdel
25 Requires(postun): /usr/sbin/userdel
26 Requires(pre): /bin/id
27 Requires(pre): /usr/bin/getgid
28 Requires(pre): /usr/sbin/groupadd
29 Requires(pre): /usr/sbin/useradd
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 netdata is the fastest way to visualize metrics. It is a resource
34 efficient, highly optimized system for collecting and visualizing any
35 type of realtime timeseries data, from CPU usage, disk activity, SQL
36 queries, API calls, web site visitors, etc.
38 netdata tries to visualize the truth of now, in its greatest detail,
39 so that you can get insights of what is happening now and what just
40 happened, on your systems and applications.
53 %{__enable_disable nfacct plugin-nfacct} \
58 rm -rf $RPM_BUILD_ROOT
60 DESTDIR=$RPM_BUILD_ROOT
62 %{__rm} $RPM_BUILD_ROOT/var/{cache,log}/netdata/.keep
64 install -d $RPM_BUILD_ROOT%{systemdunitdir}
65 cp -p system/netdata-systemd $RPM_BUILD_ROOT%{systemdunitdir}/netdata.service
68 %groupadd -g 329 netdata
69 %useradd -u 329 -g netdata -c netdata -s /sbin/nologin -d / netdata
72 if [ "$1" = "0" ]; then
79 %systemd_post netdata.service
82 %systemd_preun netdata.service
85 %systemd_postun_with_restart netdata.service
89 rm -rf $RPM_BUILD_ROOT
92 %defattr(644,root,root,755)
93 %dir %{_sysconfdir}/%{name}
94 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
95 %attr(755,root,root) %{_sbindir}/%{name}
97 %dir %{_libexecdir}/%{name}
98 %{systemdunitdir}/netdata.service
99 %attr(755,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
100 %attr(755,netdata,netdata) %dir %{_localstatedir}/log/%{name}
102 %defattr(-,root,root,-)
103 %{_libexecdir}/%{name}/charts.d
104 %{_libexecdir}/%{name}/node.d
105 %{_libexecdir}/%{name}/plugins.d