@cryptotaxi247 / netdata-1 / commits / b9616ba23

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

Ben Reedy committed Dec 14, 2016 at 18:22 UTC b9616ba234c5c4464d341d8e718db4bed0cc819e
1 file changed +8 -13
netdata.spec.in
+8 -13
@@ -65,8 +65,6 @@ Requires(post): systemd-units
65 Requires(post): chkconfig
66 %endif
67
68 -BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 -
68 %description
69 netdata is the fastest way to visualize metrics. It is a resource
70 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
76 happened, on your systems and applications.
77
78 %prep
81 -%setup -q -n %{name}-@PACKAGE_VERSION@
79 +%setup -q
80
81 %build
82 %configure \
@@ -92,17 +90,18 @@ happened, on your systems and applications.
90 rm -rf $RPM_BUILD_ROOT
91 %{__make} %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT install
92
95 -find $RPM_BUILD_ROOT -name .keep -print0 | xargs --null --no-run-if-empty rm
93 +find $RPM_BUILD_ROOT -name .keep -delete
94
95 install -m 644 -p system/netdata.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
98 -install -Dm 644 -p system/netdata.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
96 +install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
97 +install -m 644 -p system/netdata.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
98
99 %if %{with systemd}
100 install -d $RPM_BUILD_ROOT%{_unitdir}
101 install -m 644 -p system/netdata.service $RPM_BUILD_ROOT%{_unitdir}/netdata.service
102 %else
103 # install SYSV init stuff
105 -mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
104 +install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
105 install -m755 system/netdata-init-d \
106 $RPM_BUILD_ROOT/etc/rc.d/init.d/netdata
107 %endif
@@ -115,7 +114,7 @@ install -m755 system/netdata-init-d \
114 -s /sbin/nologin -r -d %{contentdir} netdata 2> /dev/null || :
115
116 %post
118 -o%distro_post
117 +%distro_post
118
119 %preun
120 %distro_preun
@@ -164,8 +163,6 @@ rm -rf $RPM_BUILD_ROOT
163 %defattr(-,root,root)
164
165 %dir %{_sysconfdir}/%{name}
167 -%dir %{_sysconfdir}/%{name}/health.d
168 -%dir %{_sysconfdir}/%{name}/python.d
166
167 %config(noreplace) %{_sysconfdir}/%{name}/*.conf
168 #%config(noreplace) %{_sysconfdir}/%{name}/charts.d/*.conf
@@ -174,10 +171,6 @@ rm -rf $RPM_BUILD_ROOT
171 %config(noreplace) %{_sysconfdir}/%{name}/python.d/*.conf
172 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
173
177 -# node.js config files are JSON (which do not support comments)
178 -# so, we only supply markdown files
179 -%{_sysconfdir}/%{name}/node.d/*.md
180 -
174 %{_libexecdir}/%{name}
175 %{_sbindir}/%{name}
176
@@ -186,6 +179,8 @@ rm -rf $RPM_BUILD_ROOT
179 %attr(0700,netdata,netdata) %dir %{_localstatedir}/lib/%{name}
180
181 %dir %{_datadir}/%{name}
182 +%dir %{_sysconfdir}/%{name}/health.d
183 +%dir %{_sysconfdir}/%{name}/python.d
184
185 %if %{with systemd}
186 %{_unitdir}/netdata.service