%global forgeurl https://gitlab.com/eliggett/wfview %global commit b4c079f7f46d0a7c2399dd1c52af13fc60bc5bdb %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: wfview Version: 1.64 Release: %autorelease Summary: Control modern Icom radios # wfview is GPLv3, the rest comes from bundled dependencies License: GPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only URL: https://wfview.org Source0: %{forgeurl}/-/archive/v%{version}/%{name}-v%{version}-%{commit}.tar.gz Source1: %{forgeurl}/-/raw/9be0acdf2e204203ee945cb2395eae271a174f5d/resources/org.wfview.wfview.metainfo.xml # The channel spacing 6.125 is not half of 12.5 kHz Patch: %{forgeurl}/-/commit/1805861274019beb996391828ed800abd794bef0.patch BuildRequires: desktop-file-utils BuildRequires: gawk BuildRequires: gcc-c++ BuildRequires: hostname BuildRequires: libappstream-glib BuildRequires: make BuildRequires: sed BuildRequires: eigen3-devel BuildRequires: hidapi-devel BuildRequires: libudev-devel BuildRequires: qcustomplot-qt5-devel BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtgamepad-devel BuildRequires: qt5-qtmultimedia-devel BuildRequires: qt5-qtserialport-devel BuildRequires: opus-devel BuildRequires: portaudio-devel BuildRequires: rtaudio-devel # The resampler logic under resampler/ is based on these # License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only Provides: bundled(opus-tools) Provides: bundled(vorbis-tools) # Various endinanness issues make the build fail on s390x ExcludeArch: s390x %description wfview is a program developed by amateur radio enthusiasts to control modern Icom ham radios. wfview controls modern Icom rigs using either a USB serial connection or OEM network (Ethernet or Wi-Fi) connection. Live, real-time spectrum analyzer data are displayed, and rig controls are presented. Additional programs may tie into the CIV bus using the pseudo-terminal device or hamlib-compatible rigctld server. %prep %autosetup -n %{name}-v%{version}-%{commit} -p1 # Build system tweaks: # - use the release commit hash instead of shelling out to git # - use the correct library name for qcustomplot # - fix the install paths to respect DESTDIR # - do not strip binaries sed -i wfview.pro \ -e 's|GITSHORT=.*$|GITSHORT=\\\\\\"%{shortcommit}\\\\\\"|g' \ -e 's|libqcustomplot.so|libqcustomplot-qt5.so|g' \ -e 's|-lqcustomplot|-lqcustomplot-qt5|g' \ -e 's|$$PREFIX/|$$DESTDIR$$PREFIX/|g' \ -e 's|-s$||g' %build %qmake_qt5 %{name}.pro DESTDIR="%{buildroot}" PREFIX="%{_prefix}" %make_build %install %make_install # Remove spurious binary rm %{buildroot}/%{name} # Install AppStream metadata install -Dpm644 -t %{buildroot}%{_metainfodir} %SOURCE1 %check desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop appstream-util validate-relax --nonet \ %{buildroot}%{_metainfodir}/org.%{name}.%{name}.metainfo.xml %files %license LICENSE %doc README.md CHANGELOG CI-V.md RIG_ISSUES_AND_LIMITS.md WHATSNEW %doc USERMANUAL/ %{_bindir}/%{name} %{_datadir}/%{name}/ %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/%{name}.png %{_metainfodir}/org.%{name}.%{name}.metainfo.xml %changelog %autochangelog