]> git.pld-linux.org Git - packages/netdata.git/blame - netdata.spec
libuuid-devel -- No package 'uuid' found
[packages/netdata.git] / netdata.spec
CommitLineData
dbcc502d
ER
1#
2# Conditional build:
dbcc502d
ER
3%bcond_with nfacct # build with nfacct plugin
4
94cfc344 5Summary: Linux real time performance monitoring
dbcc502d 6Name: netdata
94cfc344 7Version: 1.2.0
cf647efe 8Release: 1
4f48df40 9License: GPL v3+
dbcc502d 10Group: Applications/System
94cfc344
ER
11Source0: https://github.com/firehol/netdata/releases/download/v%{version}/%{name}-%{version}.tar.xz
12# Source0-md5: c23fd94e899e8934c47b14151043be27
01f0b59e 13Source1: %{name}.conf
1aa35efd 14Source2: %{name}.init
ea1ae9aa 15Patch0: nodejs.patch
dbcc502d 16URL: http://netdata.firehol.org/
085a70e6
ER
17BuildRequires: autoconf
18BuildRequires: automake
65ecfdca 19%{?with_nfacct:BuildRequires: libmnl-devel}
dbcc502d 20%{?with_nfacct:BuildRequires: libnetfilter_acct-devel}
c5372cd5 21BuildRequires: libuuid-devel
085a70e6 22BuildRequires: pkgconfig
1aa35efd 23BuildRequires: rpmbuild(macros) >= 1.647
dbcc502d 24BuildRequires: zlib-devel
1229dd1c
ER
25Provides: group(netdata)
26Provides: user(netdata)
1aa35efd
ER
27Requires(post,preun): /sbin/chkconfig
28Requires(post,preun,postun): systemd-units >= 38
1229dd1c
ER
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
1aa35efd 35Requires: rc-scripts
1aa35efd
ER
36Suggests: %{name}-charts
37Suggests: %{name}-nodejs
dbcc502d
ER
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
f241237d
ER
40%define _libexecdir %{_prefix}/lib
41
dbcc502d
ER
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
bd51d1ce
ER
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
f241237d
ER
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}
f241237d
ER
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
dbcc502d
ER
90%prep
91%setup -q
ea1ae9aa 92%patch0 -p1
dbcc502d
ER
93
94%build
95%{__aclocal} -I m4
96%{__autoconf}
97%{__autoheader}
98%{__automake}
99%configure \
f241237d 100 --libdir=%{_libexecdir} \
dbcc502d
ER
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
cf647efe 112%{__rm} $RPM_BUILD_ROOT/var/{cache,log}/netdata/.keep
1aa35efd 113
2f40a1c0 114install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},%{_localstatedir}/lib/%{name}/registry}
f241237d 115cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
1aa35efd 116install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
f5dc427f 117cp -p system/netdata.service $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
01f0b59e 118
1aa35efd
ER
119%clean
120rm -rf $RPM_BUILD_ROOT
121
dbcc502d 122%pre
1229dd1c
ER
123%groupadd -g 329 netdata
124%useradd -u 329 -g netdata -c netdata -s /sbin/nologin -d / netdata
125
dbcc502d 126%post
1aa35efd
ER
127/sbin/chkconfig --add netdata
128%service netdata restart
dbcc502d
ER
129%systemd_post netdata.service
130
131%preun
1aa35efd
ER
132if [ "$1" = "0" ]; then
133 %service -q netdata stop
134 /sbin/chkconfig --del netdata
135fi
dbcc502d
ER
136%systemd_preun netdata.service
137
138%postun
1aa35efd
ER
139if [ "$1" = "0" ]; then
140 %userremove netdata
141 %groupremove netdata
142fi
143%systemd_reload
dbcc502d
ER
144
145%files
146%defattr(644,root,root,755)
147%dir %{_sysconfdir}/%{name}
c8a7f904
ER
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
1aa35efd 150%attr(754,root,root) /etc/rc.d/init.d/netdata
dbcc502d 151%attr(755,root,root) %{_sbindir}/%{name}
cf647efe 152%dir %{_datadir}/%{name}
5c048d80 153%dir %{_libexecdir}/%{name}
dbcc502d
ER
154%{systemdunitdir}/netdata.service
155%attr(755,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
156%attr(755,netdata,netdata) %dir %{_localstatedir}/log/%{name}
2f40a1c0
ER
157%attr(755,netdata,netdata) %dir %{_localstatedir}/lib/%{name}
158%attr(755,netdata,netdata) %dir %{_localstatedir}/lib/%{name}/registry
5c048d80
ER
159
160%defattr(-,root,root,-)
5c048d80 161%{_libexecdir}/%{name}/plugins.d
bd51d1ce 162# subpackages
9c1cee53 163%exclude %{_libexecdir}/%{name}/plugins.d/node.d.plugin
bd51d1ce
ER
164%exclude %{_libexecdir}/%{name}/plugins.d/charts.d*
165
cf647efe
ER
166%defattr(-,root,netdata,-)
167%{_datadir}/%{name}/web
168
bd51d1ce
ER
169%files charts
170%defattr(644,root,root,755)
c8a7f904 171%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/charts.d.conf
bd51d1ce
ER
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
f241237d
ER
176
177%files nodejs
178%defattr(644,root,root,755)
9c1cee53 179%attr(755,root,root) %{_libexecdir}/%{name}/plugins.d/node.d.plugin
f241237d
ER
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.071218 seconds and 4 git commands to generate.