]> arthur.barton.de Git - netdata.git/blob - netdata.spec.in
Update netdata.spec.in (#679)
[netdata.git] / netdata.spec.in
1 #
2 # Conditional build:
3 %bcond_without  systemd         # systemd
4 %bcond_without  nfacct          # build with nfacct plugin
5
6 %if 0%{?fedora} || 0%{?rhel} >= 7
7 %else
8 %undefine       with_systemd
9 %endif
10
11 Summary:        Real-time performance monitoring, done right
12 Name:           @PACKAGE_NAME@
13 Version:        @PACKAGE_RPM_VERSION@
14 Release:        @PACKAGE_RPM_RELEASE@%{?release_suffix}%{?dist}
15 License:        GPL v3+
16 Group:          Applications/System
17 Source0:        http://firehol.org/download/netdata/releases/v@PACKAGE_VERSION@/%{name}-@PACKAGE_VERSION@.tar.xz
18 URL:            http://netdata.firehol.org/
19 BuildRequires:  pkgconfig
20 BuildRequires:  xz
21 BuildRequires:  zlib-devel
22 %if %{with nfacct}
23 BuildRequires:  libmnl-devel
24 BuildRequires:  libnetfilter_acct-devel
25 %endif
26 %if %{with systemd}
27 BuildRequires:          systemd
28 Requires(post):         systemd
29 Requires(preun):        systemd
30 Requires(postun):       systemd
31 %endif
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 netdata is the fastest way to visualize metrics. It is a resource
36 efficient, highly optimized system for collecting and visualizing any
37 type of realtime timeseries data, from CPU usage, disk activity, SQL
38 queries, API calls, web site visitors, etc.
39
40 netdata tries to visualize the truth of now, in its greatest detail,
41 so that you can get insights of what is happening now and what just
42 happened, on your systems and applications.
43
44 %prep
45 %setup -q -n %{name}-@PACKAGE_VERSION@
46
47 %build
48 %configure \
49         --docdir=%{_docdir}/%{name}-%{version} \
50         --with-zlib \
51         --with-math \
52         %{?with_nfacct:--enable-plugin-nfacct} \
53         --with-user=netdata
54 %{__make} %{?_smp_mflags}
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 %{__make} %{?_smp_mflags} install \
59         DESTDIR=$RPM_BUILD_ROOT
60
61 install -m 644 -p system/netdata.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
62
63 find $RPM_BUILD_ROOT -name .keep | xargs -r rm
64
65 %if %{with systemd}
66 install -d $RPM_BUILD_ROOT%{_unitdir}
67 install -m 644 -p system/netdata.service $RPM_BUILD_ROOT%{_unitdir}/netdata.service
68 %endif
69
70 %pre
71 getent group netdata > /dev/null || groupadd -r netdata
72 getent passwd netdata > /dev/null || useradd -r -g netdata -c netdata -s /sbin/nologin -d / netdata
73
74 %if %{with systemd}
75 %post
76 %systemd_post netdata.service
77
78 %preun
79 %systemd_preun netdata.service
80
81 %postun
82 %systemd_postun_with_restart netdata.service
83 %endif
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
89 %attr(-,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
90 %attr(-,netdata,netdata) %dir %{_localstatedir}/log/%{name}
91 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
92 %dir %{_sysconfdir}/%{name}
93 %{?with_systemd:%{_unitdir}/netdata.service}
94 %{_libexecdir}/%{name}
95 %{_sbindir}/%{name}
96 %dir %{_datadir}/%{name}
97
98 # override defattr for web files
99 %defattr(644,root,netdata,755)
100 %{_datadir}/%{name}/web
101
102 %changelog
103 * Mon May 16 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.2.0-1
104 - netdata is now 30% faster.
105 - netdata now has a registry (my-netdata menu on the dashboard).
106 - netdata now monitors Linux containers.
107 - Several more improvements, new features and bugfixes.
108 * Wed Apr 20 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.1.0-1
109 - Several new features (IPv6, SYNPROXY, Users, Users Groups).
110 - A lot of bug fixes and optimizations.
111 * Tue Mar 22 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.0.0-1
112 - First public release.
113 * Sun Nov 15 2015 Alon Bar-Lev <alonbl@redhat.com> - 0.0.0-1
114 - Initial add.