From c51435a43474c5e74862a055fc95f2945401f60a Mon Sep 17 00:00:00 2001 From: Boleslaw Tokarski Date: Fri, 19 Feb 2021 10:50:27 +0100 Subject: [PATCH] Fix build when directory not equals name I tried building SailTuner from source in the SFOS SDK, but failed with: + qmake -qt=5 -makefile 'QMAKE_CFLAGS_RELEASE=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -march=armv8-a' 'QMAKE_CFLAGS_DEBUG=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -march=armv8-a' 'QMAKE_CXXFLAGS_RELEASE=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -march=armv8-a' 'QMAKE_CXXFLAGS_DEBUG=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -march=armv8-a' QMAKE_STRIP=: PREFIX=/usr LIBDIR=/usr/lib64 Usage: /usr/lib64/qt5/bin/qmake [mode] [options] [files] ... (rest of qmake syntax) error: Bad exit status from /var/tmp/rpm-tmp.7GBOd3 (%build) RPM build errors: Macro expanded in comment on line 66: %{_datadir}/%{name} Bad exit status from /var/tmp/rpm-tmp.7GBOd3 (%build) This change allowed qmake to actually perform build. I found afterwards that it also works when directory in which qmake is run is 'harbour-sailtuner', but since I ran git clone, I ended up with SailTuner dir name. --- rpm/harbour-sailtuner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/harbour-sailtuner.spec b/rpm/harbour-sailtuner.spec index e261f4e..1bf8a11 100644 --- a/rpm/harbour-sailtuner.spec +++ b/rpm/harbour-sailtuner.spec @@ -40,7 +40,7 @@ Instrumental multi-temperament chromatic tuner # >> build pre # << build pre -%qtc_qmake5 +%qtc_qmake5 %{name}.pro %qtc_make %{?_smp_mflags}