[packages/naemon-core] use nagios plugins dir for now
glen
glen at pld-linux.org
Sun Aug 9 23:59:30 CEST 2015
commit 98cc26b489dabec257fbe8c9039d6c0d10535c10
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Aug 10 00:59:13 2015 +0300
use nagios plugins dir for now
naemon-core.spec | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/naemon-core.spec b/naemon-core.spec
index 38a75aa..88d39c1 100644
--- a/naemon-core.spec
+++ b/naemon-core.spec
@@ -1,5 +1,6 @@
#
# Conditional build:
+%bcond_with tests # build with tests
%bcond_with doc # build doc
Summary: Open Source Host, Service And Network Monitoring Program
@@ -19,6 +20,8 @@ BuildRequires: pkgconfig
BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define plugindir %{_prefix}/lib/nagios/plugins
+
%description
Naemon is an application, system and network monitoring application.
It can escalate problems by email, pager or any other medium. It is
@@ -45,8 +48,8 @@ install this package.
--libdir="%{_libdir}/%{name}" \
--localstatedir="%{_localstatedir}/lib/%{name}" \
--enable-event-broker \
- --without-tests \
- --with-pluginsdir="%{_libdir}/%{name}/plugins" \
+ %{__with_without tests} \
+ --with-pluginsdir=%{plugindir} \
--with-tempdir="%{_localstatedir}/cache/%{name}" \
--with-checkresultdir="%{_localstatedir}/cache/%{name}/checkresults" \
--with-logdir="%{_localstatedir}/log/%{name}" \
@@ -67,10 +70,10 @@ install this package.
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
- DESTDIR="$RPM_BUILD_ROOT" \
INSTALL_OPTS="" \
COMMAND_OPTS="" \
- INIT_OPTS=""
+ INIT_OPTS="" \
+ DESTDIR=$RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
@@ -86,9 +89,6 @@ rm $RPM_BUILD_ROOT%{_datadir}/%{name}/documentation/installdox
install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -p sample-config/naemon.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
-install -d $RPM_BUILD_ROOT%{_libdir}/%{name}
-ln -s %{_libdir}/nagios/plugins $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
-
# Install systemd entry
install -D -p daemon-systemd $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
install -D -p naemon.tmpfiles.conf $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
@@ -102,6 +102,8 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc README.md
%attr(754,root,root) /etc/rc.d/init.d/naemon
+%attr(755,root,root) %{_libdir}/%{name}/libnaemon.so.*.*.*
+%ghost %{_libdir}/%{name}/libnaemon.so.0
%attr(755,root,root) %{_bindir}/naemon
%attr(755,root,root) %{_bindir}/naemonstats
%attr(755,root,root) %{_bindir}/oconfsplit
@@ -113,25 +115,25 @@ rm -rf $RPM_BUILD_ROOT
%{systemdunitdir}/%{name}.service
%{systemdtmpfilesdir}/%{name}.conf
%config(noreplace) /etc/logrotate.d/naemon
-%dir %{_sysconfdir}/naemon/
+%dir %{_sysconfdir}/naemon
%attr(2775,naemon,naemon) %dir %{_sysconfdir}/naemon/conf.d
%config(noreplace) %{_sysconfdir}/naemon/naemon.cfg
%config(noreplace) %{_sysconfdir}/naemon/resource.cfg
%attr(664,naemon,naemon) %config(noreplace) %{_sysconfdir}/naemon/conf.d/*.cfg
%dir %{_sysconfdir}/naemon/conf.d/templates
%attr(664,naemon,naemon) %config(noreplace) %{_sysconfdir}/naemon/conf.d/templates/*.cfg
+
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+
%attr(2775,naemon,http) %dir %{_localstatedir}/cache/%{name}/checkresults
%attr(2775,naemon,naemon) %dir %{_localstatedir}/cache/%{name}
%attr(755,naemon,naemon) %dir %{_localstatedir}/lib/%{name}
%attr(755,naemon,naemon) %dir %{_localstatedir}/log/%{name}
%attr(755,naemon,naemon) %dir %{_localstatedir}/log/%{name}/archives
+
%if %{with doc}
%attr(-,root,root) %{_datadir}/%{name}/documentation
%endif
-%attr(755,root,root) %{_libdir}/%{name}/libnaemon.so.*.*.*
-%ghost %{_libdir}/%{name}/libnaemon.so.0
-%attr(-,root,root) %{_libdir}/%{name}/plugins
%files devel
%defattr(644,root,root,755)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/naemon-core.git/commitdiff/98cc26b489dabec257fbe8c9039d6c0d10535c10
More information about the pld-cvs-commit
mailing list