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