]> git.pld-linux.org Git - packages/netdata.git/blame_incremental - netdata.spec
subpackage node module; add nodejs dep
[packages/netdata.git] / netdata.spec
... / ...
CommitLineData
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
9Release: 0.7
10License: GPL v3+
11Group: Applications/System
12Source0: https://github.com/firehol/netdata/archive/v%{version}/%{name}-%{version}.tar.gz
13# Source0-md5: 53a432f8849da6bd49b0853dd79551c5
14Source1: %{name}.conf
15URL: http://netdata.firehol.org/
16BuildRequires: autoconf
17BuildRequires: automake
18%{?with_nfacct:BuildRequires: libmnl-devel}
19%{?with_nfacct:BuildRequires: libnetfilter_acct-devel}
20BuildRequires: pkgconfig
21BuildRequires: rpmbuild(macros) >= 1.202
22BuildRequires: zlib-devel
23Suggests: %{name}-nodejs
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
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%define _libexecdir %{_prefix}/lib
35
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
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
63%prep
64%setup -q
65
66%build
67%{__aclocal} -I m4
68%{__autoconf}
69%{__autoheader}
70%{__automake}
71%configure \
72 --libdir=%{_libexecdir} \
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
84cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
85
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
91%pre
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
100
101%if 0
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}
121%dir %{_libexecdir}/%{name}
122%{systemdunitdir}/netdata.service
123%attr(755,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
124%attr(755,netdata,netdata) %dir %{_localstatedir}/log/%{name}
125
126%defattr(-,root,root,-)
127%{_libexecdir}/%{name}/charts.d
128%{_libexecdir}/%{name}/plugins.d
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.060461 seconds and 4 git commands to generate.