Fix flags for annobin in Qt tools build

Generate Makefiles of Qt tools (bat, tray-monitor) before the build in
order to pick up the right compiler/linker flags.

Regenerate the Makefiles again after the build to have the correct
install targets. Not sure why the regeneration before build results in
incorrect install target in Makefiles, but this workaround is confirmed
to work.

Remove the second %make_build in tray-monitor, the tool has been built
already, so this has no effect.

Resolves: rhbz#2044645
This commit is contained in:
Pavel Cahyna 2022-02-11 16:01:00 +01:00
parent 0a620f09bb
commit d6c0056e64

View File

@ -349,15 +349,24 @@ export PATH="$PATH:%{_qt5_bindir}"
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
pushd src/qt-console/
%{?qmake_qt5}%{!?qmake_qt5:qmake-qt5} bat.pro
pushd tray-monitor
%{?qmake_qt5}%{!?qmake_qt5:qmake-qt5} tray-monitor.pro
popd
popd
%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
%make_build
pushd src/qt-console/
%{?qmake_qt5}%{!?qmake_qt5:qmake-qt5} bat.pro
pushd tray-monitor
%{?qmake_qt5}%{!?qmake_qt5:qmake-qt5} tray-monitor.pro
popd
popd
# Convert image to png for tray monitor icon