summaryrefslogtreecommitdiffstats
path: root/netdata.spec.in
diff options
context:
space:
mode:
authorBen Reedy <breed808@breed808.com>2016-12-14 18:22:31 +1000
committerBen Reedy <breed808@breed808.com>2016-12-14 19:34:48 +1000
commitb9616ba234c5c4464d341d8e718db4bed0cc819e (patch)
tree4300b8433bc5e0a2802724c310c6f1aeebbde0d9 /netdata.spec.in
parenta8ff719ef56db0d56e1dc022f2a0827ffc6d437b (diff)
Spec: Cleanup
%setup defaults to %{name}-%{version} No node.d directory in package Remove unneeded mkdir and xargs commands Shorten find command for .keep files
Diffstat (limited to 'netdata.spec.in')
-rw-r--r--netdata.spec.in21
1 files changed, 8 insertions, 13 deletions
diff --git a/netdata.spec.in b/netdata.spec.in
index 0bb0f3c65e..f829f8737a 100644
--- a/netdata.spec.in
+++ b/netdata.spec.in
@@ -65,8 +65,6 @@ Requires(post): systemd-units
Requires(post): chkconfig
%endif
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
%description
netdata is the fastest way to visualize metrics. It is a resource
efficient, highly optimized system for collecting and visualizing any
@@ -78,7 +76,7 @@ so that you can get insights of what is happening now and what just
happened, on your systems and applications.
%prep
-%setup -q -n %{name}-@PACKAGE_VERSION@
+%setup -q
%build
%configure \
@@ -92,17 +90,18 @@ happened, on your systems and applications.
rm -rf $RPM_BUILD_ROOT
%{__make} %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT install
-find $RPM_BUILD_ROOT -name .keep -print0 | xargs --null --no-run-if-empty rm
+find $RPM_BUILD_ROOT -name .keep -delete
install -m 644 -p system/netdata.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
-install -Dm 644 -p system/netdata.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
+install -m 644 -p system/netdata.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
%if %{with systemd}
install -d $RPM_BUILD_ROOT%{_unitdir}
install -m 644 -p system/netdata.service $RPM_BUILD_ROOT%{_unitdir}/netdata.service
%else
# install SYSV init stuff
-mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m755 system/netdata-init-d \
$RPM_BUILD_ROOT/etc/rc.d/init.d/netdata
%endif
@@ -115,7 +114,7 @@ install -m755 system/netdata-init-d \
-s /sbin/nologin -r -d %{contentdir} netdata 2> /dev/null || :
%post
-o%distro_post
+%distro_post
%preun
%distro_preun
@@ -164,8 +163,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root)
%dir %{_sysconfdir}/%{name}
-%dir %{_sysconfdir}/%{name}/health.d
-%dir %{_sysconfdir}/%{name}/python.d
%config(noreplace) %{_sysconfdir}/%{name}/*.conf
#%config(noreplace) %{_sysconfdir}/%{name}/charts.d/*.conf
@@ -174,10 +171,6 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/%{name}/python.d/*.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
-# node.js config files are JSON (which do not support comments)
-# so, we only supply markdown files
-%{_sysconfdir}/%{name}/node.d/*.md
-
%{_libexecdir}/%{name}
%{_sbindir}/%{name}
@@ -186,6 +179,8 @@ rm -rf $RPM_BUILD_ROOT
%attr(0700,netdata,netdata) %dir %{_localstatedir}/lib/%{name}
%dir %{_datadir}/%{name}
+%dir %{_sysconfdir}/%{name}/health.d
+%dir %{_sysconfdir}/%{name}/python.d
%if %{with systemd}
%{_unitdir}/netdata.service