File gr-osmosdr.spec of Package gr-osmosdr
#
# spec file for package gr-osmosdr
#
# Copyright (c) 2024 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/
#
%define with_sdrplay 0
%define libname libgnuradio-osmosdr
%define sover 0_2_0
Name: gr-osmosdr
Version: 0.2.6
Release: hnch2
Summary: Gnuradio Source for OsmoSDR
License: GPL-3.0-or-later
# grc/gen_osmosdr_blocks.py => GPL2.0+
# swig/osmosdr_swig.i => no license specified
Group: Productivity/Hamradio/Other
URL: https://sdr.osmocom.org/trac/wiki/GrOsmoSDR
#Git-Clone: https://git.osmocom.org/gr-osmosdr
Source: %{name}-%{version}.tar.gz
BuildRequires: airspy-devel
BuildRequires: airspyhf-devel
BuildRequires: bladeRF-devel
BuildRequires: cmake >= 3.13
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: fftw3-devel
BuildRequires: freesrp-devel
BuildRequires: gcc-c++
BuildRequires: gnuradio-devel
BuildRequires: hackrf-devel
BuildRequires: libboost_atomic-devel
BuildRequires: libboost_chrono-devel
BuildRequires: libboost_date_time-devel
BuildRequires: libboost_system-devel
BuildRequires: libboost_thread-devel
#BuildRequires: libgnuradio-funcube-devel
BuildRequires: libgnuradio-iqbalance-devel
BuildRequires: libmirisdr-devel
BuildRequires: libosmo-dsp-devel
BuildRequires: libsndfile-devel
BuildRequires: libunwind-devel
BuildRequires: libusb-1_0-devel >= 1.0.19
BuildRequires: orc
BuildRequires: python3-devel
BuildRequires: python3-numpy-devel
BuildRequires: python3-pybind11-devel
BuildRequires: python3-six
BuildRequires: rtl-sdr-devel
BuildRequires: soapy-sdr-devel
Conflicts: libSoapySDR0_8-3
BuildRequires: udev
BuildRequires: uhd-devel
BuildRequires: libgnuradio-iio-devel
BuildRequires: libiio-devel
BuildRequires: libad9361-iio-devel
Requires: python3-gr-osmosdr = %{version}
Patch1: gr-osmosdr-0.2.6-iioboards.diff
Patch3: gr-osmosdr-0.2.6-paveldeminsdr.diff
%if 0%{with_sdrplay}
# SDRplay support via libsdrplay2 from
# https://github.com/willcode/gr-osmosdr/tree/sdrplay2
Source1: gr-osmosdr-sdrplay2-support-git20180914.tar.gz
Patch2: gr-osmosdr-add-sdrplay2-support-git20180914-gr38.patch
Patch7: gr-osmosdr-0007-sdrplay-use-std-ptr.patch
%endif
%ifarch i586 x86_64 aarch64 armv7hl
BuildRequires: libxtrx-devel
%endif
%if 0%{with_sdrplay}
BuildRequires: sdrplay-devel
%endif
%description
OsmoSDR Gnuradio Source supports the OsmoSDR hardware, but it also offers a
wrapper functionality for FunCube Dongle, Ettus UHD and rtl-sdr radios.
%package -n %{libname}%{sover}
Summary: Library for gr-osmosdr
Group: System/Libraries
%description -n %{libname}%{sover}
OsmoSDR Gnuradio Source supports the OsmoSDR hardware, but it also offers a
wrapper functionality for FunCube Dongle, Ettus UHD and rtl-sdr radios.
%package -n python3-gr-osmosdr
Summary: Python bindings for gr-osmosdr
Group: Development/Libraries/Other
%description -n python3-gr-osmosdr
Python Bindings for gr-osmosdr.
OsmoSDR Gnuradio Source supports the OsmoSDR hardware, but it also offers a
wrapper functionality for FunCube Dongle, Ettus UHD and rtl-sdr radios.
%package devel
Summary: Development files for gr-osmosdr
Group: Development/Libraries/Other
Requires: %{libname}%{sover} = %{version}-%{release}
Requires: %{name} = %{version}
%description devel
Library headers for gr-osmosdr.
OsmoSDR Gnuradio Source supports the OsmoSDR hardware, but it also offers a
wrapper functionality for FunCube Dongle, Ettus UHD and rtl-sdr radios.
%package doc
Summary: Documentation for gnuradio-osmosdr
Group: Documentation/Other
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for gr-osmosdr module for GNU Radio.
%prep
%setup -q
%patch -P 1 -p 1
%patch -P 3 -p 1
%if 0%{with_sdrplay}
tar -xzf %{SOURCE1}
%patch -P 2 -p 1
%patch -P 7 -p 1
%endif
%build
%cmake \
%if 0%{with_sdrplay}
-DENABLE_NONFREE=1 \
%endif
-DENABLE_FREESRP=0 \
-DENABLE_XTRX=0 \
-DENABLE_DOXYGEN=1 \
-DCMAKE_SHARED_LINKER_FLAGS=""
%cmake_build
%install
%cmake_install
mkdir -p %{buildroot}%{_docdir}
mv %{buildroot}/%{_datadir}/doc/%{name} %{buildroot}%{_docdir}
%fdupes %{buildroot}/%{_prefix}
%post -n %{libname}%{sover} -p /sbin/ldconfig
%postun -n %{libname}%{sover} -p /sbin/ldconfig
%files
%license COPYING
%doc AUTHORS README.md
%{_bindir}/osmocom_*
%{_datadir}/gnuradio/grc/blocks/*.yml
%exclude %{_docdir}/%{name}/html
%exclude %{_docdir}/%{name}/xml
%files -n python3-gr-osmosdr
%{python3_sitearch}/osmosdr
%files -n %{libname}%{sover}
%{_libdir}/%{libname}*.so.*
%files devel
%{_libdir}/%{libname}*.so
%{_includedir}/osmosdr
%{_libdir}/cmake/osmosdr
%files doc
%{_docdir}/%{name}/html
%{_docdir}/%{name}/xml
%changelog
* Fri Jul 26 2024 Henning Paul <hnch@gmx.net>
- Fixed bug in paveldeminsdr code
- Added gr-iio dependency
* Thu Jul 25 2024 Henning Paul <hnch@gmx.net>
- Add support for IIO boards and Pavel Demin's Rx SDR
* Wed Jun 12 2024 Wojciech Kazubski <wk@ire.pw.edu.pl>
- Update to release (tag) 0.2.6
* lib/xtrx: honouring/using the loglevel parameter
- Update to release (tag) 0.2.5
* Fix compilation of retpitaya and rtl_tcp with MinGW
* Tue Feb 27 2024 Dominique Leuenberger <dimstar@opensuse.org>
- Use %%patch -P N instead of deprecated %%patchN.
* Sun Apr 30 2023 Martin Pluskal <mpluskal@suse.com>
- Rename python plugin to python3
- Small spec file cleanup
* Wed Feb 1 2023 Wojciech Kazubski <wk@ire.pw.edu.pl>
- Disable XTRX support (causes runtime crash)
- Update copyright year
* Wed Jan 11 2023 Wojciech Kazubski <wk@ire.pw.edu.pl>
- Update to release (tag) 0.2.4
+ reenabled MiriSDR support
* FUNcube Dongle and FUNcube Dongle Pro+ support via gr-funcube
- Patch gr-osmosdr-0009-use-with-gr-funcube.patch removed (applied
upstream)
- Fixed bug in patch gr-osmosdr-0007-sdrplay-use-std-ptr.patch
* Mon May 9 2022 Wojciech Kazubski <wk@ire.pw.edu.pl>
- added a patch gr-osmosdr-0009-use-with-gr-funcube.patch, created
by DL1KSV (slightly modified) restoring support for FUNcube Dongle
and FUNcube Dongle Pro+ through gr-funcube
- Disabled FreeSRP support as it breaks the build
* Sun Feb 20 2022 Wojciech Kazubski <wk@ire.pw.edu.pl>
- added a patch gr-osmosdr-0007-sdrplay-use-std-ptr.patch needed for
SDRplay support after switching to std::shared_ptr
* Wed Sep 15 2021 Wojciech Kazubski <wk@ire.pw.edu.pl>
- update to git snapshot 0.2.3git20210128
- builds with GNU Radio 3.9
- Drop patches (applied upstream)
* gr-osmosdr-0001-hackrf-fix-bandwidth-setting.patch
* gr-osmosdr-0002-xtrx-remove-BOOST_FOREACH-and-obsolete-API-call.patch
* gr-osmosdr-0003-xtrx-add-missing-libraries.patch
* Thu Jul 29 2021 Wojciech Kazubski <wk@ire.pw.edu.pl>
- Update to release 0.2.3
* Fix receive path hangs if another thread closes down the hackrf
receive whilst this buffer receive function is waiting to be
woken up. This fixes hangs where consumers like gqrx via
gnuradio will do a stop_rx/start_rx very quickly to change
something, and the buffer receive path is waiting for a buffer.
- Drop patches (applied upstream)
* 0001-fix-windows-build.patch
* 0002-Replace-BOOST_FOREACH-with-range-based-for-loops.patch
* 0003-rfspace-Remove-broken-asio-code.patch
* 0004-Remove-disabled-OsmoSDR-and-MiriSDR-code.patch
* 0005-add-xtrx-support.patch
- Add patches
* gr-osmosdr-0001-hackrf-fix-bandwidth-setting.patch
* gr-osmosdr-0002-xtrx-remove-BOOST_FOREACH-and-obsolete-API-call.patch
* gr-osmosdr-0003-xtrx-add-missing-libraries.patch
- Remove unneeded build dependencies for osmosdr and mirisdr
- Rename devel-doc subpackage to doc
- XTRX support limited to Intel and ARM architectures only
* Sun Dec 13 2020 Martin Hauke <mardnh@gmx.de>
- Update to release 0.2.2
* Add xtrx support
* Remove disabled OsmoSDR and MiriSDR code
* rfspace: Remove broken asio code
* Replace BOOST_FOREACH with range-based for loops
* fix windows build
* HackRF: fix hackrf_source signedness
* disable OsmoSDR as well as MiriSDR device support
- Drop patches
* gr-osmosdr-add-xtrx-support-git20200103-gr38.patch
- Add patches
* 0001-fix-windows-build.patch
* 0002-Replace-BOOST_FOREACH-with-range-based-for-loops.patch
* 0003-rfspace-Remove-broken-asio-code.patch
* 0004-Remove-disabled-OsmoSDR-and-MiriSDR-code.patch
* 0005-add-xtrx-support.patch
* Tue Aug 4 2020 Martin Hauke <mardnh@gmx.de>
- Update to release 0.2.1
* disable OsmoSDR as well as MiriSDR device support
* cmake: actually make linking work
* grc: Fix YML block generation
* Remove unused imports of endian.hpp.
* HackRF: convert _lut to float[] to reduce size by a factor
of 256
* fcd: restore support for FUNcube Dongle and Pro+
* A lot of Boost functionality is available in C++11. Since
GNU Radio is moving away from Boost, it probably makes sense to
do so in gr-osmosdr as well.
* I'm using an Airspy HF+ Discovery with the Soapy driver.
whenever I turn AGC off it stops receiving samples.
* rtl_tcp: Throw an exception if TCP connection fails
* cmake: Go back CMake min ver. 3.8 by removing need for CMP0079
- Add _service file
- Update patch:
* gr-osmosdr-add-xtrx-support-git20200103-gr38.patch
* Sun Feb 16 2020 Wojciech Kazubski <wk@ire.pw.edu.pl>
- updated to release 0.2.0
* first release supporting GNU Radio 3.8
* GNU Radio 3.8 support is now in master branch
* osmocom_fft uses Python 3 and Qt, also can handle continuous
range for sample rate gracefully
* initial support for Airspy HF+
* allow transmit/receive switching for HackRF
* fixes and improvements to airspy and hackrf backends
* requires cmake >= 3.13 for build
* Sat Feb 8 2020 Wojciech Kazubski <wk@ire.pw.edu.pl>
- updated to version 0.2.0 snapshot 20200204
* based on latest osmocom git snapshot (branch gr-3.8)
* builds with GNU Radio 3.8
- XTRX patchset reworked and rebased to xtrx/gr-osmosdr git snapshot
20190927 and modified to work with gr-3.8 branch
- ready for SDRplay support via libsdrplay2 based on
willcode/gr-osmosdr fork modified to work for gr-3.8 branch
* Sun Jun 2 2019 Martin Hauke <mardnh@gmx.de>
- Fix license tag:
* GPL-2.0-or-later => GPL-3.0-or-later with two exceptions:
- grc/gen_osmosdr_blocks.py => GPL2.0+
- swig/osmosdr_swig.i => no license specified
* Sun Mar 24 2019 Wojciech Kazubski <wk@ire.pw.edu.pl>
- Fixed build with Boost 1.69
* Thu Jan 17 2019 mardnh@gmx.de
- User correct license tag:
GPL-2.0-only => GPL-2.0-or-later
* Wed Jan 9 2019 Jan Engelhardt <jengelh@inai.de>
- Limit %%fdupes call to not cross the /usr subvolume boundary.
- Adjust RPM groups.
* Tue Jan 8 2019 mardnh@gmx.de
- Add patches:
* 0001-update-for-new-API-and-multi-XTRX-support.patch
- Remove patches:
* fix-xtrx.patch
* Sun Dec 30 2018 mardnh@gmx.de
- Build with support for XTRX
- Add patches:
* 0001-add-xtrx-support.patch
* 0002-cmake-use-CMAKE_CURRENT_SOURCE_DIR-instead-of-CMAKE_.patch
* 0003-add-antenna-AUTO-selection.patch
* 0004-Add-XTRX-to-README-and-help-output.patch
* 0005-XTRX-add-ability-to-specify-device-and-DSP-freq.patch
* fix-xtrx.patch
* Sat Oct 13 2018 mardnh@gmx.de
- Update to version 0.1.4+git.20180815:
* bladerf: update bladerf to catch up with libbladeRF
* bladeRF: add support for biastee on bladeRF micro
* bladerf: remove vestigial map
* bladerf: use bladerf_get_channel_count where available
* bladerf: compatibility with older libbladeRF
* bladerf: add support for MIMO
* bladerf_common: tweak buffer/transfer settings
* bladerf: add set_rx_mux_mode functionality
* bladerf: add firmware loopback mode
* bladerf_common: add agc= option to set gain mode
* bladerf: use nchan option to enable multi-channels
* bladerf: fix get_gain_names population
* bladerf: formatting/style fixes on .h files
* bladerf: formatting/consistency fixes
* bladerf_common: formatting/whitespace/consistency
* bladerf: replace bladerf_module with bladerf_direction
* bladerf_common: cleanup on set_gain_mode
* bladeRF: fix identification of channels
* bladeRF: remove set_bb_gain
* update copyright dates
* formatting/wording tweaks
* bladerf2: add get_gain_mode and set_gain_mode
* WIP: libbladeRF rev2 refactoring etc
* WIP: more port work
* bladerf: initial support for new bladeRF hardware
* link with pthreads only when using gcc
* Remove workaround for gnuradio bug #528 as it has been fixed in 3.7.9.1
* Tue Jun 26 2018 mardnh@gmx.de
- Update to version 0.1.4+git.20180617:
* Fix compilation with boost-1.67
* freesrp: whitespace fixes
* Thu Jun 15 2017 wk@ire.pw.edu.pl
- Update to version 0.1.4+git.20170611:
* freesrp - add support for multiple devices
* rtl,rtl_tcp - add bias=0|1 parameter to contro l bias tee
* RTL-TCP - convert to single class model
* RTL-SDR - correct _lut to float[] to reduce size by a factor of 256
* Thu May 25 2017 mardnh@gmx.de
- Use %%cmake macro
* Mon May 8 2017 mardnh@gmx.de
- Update to version 0.1.4+git.20170421:
* soapy - check for freq corr before invoking
* soapy: support newer getSampleRateRange() API call
* soapy: support set/getFrequencyCorrection() API
* soapy - correct constant for frequency correction
* Wed Apr 19 2017 mardnh@gmx.de
- Update to version 0.1.4+git.20170418:
* Add support for FreeSRP
- Use package-meta for tar_scm service and add git-core
to BuildRequires
* Sat Apr 15 2017 mardnh@gmx.de
- Update to version 0.1.4+git.20170227:
- Use pkgconfig-style for BuildRequires
- Rename %%soname to %%sover to better reflect its use
- Fix build for all 64-bit platforms
- Build development documentation
- Add _service file
- Run spec-cleaner
- Support SoapySDR
* Tue Feb 16 2016 dl8fcl@t-online.de
- Support for Airspy,BladeRF and Mirisdr added
* Sun Jan 17 2016 dl8fcl@t-online.de
- update to version 0.1.4_137
* Thu Dec 25 2014 dl8fcl@darc.de
- update to version 0.1.4_65_gafac116
* Fri Sep 5 2014 dl8fcl@darc.de
- update to version 0.1.3_53_g959e7d2
* Sat Nov 2 2013 dl8fcl@darc.de
- update to version 0.1.0_70_gf6f3b53
Support for HackRF Jawbreaker added. Untested,
reports are welcome
* Sun Sep 22 2013 dl8fcl@darc.de
- update to version 0.1.0_git20130918
* Sun Aug 18 2013 dl8fcl@darc.de
- Requires in spec file corrected
* Sat Aug 17 2013 dl8fcl@darc.de
- Support for sysmocom OsmoSDR added
untested, reports are welcome
* Wed Aug 14 2013 dl8fcl@darc.de
- update to version 0.1.0_git20130814
- Support for funcube dongle pro+ added
untested, reports are welcome
* Mon Aug 12 2013 dl8fcl@darc.de
- Osmocom IQ Imbalance Correction enabled
* Tue Jul 30 2013 dl8fcl@darc.de
- update to version 0.1.0_git20130730
* Sun Jul 28 2013 dl8fcl@darc.de
- update to version 0.1.0_git20130728
changes for gnuradio-3.7.0
* Mon May 13 2013 dl8fcl@darc.de
- update to version git20130509
further enhancements
* Mon May 6 2013 lnt-sysadmin@lists.lrz.de
- fixed BuildRequires, Files and Post for python-gr-osmosdr package
* Sun Apr 28 2013 dl8fcl@darc.de
- update to version git20130428
further enhancements and new blocks
* Fri Mar 22 2013 dl8fcl@darc.de
- import into the hamradio repository