File freedv.spec of Package freedv
#
# spec file for package freedv
#
# Copyright (c) 2022-2023 SUSE LLC
#
# 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/
#
%{!?_iconsbasedir: %global _iconsbasedir %{_datadir}/icons/hicolor}
Name: freedv
Version: 1.8.9
Release: 1
Summary: FreeDV Digital Voice for Linux
License: GPL-2.0-or-later
URL: http://freedv.org
Source0: https://github.com/drowe67/freedv-gui/archive/refs/tags/v%{version}.tar.gz#/%{name}-gui-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: gcc-c++
%if 0%{?suse_version} >1500
BuildRequires: wxWidgets-3_2-devel >= 3.0.0
%else
BuildRequires: wxWidgets-3_0-devel >= 3.0.0
%endif
BuildRequires: pkg-config
BuildRequires: pkgconfig(codec2) >= 1.0
BuildRequires: desktop-file-utils
BuildRequires: lpcnet-devel
BuildRequires: pkgconfig(portaudio-2.0)
BuildRequires: pkgconfig(sndfile)
BuildRequires: pkgconfig(samplerate)
BuildRequires: pkgconfig(hamlib)
BuildRequires: pkgconfig(sox)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(speex)
BuildRequires: update-desktop-files hicolor-icon-theme
%description
FreeDV is a GUI application for Windows and Linux that allows any SSB radio to
be used for low bit rate digital voice.
Speech is compressed down to 1400 bit/s then modulated onto a 1100 Hz wide QPSK
signal which is sent to the Mic input of a SSB radio. On receive, the signal is
received by the SSB radio, then demodulated and decoded by FreeDV.
FreeDV was built by an international team of Radio Amateurs working together on
coding, design, user interface and testing. FreeDV is open source software,
released under the GNU Public License version 2.1. The FDMDV modem and Codec 2
Speech codec used in FreeDV are also open source.
%package samples
Summary: Samples for FreeDV
BuildArch: noarch
Requires: %{name} = %{version}
%description samples
Samples for FreeDV Digital Voice for Linux
%prep
%setup -q -n %{name}-gui-%{version}
%build
export LDFLAGS="-Wl,--as-needed"
%cmake ../ \
-DUSE_STATIC_CODEC2=FALSE \
-DUSE_STATIC_SPEEXDSP=FALSE
%cmake_build
%install
%cmake_install
# Install desktop file
%suse_update_desktop_file -r %{name} GTK Internet HamRadio
# move docs
mkdir -p %{buildroot}%{_docdir}/%{name}
mv %{buildroot}%{_datadir}/%{name}-gui/USER_MANUAL.* %{buildroot}%{_docdir}/%{name}
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%doc README.md USER_MANUAL.*
%license COPYING
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_iconsbasedir}/*/apps/%{name}.png
%dir %{_datadir}/%{name}-gui
%files samples
%{_datadir}/%{name}-gui/wav
%changelog