[packages/bacula] cleanup qt related stuff
atler
atler at pld-linux.org
Thu Feb 6 02:09:45 CET 2025
commit d69dd3051aebac72f21339586d0ca32abb6b8669
Author: Jan Palus <atler at pld-linux.org>
Date: Thu Feb 6 00:11:23 2025 +0100
cleanup qt related stuff
- during configure probe prefer qt5 over qt4 if both are present
- drop custom installation of bat and point QINSTALL_PROGRAM (introduced
in qt 5.9 and not overridable from pro file) to previously used
$(INSTALL_PROGRAM)
- move tray module to %{_bindir}
- package tray module's desktop file
bacula-desktop.patch | 16 ++++++++++++++++
bacula.spec | 16 ++++++----------
prefer-qt5.patch | 32 ++++++++++++++++++++++++++++++++
3 files changed, 54 insertions(+), 10 deletions(-)
---
diff --git a/bacula.spec b/bacula.spec
index b1cd9cc..a4b76cf 100644
--- a/bacula.spec
+++ b/bacula.spec
@@ -48,6 +48,7 @@ Patch4: %{name}-no_lockmgr.patch
Patch5: x32.patch
Patch6: libs3-curl.patch
Patch7: cdp-build.patch
+Patch8: prefer-qt5.patch
URL: http://www.bacula.org/
BuildRequires: acl-devel
BuildRequires: autoconf >= 2.61
@@ -456,6 +457,7 @@ cd libs3-%{libs3_version}
cd ..
%endif
%patch -P 7 -p1
+%patch -P 8 -p1
sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
src/cats/create_* src/cats/delete_* src/cats/drop_* \
@@ -523,12 +525,6 @@ QMAKE="%_qt5_qmake" \
--with-mon-sd-password="#FAKE-mon-sd-password#" \
--with-openssl
-%if %{with qt}
-cd src/qt-console
-%{qmake_qt5} bat.pro
-cd ../..
-%endif
-
%{__make} \
%{?with_s3:S3_LIBS="$PWD/libs3-%{libs3_version}/build/lib/libs3.a $(pkg-config --libs libcurl libxml-2.0)"} \
2>&1 | tee log
@@ -548,7 +544,8 @@ install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig} \
$RPM_BUILD_ROOT%{systemdunitdir}
%{__make} -j1 install \
- DESTDIR=$RPM_BUILD_ROOT
+ DESTDIR=$RPM_BUILD_ROOT \
+ QINSTALL_PROGRAM='$(INSTALL_PROGRAM)'
%{__make} -C src/stored install-aligned \
DESTDIR=$RPM_BUILD_ROOT
@@ -587,8 +584,7 @@ cp -a %{SOURCE19} $RPM_BUILD_ROOT%{systemdunitdir}/bacula-sd.service
%if %{with qt}
# qmake somewhy does not always create install_bins target. install our own the bin
-rm -f $RPM_BUILD_ROOT%{_sbindir}/bat
-libtool --silent --mode=install install src/qt-console/bat $RPM_BUILD_ROOT%{_bindir}
+mv $RPM_BUILD_ROOT%{_sbindir}/{bat,bacula-tray-monitor} $RPM_BUILD_ROOT%{_bindir}
cp -a scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png
cp -a scripts/bat.desktop $RPM_BUILD_ROOT%{_desktopdir}
%endif
@@ -986,7 +982,7 @@ ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \
%files plugin-fd-cdp
%defattr(644,root,root,755)
%{?with_qt:%attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-tray-monitor.conf}
-%{?with_qt:%attr(755,root,root) %{_sbindir}/bacula-tray-monitor}
+%{?with_qt:%attr(755,root,root) %{_bindir}/bacula-tray-monitor}
%attr(755,root,root) %{_sbindir}/cdp-client
%attr(755,root,root) %{_libdir}/%{name}/plugins/cdp-fd.so
diff --git a/bacula-desktop.patch b/bacula-desktop.patch
index e4334ff..491a841 100644
--- a/bacula-desktop.patch
+++ b/bacula-desktop.patch
@@ -16,3 +16,19 @@ diff -ur bacula-11.0.6.orig/scripts/bat.desktop.in bacula-11.0.6/scripts/bat.des
-X-Desktop-File-Install-Version=0.3
-Categories=System;Application;Utility;X-Red-Hat-Base;
+Categories=System;Utility;
+--- bacula-15.0.2/scripts/bacula-tray-monitor.desktop.in.orig 2025-02-05 22:52:42.837098589 +0100
++++ bacula-15.0.2/scripts/bacula-tray-monitor.desktop.in 2025-02-05 22:55:11.179641954 +0100
+@@ -1,10 +1,9 @@
+ [Desktop Entry]
+ Name=Bacula Monitor
+ Comment=Notification Tray Monitor
+-Icon=bacula-tray-monitor
+-Exec=@sbindir@/bacula-tray-monitor -c @sysconfdir@/bacula-tray-monitor.conf
++Icon=bacula
++Exec=@bindir@/bacula-tray-monitor -c @sysconfdir@/bacula-tray-monitor.conf
+ Terminal=false
+ Type=Application
+ Encoding=UTF-8
+-X-Desktop-File-Install-Version=0.3
+-Categories=System;Application;Utility;X-Red-Hat-Base;
++Categories=System;Utility;
diff --git a/prefer-qt5.patch b/prefer-qt5.patch
new file mode 100644
index 0000000..92d17a0
--- /dev/null
+++ b/prefer-qt5.patch
@@ -0,0 +1,32 @@
+--- bacula-15.0.2/autoconf/configure.in.orig 2025-02-05 22:26:58.485535550 +0100
++++ bacula-15.0.2/autoconf/configure.in 2025-02-05 22:31:07.309005400 +0100
+@@ -449,19 +449,19 @@
+
+ BAT_DIR=
+ if test x$support_bat = xyes; then
+-dnl look for Qt4
+- abc=`$PKG_CONFIG QtGui`
++dnl look for Qt5
++ abc=`$PKG_CONFIG Qt5Gui`
+ pkg=$?
+ if test $pkg = 0; then
+- BAT_DIR=src/qt-console
++ BAT_DIR="src/qt-console src/qt-console/tray-monitor"
+ else
+-dnl look for Qt5
+- abc=`$PKG_CONFIG Qt5Gui`
+- pkg=$?
+- if test $pkg = 0; then
+- BAT_DIR="src/qt-console src/qt-console/tray-monitor"
+- else
+- AC_MSG_ERROR(Unable to find either Qt4 or Qt5 installation needed by bat)
++dnl look for Qt4
++ abc=`$PKG_CONFIG QtGui`
++ pkg=$?
++ if test $pkg = 0; then
++ BAT_DIR=src/qt-console
++ else
++ AC_MSG_ERROR(Unable to find either Qt4 or Qt5 installation needed by bat)
+ fi
+ fi
+ fi
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/bacula.git/commitdiff/d69dd3051aebac72f21339586d0ca32abb6b8669
More information about the pld-cvs-commit
mailing list