File swradio.spec of Package swradio

#
# spec file for package swradio
#
# Copyright (c) 2025, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           swradio
Version:        9.1
Release:        0
Summary:        Shortwave receiver
License:        GPL-2.0-only
URL:            https://github.com/JvanKatwijk/swradio-8
Source:         https://github.com/JvanKatwijk/swradio-8/archive/refs/tags/%{version}.tar.gz#/%{name}-8-%{version}.tar.gz
Source1:        swradio.desktop
Patch0:         swradio-fix-no-return.patch
Patch1:         swradio-force-c++17.patch
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  libfdk-aac-devel
BuildRequires:  pkgconfig
BuildRequires:  qt6-base-common-devel
BuildRequires:  qwt6-qt5-devel
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRequires:  pkgconfig(eigen3)
BuildRequires:  pkgconfig(faad2)
BuildRequires:  pkgconfig(fftw3f)
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  pkgconfig(portaudio-2.0)
BuildRequires:  pkgconfig(samplerate)
BuildRequires:  pkgconfig(sndfile)

%description
Shortwave receiver.

%prep
%autosetup -p1 -n %{name}-8-%{version}

%build
%qmake5
sed -i "s|-lqwt-qt5-qt5|-lqwt-qt5|g" Makefile
%make_build

%install
install -Dm 0755 linux-bin/swradio-9 %{buildroot}%{_bindir}/swradio
install -Dm 0644 swradio.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
install -Dm 0644 %{SOURCE1} %{buildroot}/%{_datadir}/applications/%{name}.desktop

%files
%license COPYING
%doc README.md
%{_bindir}/swradio
%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
%{_datadir}/applications/%{name}.desktop

%changelog
openSUSE Build Service is sponsored by