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