Disable the build of the nagios-plugin subpackage
The package can not be installed in RHEL, because nagios is missing. Make it conditional and by default disabled on RHEL to unbreak build installation. Resolves: rhbz#2054132
This commit is contained in:
parent
b30c9cc3f9
commit
fd2b9787b5
14
bacula.spec
14
bacula.spec
@ -1,6 +1,12 @@
|
||||
%global uid 133
|
||||
%global username bacula
|
||||
|
||||
%if 0%{?rhel} && ! 0%{?epel}
|
||||
%bcond_with nagios
|
||||
%else
|
||||
%bcond_without nagios
|
||||
%endif
|
||||
|
||||
Name: bacula
|
||||
Version: 11.0.1
|
||||
Release: 4%{?dist}
|
||||
@ -270,6 +276,7 @@ based on a client/server architecture.
|
||||
|
||||
This development package contains static libraries and header files.
|
||||
|
||||
%if %{with nagios}
|
||||
%package -n nagios-plugins-bacula
|
||||
Summary: Nagios Plugin - check_bacula
|
||||
Requires: bacula-libs%{?_isa} = %{version}-%{release}
|
||||
@ -277,6 +284,7 @@ Requires: nagios-common%{?_isa}
|
||||
|
||||
%description -n nagios-plugins-bacula
|
||||
Provides check_bacula support for Nagios.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
@ -343,7 +351,9 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
|
||||
%make_build
|
||||
%make_build -C src/tools/cdp-client
|
||||
%if %{with nagios}
|
||||
%make_build -C examples/nagios/check_bacula
|
||||
%endif
|
||||
|
||||
pushd src/qt-console/tray-monitor
|
||||
%{?qmake_qt5}%{!?qmake_qt5:qmake-qt5} tray-monitor.pro
|
||||
@ -354,7 +364,9 @@ popd
|
||||
%install
|
||||
%make_install
|
||||
%make_install -C src/tools/cdp-client
|
||||
%if %{with nagios}
|
||||
%make_install -C examples/nagios/check_bacula
|
||||
%endif
|
||||
|
||||
# This will be managed through alternatives, as it requires the name to NOT
|
||||
# change between upgrades, so the versioned library name can not be used.
|
||||
@ -622,8 +634,10 @@ exit 0
|
||||
%{_libdir}/libbacsd.so
|
||||
%{_libdir}/libbacsql.so
|
||||
|
||||
%if %{with nagios}
|
||||
%files -n nagios-plugins-bacula
|
||||
%{_libdir}/nagios/plugins/check_bacula
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 11.0.1-4
|
||||
|
Loading…
Reference in New Issue
Block a user