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