Disable Qt components in RHEL builds

Qt5 is being dropped from RHEL 10, and these components are not shipped
in RHEL.
This commit is contained in:
Yaakov Selkowitz 2023-08-16 11:00:35 -04:00
parent aacae8f6e1
commit 9f367b506b

View File

@ -1,9 +1,11 @@
%global uid 133 %global uid 133
%global username bacula %global username bacula
%bcond qt %[%{undefined rhel} || 0%{?rhel} < 10]
Name: bacula Name: bacula
Version: 13.0.3 Version: 13.0.3
Release: 2%{?dist} Release: 3%{?dist}
Summary: Cross platform network backup for Linux, Unix, Mac and Windows Summary: Cross platform network backup for Linux, Unix, Mac and Windows
# See LICENSE for details # See LICENSE for details
License: AGPLv3 with exceptions License: AGPLv3 with exceptions
@ -62,7 +64,9 @@ BuildRequires: make
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: openldap-devel BuildRequires: openldap-devel
BuildRequires: openssl-devel BuildRequires: openssl-devel
%if %{with qt}
BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtbase-devel
%endif
BuildRequires: readline-devel BuildRequires: readline-devel
BuildRequires: sed BuildRequires: sed
BuildRequires: sqlite-devel BuildRequires: sqlite-devel
@ -238,6 +242,7 @@ based on a client/server architecture.
This package contains the command-line management console for the bacula backup This package contains the command-line management console for the bacula backup
system. system.
%if %{with qt}
%package console-bat %package console-bat
Summary: Bacula bat console Summary: Bacula bat console
Requires: bacula-libs%{?_isa} = %{version}-%{release} Requires: bacula-libs%{?_isa} = %{version}-%{release}
@ -262,6 +267,7 @@ based on a client/server architecture.
This package contains the Gnome and KDE compatible tray monitor to monitor your This package contains the Gnome and KDE compatible tray monitor to monitor your
bacula server. bacula server.
%endif
%package devel %package devel
Summary: Bacula development files Summary: Bacula development files
@ -303,14 +309,18 @@ sed -i -e 's|/bin/dash|/bin/sh|g' scripts/baculabackupreport.in
%build %build
export CFLAGS="%{optflags} -I%{_includedir}/ncurses" export CFLAGS="%{optflags} -I%{_includedir}/ncurses"
export CPPFLAGS="%{optflags} -I%{_includedir}/ncurses" export CPPFLAGS="%{optflags} -I%{_includedir}/ncurses"
%if %{with qt}
export PATH="$PATH:%{_qt5_bindir}" export PATH="$PATH:%{_qt5_bindir}"
%endif
%configure \ %configure \
--disable-conio \ --disable-conio \
--disable-rpath \ --disable-rpath \
--disable-s3 \ --disable-s3 \
--docdir=%{_datadir}/bacula \ --docdir=%{_datadir}/bacula \
%if %{with qt}
--enable-bat \ --enable-bat \
%endif
--enable-batch-insert \ --enable-batch-insert \
--enable-build-dird \ --enable-build-dird \
--enable-build-stored \ --enable-build-stored \
@ -363,6 +373,7 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
# change between upgrades, so the versioned library name can not be used. # change between upgrades, so the versioned library name can not be used.
rm -f %{buildroot}%{_libdir}/libbaccats.so rm -f %{buildroot}%{_libdir}/libbaccats.so
%if %{with qt}
# Bat # Bat
install -p -m 644 -D src/qt-console/images/bat_icon.png %{buildroot}%{_datadir}/pixmaps/bat_icon.png install -p -m 644 -D src/qt-console/images/bat_icon.png %{buildroot}%{_datadir}/pixmaps/bat_icon.png
install -p -m 644 -D scripts/bat.desktop %{buildroot}%{_datadir}/applications/bat.desktop install -p -m 644 -D scripts/bat.desktop %{buildroot}%{_datadir}/applications/bat.desktop
@ -372,6 +383,9 @@ install -p -m 644 -D manpages/bacula-tray-monitor.1 %{buildroot}%{_mandir}/man1/
install -p -m 644 -D %{SOURCE19} %{buildroot}%{_datadir}/pixmaps/bacula-tray-monitor.png install -p -m 644 -D %{SOURCE19} %{buildroot}%{_datadir}/pixmaps/bacula-tray-monitor.png
install -p -m 644 -D scripts/bacula-tray-monitor.desktop %{buildroot}%{_datadir}/applications/bacula-tray-monitor.desktop install -p -m 644 -D scripts/bacula-tray-monitor.desktop %{buildroot}%{_datadir}/applications/bacula-tray-monitor.desktop
install -p -m 755 -D src/qt-console/tray-monitor/.libs/bacula-tray-monitor %{buildroot}%{_sbindir}/bacula-tray-monitor install -p -m 755 -D src/qt-console/tray-monitor/.libs/bacula-tray-monitor %{buildroot}%{_sbindir}/bacula-tray-monitor
%else
rm -f %{buildroot}%{_mandir}/man1/bat.1*
%endif
# Logrotate # Logrotate
mkdir -p %{buildroot}%{_localstatedir}/log/bacula mkdir -p %{buildroot}%{_localstatedir}/log/bacula
@ -614,6 +628,7 @@ exit 0
%{_sbindir}/bconsole %{_sbindir}/bconsole
%{_sbindir}/bbconsjson %{_sbindir}/bbconsjson
%if %{with qt}
%files console-bat %files console-bat
%config(noreplace) %{_sysconfdir}/bacula/bat.conf %attr(640,root,root) %config(noreplace) %{_sysconfdir}/bacula/bat.conf %attr(640,root,root)
%{_datadir}/applications/bat.desktop %{_datadir}/applications/bat.desktop
@ -629,6 +644,7 @@ exit 0
%{_datadir}/pixmaps/bacula-tray-monitor.png %{_datadir}/pixmaps/bacula-tray-monitor.png
%{_mandir}/man1/bacula-tray-monitor.1* %{_mandir}/man1/bacula-tray-monitor.1*
%{_sbindir}/bacula-tray-monitor %{_sbindir}/bacula-tray-monitor
%endif
%files devel %files devel
%{_includedir}/bacula %{_includedir}/bacula
@ -642,6 +658,9 @@ exit 0
%{_libdir}/nagios/plugins/check_bacula %{_libdir}/nagios/plugins/check_bacula
%changelog %changelog
* Wed Aug 16 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 13.0.3-3
- Disable Qt components in RHEL builds
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 13.0.3-2 * Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 13.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild