File qt-dab5.spec of Package qt-dab
#
# spec file for package qt-dab
#
# Copyright (c) 2014-2023 Wojciech Kazubski <wk@ire.pw.edu.pl>
#
# 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 http://bugs.links2linux.org/
#
%define bname qt-dab
%define branch qt-dab-s5
%define version4 4.8
%define version5 5.5
%define version6 6.4
Name: %{bname}5
Version: %{version5}
Release: 0
License: GPL-2.0-or-later
Summary: Simple DAB/DAB+ receiver
Url: http://www.sdr-j.tk/index.html
Group: Productivity/Multimedia/Other
Source0: https://github.com/JvanKatwijk/%{bname}/archive/refs/tags/%{bname}-%{version6}.tar.gz#/%{bname}-Qt-DAB-%{version6}0.tar.gz
Patch1: %{bname}-6.1-use-qwt6-qt5.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libqt5-qtbase-devel
BuildRequires: qwt6-qt5-devel >= 6.1
BuildRequires: pkgconfig(fftw3)
BuildRequires: hackrf-devel
BuildRequires: pkgconfig(libairspy)
BuildRequires: pkgconfig(librtlsdr)
BuildRequires: sdrplay-devel
BuildRequires: pkgconfig(portaudio-2.0)
BuildRequires: pkgconfig(samplerate)
BuildRequires: pkgconfig(sndfile)
BuildRequires: ImageMagick
BuildRequires: libusb-1_0-devel
BuildRequires: libfaad-devel
BuildRequires: update-desktop-files
BuildRequires: hicolor-icon-theme
%description
This is the implementation of a -relatively simple DAB/DAB+ receiver.
The receiver supports terrestrial DAB reception with as input either
the stream from a dabstick or a (prerecorded) file, and it will
output through the default soundcard.
%prep
%setup -q -n %{bname}-Qt-DAB-%{version6}0
%patch1 -p 1
chmod a-x README.md AUTHORS COPYING LICENSE
#rename files
mv src/scopes-qwt6/iqdisplay.cpp-xxx src/scopes-qwt6/iqdisplay.cpp
mv includes/scopes-qwt6/iqdisplay.h-xxx includes/scopes-qwt6/iqdisplay.h
%build
cd %{branch}
%cmake \
-DAIRSPY=ON \
-DHACKRF=ON \
-DRTLSDR=ON \
-DRTLTCP=ON \
-DSDRPLAY=ON
%cmake_build
%install
cd %{branch}
%cmake_install
mkdir -p %{buildroot}%{_bindir}
mv %{buildroot}/usr/%{bname}-%{version} %{buildroot}%{_bindir}/%{bname}-5
#install desktop file
%suse_update_desktop_file -G Qt-DAB -i %{bname}-5 AudioVideo Tuner
#create and install icons
convert %{bname}-5.ico %{bname}.png
install -Dpm 0644 %{bname}-7.png \
%{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{bname}.png
install -Dpm 0644 %{bname}-6.png \
%{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{bname}.png
install -Dpm 0644 %{bname}-5.png \
%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{bname}.png
install -Dpm 0644 %{bname}-4.png \
%{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{bname}.png
install -Dpm 0644 %{bname}-3.png \
%{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{bname}.png
install -Dpm 0644 %{bname}-2.png \
%{buildroot}%{_datadir}/icons/hicolor/72x72/apps/%{bname}.png
install -Dpm 0644 %{bname}-1.png \
%{buildroot}%{_datadir}/icons/hicolor/96x96/apps/%{bname}.png
install -Dpm 0644 %{bname}-0.png \
%{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{bname}.png
%files
%doc AUTHORS README.md
%license COPYING
%{_bindir}/*
%{_datadir}/applications/%{bname}-5.desktop
%{_datadir}/icons/hicolor/*x*/apps/%{bname}.png
%changelog