]> git.pld-linux.org Git - packages/netdata.git/blame - netdata.spec
subpackage node module; add nodejs dep
[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
f241237d 9Release: 0.7
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
dbcc502d 15URL: http://netdata.firehol.org/
085a70e6
ER
16BuildRequires: autoconf
17BuildRequires: automake
65ecfdca 18%{?with_nfacct:BuildRequires: libmnl-devel}
dbcc502d 19%{?with_nfacct:BuildRequires: libnetfilter_acct-devel}
085a70e6 20BuildRequires: pkgconfig
1229dd1c 21BuildRequires: rpmbuild(macros) >= 1.202
dbcc502d 22BuildRequires: zlib-devel
f241237d 23Suggests: %{name}-nodejs
1229dd1c
ER
24Provides: group(netdata)
25Provides: user(netdata)
26Requires(postun): /usr/sbin/groupdel
27Requires(postun): /usr/sbin/userdel
28Requires(pre): /bin/id
29Requires(pre): /usr/bin/getgid
30Requires(pre): /usr/sbin/groupadd
31Requires(pre): /usr/sbin/useradd
dbcc502d
ER
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
f241237d
ER
34%define _libexecdir %{_prefix}/lib
35
dbcc502d
ER
36%description
37netdata is the fastest way to visualize metrics. It is a resource
38efficient, highly optimized system for collecting and visualizing any
39type of realtime timeseries data, from CPU usage, disk activity, SQL
40queries, API calls, web site visitors, etc.
41
42netdata tries to visualize the truth of now, in its greatest detail,
43so that you can get insights of what is happening now and what just
44happened, on your systems and applications.
45
f241237d
ER
46%package nodejs
47Summary: netdata node.js plugins
48Group: Applications/System
49URL: https://github.com/firehol/netdata/wiki/General-Info---node.d
50Requires: %{name} = %{version}-%{release}
51Requires: nodejs
52%if "%{_rpmversion}" >= "5"
53BuildArch: noarch
54%endif
55
56%description nodejs
57node.d.plugin is a netdata plugin that provides an abstraction layer
58to allow easy and quick development of data collectors in node.js. It
59also manages all its data collectors (placed in node.d) using a single
60instance of node, thus lowering the memory footprint of data
61collection.
62
dbcc502d
ER
63%prep
64%setup -q
65
66%build
67%{__aclocal} -I m4
68%{__autoconf}
69%{__autoheader}
70%{__automake}
71%configure \
f241237d 72 --libdir=%{_libexecdir} \
dbcc502d
ER
73 --with-zlib \
74 --with-math \
75 %{__enable_disable nfacct plugin-nfacct} \
76 --with-user=netdata
77%{__make}
78
79%install
80rm -rf $RPM_BUILD_ROOT
81%{__make} install \
82 DESTDIR=$RPM_BUILD_ROOT
83
f241237d 84cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
01f0b59e 85
dbcc502d
ER
86%{__rm} $RPM_BUILD_ROOT/var/{cache,log}/netdata/.keep
87
88install -d $RPM_BUILD_ROOT%{systemdunitdir}
89cp -p system/netdata-systemd $RPM_BUILD_ROOT%{systemdunitdir}/netdata.service
90
dbcc502d 91%pre
1229dd1c
ER
92%groupadd -g 329 netdata
93%useradd -u 329 -g netdata -c netdata -s /sbin/nologin -d / netdata
94
95%postun
96if [ "$1" = "0" ]; then
97 %userremove netdata
98 %groupremove netdata
99fi
dbcc502d 100
1229dd1c 101%if 0
dbcc502d
ER
102%post
103%systemd_post netdata.service
104
105%preun
106%systemd_preun netdata.service
107
108%postun
109%systemd_postun_with_restart netdata.service
110%endif
111
112%clean
113rm -rf $RPM_BUILD_ROOT
114
115%files
116%defattr(644,root,root,755)
117%dir %{_sysconfdir}/%{name}
118%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
119%attr(755,root,root) %{_sbindir}/%{name}
120%{_datadir}/%{name}
5c048d80 121%dir %{_libexecdir}/%{name}
dbcc502d
ER
122%{systemdunitdir}/netdata.service
123%attr(755,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
124%attr(755,netdata,netdata) %dir %{_localstatedir}/log/%{name}
5c048d80
ER
125
126%defattr(-,root,root,-)
127%{_libexecdir}/%{name}/charts.d
5c048d80 128%{_libexecdir}/%{name}/plugins.d
f241237d
ER
129
130%files nodejs
131%defattr(644,root,root,755)
132%dir %{_libexecdir}/%{name}/node.d
133%{_libexecdir}/%{name}/node.d/README.md
134%{_libexecdir}/%{name}/node.d/node_modules
135%attr(755,root,root) %{_libexecdir}/%{name}/node.d/*.node.js
This page took 0.096836 seconds and 4 git commands to generate.