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