File airspy-fmradion.spec of Package airspy-fmradion

#
# spec file for package airspy-fmradion
#
# Copyright (c) 2021-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/
#


%define cmake_git_version_tracking_hash 6c0cb87edd029ddfb403a8e24577c144a03605a6

Name:           airspy-fmradion
Version:        202509290
Release:        0
Summary:        A SDR receiver for FM and AM broadcast radio
License:        GPL-3.0-or-later
# r8brain-free-src/ is licensed under the MIT license
Group:          Productivity/Hamradio/Other
URL:            https://github.com/jj1bdx/airspy-fmradion
#Git-Clone:     https://github.com/jj1bdx/airspy-fmradion.git
Source:         %{name}-%{version}.tar.xz
Source1:        https://github.com/jj1bdx/cmake-git-version-tracking/archive/%{cmake_git_version_tracking_hash}.tar.gz#/cmake-git-version-tracking-%{cmake_git_version_tracking_hash}.tar.gz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  git
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(libairspy)
BuildRequires:  pkgconfig(libairspyhf)
BuildRequires:  pkgconfig(librtlsdr)
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  pkgconfig(portaudio-2.0)
BuildRequires:  pkgconfig(sndfile)
BuildRequires:  pkgconfig(volk)
BuildRequires:  fmt-devel
Provides:       bundled(sfmbase)
Provides:       bundled(r8brain-free-src)
Recommends:     sox

%description
A software-defined radio receiver for FM and AM broadcast radio,
and also NBFM/DSB/USB/LSB/CW/WSPR utility communications,
specifically designed for Airspy R2, Airspy Mini, Airspy HF+,
and RTL-SDR.

Features:
 * Mono or stereo decoding of FM broadcasting stations
 * Mono decoding of AM stations
 * Decoding NBFM/DSB/USB/LSB/CW/WSPR stations
 * Buffered real-time playback to soundcard or dumping to file
 * Command-line interface (only)

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

mkdir prefetched
pushd prefetched
for s in %{SOURCE1}; do tar -xf "$s"; done
popd

%build
%cmake \
   -DBUILD_SHARED_LIBS:BOOL=OFF \
   -DFETCHCONTENT_SOURCE_DIR_CMAKE_GIT_VERSION_TRACKING=../prefetched/cmake-git-version-tracking-%{cmake_git_version_tracking_hash}
%cmake_build

%install
%cmake_install
# HACK
rm -v %{buildroot}/usr/lib/libsfmbase.a

%check

%files
%license LICENSE
%doc CHANGES.md README.md
%{_bindir}/airspy-fmradion

%changelog
openSUSE Build Service is sponsored by