]> git.pld-linux.org Git - packages/netdata.git/blame - netdata.spec
libmnl-devel is netfilter 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
1229dd1c 9Release: 0.3
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
14URL: http://netdata.firehol.org/
085a70e6
ER
15BuildRequires: autoconf
16BuildRequires: automake
65ecfdca 17%{?with_nfacct:BuildRequires: libmnl-devel}
dbcc502d 18%{?with_nfacct:BuildRequires: libnetfilter_acct-devel}
085a70e6 19BuildRequires: pkgconfig
1229dd1c 20BuildRequires: rpmbuild(macros) >= 1.202
dbcc502d 21BuildRequires: zlib-devel
1229dd1c
ER
22Provides: group(netdata)
23Provides: user(netdata)
24Requires(postun): /usr/sbin/groupdel
25Requires(postun): /usr/sbin/userdel
26Requires(pre): /bin/id
27Requires(pre): /usr/bin/getgid
28Requires(pre): /usr/sbin/groupadd
29Requires(pre): /usr/sbin/useradd
dbcc502d
ER
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33netdata is the fastest way to visualize metrics. It is a resource
34efficient, highly optimized system for collecting and visualizing any
35type of realtime timeseries data, from CPU usage, disk activity, SQL
36queries, API calls, web site visitors, etc.
37
38netdata tries to visualize the truth of now, in its greatest detail,
39so that you can get insights of what is happening now and what just
40happened, on your systems and applications.
41
42%prep
43%setup -q
44
45%build
46%{__aclocal} -I m4
47%{__autoconf}
48%{__autoheader}
49%{__automake}
50%configure \
51 --with-zlib \
52 --with-math \
53 %{__enable_disable nfacct plugin-nfacct} \
54 --with-user=netdata
55%{__make}
56
57%install
58rm -rf $RPM_BUILD_ROOT
59%{__make} install \
60 DESTDIR=$RPM_BUILD_ROOT
61
62%{__rm} $RPM_BUILD_ROOT/var/{cache,log}/netdata/.keep
63
64install -d $RPM_BUILD_ROOT%{systemdunitdir}
65cp -p system/netdata-systemd $RPM_BUILD_ROOT%{systemdunitdir}/netdata.service
66
dbcc502d 67%pre
1229dd1c
ER
68%groupadd -g 329 netdata
69%useradd -u 329 -g netdata -c netdata -s /sbin/nologin -d / netdata
70
71%postun
72if [ "$1" = "0" ]; then
73 %userremove netdata
74 %groupremove netdata
75fi
dbcc502d 76
1229dd1c 77%if 0
dbcc502d
ER
78%post
79%systemd_post netdata.service
80
81%preun
82%systemd_preun netdata.service
83
84%postun
85%systemd_postun_with_restart netdata.service
86%endif
87
88%clean
89rm -rf $RPM_BUILD_ROOT
90
91%files
92%defattr(644,root,root,755)
93%dir %{_sysconfdir}/%{name}
94%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
95%attr(755,root,root) %{_sbindir}/%{name}
96%{_datadir}/%{name}
5c048d80 97%dir %{_libexecdir}/%{name}
dbcc502d
ER
98%{systemdunitdir}/netdata.service
99%attr(755,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
100%attr(755,netdata,netdata) %dir %{_localstatedir}/log/%{name}
5c048d80
ER
101
102%defattr(-,root,root,-)
103%{_libexecdir}/%{name}/charts.d
104%{_libexecdir}/%{name}/node.d
105%{_libexecdir}/%{name}/plugins.d
This page took 0.080221 seconds and 4 git commands to generate.