SailTuner/rpm/harbour-sailtuner.spec
Boleslaw Tokarski c51435a434 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.
2021-02-19 11:01:08 +01:00

73 lines
1.6 KiB
RPMSpec

#
# Do NOT Edit the Auto-generated Part!
# Generated by: spectacle version 0.27
#
Name: harbour-sailtuner
# >> macros
# << macros
%{!?qtc_qmake:%define qtc_qmake %qmake}
%{!?qtc_qmake5:%define qtc_qmake5 %qmake5}
%{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: Chromatic tuner
Version: 0.1
Release: 1
Group: Qt/Qt
License: GPL
URL: http://legolas.vefblog.net/
Source0: %{name}-%{version}.tar.bz2
#Source100: harbour-saildbmeter.yaml
Requires: sailfishsilica-qt5 >= 0.10.9
BuildRequires: pkgconfig(sailfishapp) >= 1.0.2
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: desktop-file-utils
%description
Instrumental multi-temperament chromatic tuner
%prep
%setup -q -n %{name}-%{version}
# >> setup
# << setup
%build
# >> build pre
# << build pre
%qtc_qmake5 %{name}.pro
%qtc_make %{?_smp_mflags}
# >> build post
# << build post
%install
rm -rf %{buildroot}
# >> install pre
# << install pre
%qmake5_install
# >> install post
# << install post
desktop-file-install --delete-original \
--dir %{buildroot}%{_datadir}/applications \
%{buildroot}%{_datadir}/applications/*.desktop
%files
%defattr(-,root,root,-)
%{_bindir}
#%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%attr(644,-,-) %{_datadir}/icons/hicolor/86x86/apps/%{name}.png
%attr(644,-,-) %{_datadir}/icons/hicolor/108x108/apps/%{name}.png
%attr(644,-,-) %{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%attr(644,-,-) %{_datadir}/icons/hicolor/256x256/apps/%{name}.png
# >> files
# << files