]> git.pld-linux.org Git - packages/netdata.git/blame_incremental - netdata.spec
package registry directory; sample config (off)
[packages/netdata.git] / netdata.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_with nfacct # build with nfacct plugin
4
5Summary: Linux real time performance monitoring
6Name: netdata
7Version: 1.2.0
8Release: 1
9License: GPL v3+
10Group: Applications/System
11Source0: https://github.com/firehol/netdata/releases/download/v%{version}/%{name}-%{version}.tar.xz
12# Source0-md5: c23fd94e899e8934c47b14151043be27
13Source1: %{name}.conf
14Source2: %{name}.init
15Patch0: nodejs.patch
16URL: http://netdata.firehol.org/
17BuildRequires: autoconf
18BuildRequires: automake
19%{?with_nfacct:BuildRequires: libmnl-devel}
20%{?with_nfacct:BuildRequires: libnetfilter_acct-devel}
21BuildRequires: pkgconfig
22BuildRequires: rpmbuild(macros) >= 1.647
23BuildRequires: zlib-devel
24Provides: group(netdata)
25Provides: user(netdata)
26Requires(post,preun): /sbin/chkconfig
27Requires(post,preun,postun): systemd-units >= 38
28Requires(postun): /usr/sbin/groupdel
29Requires(postun): /usr/sbin/userdel
30Requires(pre): /bin/id
31Requires(pre): /usr/bin/getgid
32Requires(pre): /usr/sbin/groupadd
33Requires(pre): /usr/sbin/useradd
34Requires: rc-scripts
35Suggests: %{name}-charts
36Suggests: %{name}-nodejs
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%define _libexecdir %{_prefix}/lib
40
41%description
42netdata is the fastest way to visualize metrics. It is a resource
43efficient, highly optimized system for collecting and visualizing any
44type of realtime timeseries data, from CPU usage, disk activity, SQL
45queries, API calls, web site visitors, etc.
46
47netdata tries to visualize the truth of now, in its greatest detail,
48so that you can get insights of what is happening now and what just
49happened, on your systems and applications.
50
51%package charts
52Summary: netdata charts plugin
53Group: Applications/System
54URL: https://github.com/firehol/netdata/wiki/General-Info---charts.d
55Requires: %{name} = %{version}-%{release}
56Requires: bash >= 4
57%if "%{_rpmversion}" >= "5"
58BuildArch: noarch
59%endif
60
61%description charts
62Charts.d is BaSH script that allows you to write simple scripts for
63collecting data.
64
65It has been designed so that the actual script that will do data
66collection will be permanently in memory, collecting data with as
67little overheads as possible (i.e. initialize once, repeatedly collect
68values with minimal overhead).
69
70Charts.d looks for scripts in charts.d. The scripts should have the
71filename suffix: .chart.sh.
72
73%package nodejs
74Summary: netdata node.js plugins
75Group: Applications/System
76URL: https://github.com/firehol/netdata/wiki/General-Info---node.d
77Requires: %{name} = %{version}-%{release}
78%if "%{_rpmversion}" >= "5"
79BuildArch: noarch
80%endif
81
82%description nodejs
83node.d.plugin is a netdata plugin that provides an abstraction layer
84to allow easy and quick development of data collectors in node.js. It
85also manages all its data collectors (placed in node.d) using a single
86instance of node, thus lowering the memory footprint of data
87collection.
88
89%prep
90%setup -q
91%patch0 -p1
92
93%build
94%{__aclocal} -I m4
95%{__autoconf}
96%{__autoheader}
97%{__automake}
98%configure \
99 --libdir=%{_libexecdir} \
100 --with-zlib \
101 --with-math \
102 %{__enable_disable nfacct plugin-nfacct} \
103 --with-user=netdata
104%{__make}
105
106%install
107rm -rf $RPM_BUILD_ROOT
108%{__make} install \
109 DESTDIR=$RPM_BUILD_ROOT
110
111%{__rm} $RPM_BUILD_ROOT/var/{cache,log}/netdata/.keep
112
113install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},%{_localstatedir}/lib/%{name}/registry}
114cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
115install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
116cp -p system/netdata.service $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
117
118%clean
119rm -rf $RPM_BUILD_ROOT
120
121%pre
122%groupadd -g 329 netdata
123%useradd -u 329 -g netdata -c netdata -s /sbin/nologin -d / netdata
124
125%post
126/sbin/chkconfig --add netdata
127%service netdata restart
128%systemd_post netdata.service
129
130%preun
131if [ "$1" = "0" ]; then
132 %service -q netdata stop
133 /sbin/chkconfig --del netdata
134fi
135%systemd_preun netdata.service
136
137%postun
138if [ "$1" = "0" ]; then
139 %userremove netdata
140 %groupremove netdata
141fi
142%systemd_reload
143
144%files
145%defattr(644,root,root,755)
146%dir %{_sysconfdir}/%{name}
147%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/apps_groups.conf
148%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/netdata.conf
149%attr(754,root,root) /etc/rc.d/init.d/netdata
150%attr(755,root,root) %{_sbindir}/%{name}
151%dir %{_datadir}/%{name}
152%dir %{_libexecdir}/%{name}
153%{systemdunitdir}/netdata.service
154%attr(755,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
155%attr(755,netdata,netdata) %dir %{_localstatedir}/log/%{name}
156%attr(755,netdata,netdata) %dir %{_localstatedir}/lib/%{name}
157%attr(755,netdata,netdata) %dir %{_localstatedir}/lib/%{name}/registry
158
159%defattr(-,root,root,-)
160%{_libexecdir}/%{name}/plugins.d
161# subpackages
162%exclude %{_libexecdir}/%{name}/plugins.d/node.d.plugin
163%exclude %{_libexecdir}/%{name}/plugins.d/charts.d*
164
165%defattr(-,root,netdata,-)
166%{_datadir}/%{name}/web
167
168%files charts
169%defattr(644,root,root,755)
170%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/charts.d.conf
171%attr(755,root,root) %{_libexecdir}/%{name}/plugins.d/charts.d*
172%dir %{_libexecdir}/%{name}/charts.d
173%{_libexecdir}/%{name}/charts.d/README.md
174%attr(755,root,root) %{_libexecdir}/%{name}/charts.d/*.chart.sh
175
176%files nodejs
177%defattr(644,root,root,755)
178%attr(755,root,root) %{_libexecdir}/%{name}/plugins.d/node.d.plugin
179%dir %{_libexecdir}/%{name}/node.d
180%{_libexecdir}/%{name}/node.d/README.md
181%{_libexecdir}/%{name}/node.d/node_modules
182%attr(755,root,root) %{_libexecdir}/%{name}/node.d/*.node.js
This page took 0.056477 seconds and 4 git commands to generate.