# git submodules pinned by the v%{version} tag, not part of the GitHub tarball %global libm17_commit 735fadd700461d65d0f0002b7609fe0e3aba438d %global microecc_commit 31520c8f1f58920ef89086386d259640077ecb35 %global tinieraes_commit 8cff8da24dbcbe7a5769319d8384b64cb2b91c8f %global codec2mod_commit 7c334283794fa6304dc014f12df70afc8393143a Name: gr-m17 Version: 1.0.0 Release: %autorelease Summary: GNU Radio OOT module for the M17 digital communications amateur radio mode # gr-m17: GPL-3.0-or-later # libm17: GPL-2.0-only # Codec2-mod: LGPL-2.1-only # micro-ecc: BSD-2-Clause # tinier-aes: Unlicense License: GPL-3.0-or-later AND GPL-2.0-only AND LGPL-2.1-only AND BSD-2-Clause AND Unlicense URL: https://github.com/M17-Project/gr-m17 Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: https://github.com/M17-Project/libm17/archive/%{libm17_commit}.tar.gz#/libm17-%{libm17_commit}.tar.gz Source2: https://github.com/M17-Project/micro-ecc/archive/%{microecc_commit}.tar.gz#/micro-ecc-%{microecc_commit}.tar.gz Source3: https://github.com/lwvmobile/tinier-aes/archive/%{tinieraes_commit}.tar.gz#/tinier-aes-%{tinieraes_commit}.tar.gz Source4: https://github.com/M17-Project/Codec2-mod/archive/%{codec2mod_commit}.tar.gz#/Codec2-mod-%{codec2mod_commit}.tar.gz BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: fmt-devel BuildRequires: gmp-devel BuildRequires: gnuradio-devel BuildRequires: pybind11-devel BuildRequires: python3-devel BuildRequires: python3-numpy BuildRequires: spdlog-devel Requires: gnuradio%{?_isa} # compiled into libgnuradio-m17 Provides: bundled(libm17) = 0^git%{sub %{libm17_commit} 1 7} Provides: bundled(micro-ecc) = 0^git%{sub %{microecc_commit} 1 7} Provides: bundled(tinier-aes) = 0^git%{sub %{tinieraes_commit} 1 7} Provides: bundled(codec2) = 0^git%{sub %{codec2mod_commit} 1 7} %description gr-m17 is a GNU Radio out-of-tree module for the M17 digital communications amateur radio mode. M17 is developing open source hardware, software, and offers a complete digital radio protocol for data and voice, made by and for amateur radio operators. The protocol's voice mode uses the free and open Codec 2 voice encoder. This means there are no patents, no royalties, and no licensing or legal barriers to scratch-building your own radio or modifying one you already own. %package devel Summary: Development files for gr-m17 Requires: %{name}%{?_isa} = %{version}-%{release} Requires: gnuradio-devel %description devel Header files and CMake configuration for building software against gr-m17. %prep %autosetup tar -xzf %{SOURCE1} --strip-components=1 -C libm17 tar -xzf %{SOURCE2} --strip-components=1 -C micro-ecc tar -xzf %{SOURCE3} --strip-components=1 -C tinier-aes tar -xzf %{SOURCE4} --strip-components=1 -C codec2-mod # keep the licenses of the bundled code apart from the top level LICENSE for d in libm17 micro-ecc tinier-aes codec2-mod; do install -pm 0644 $d/LICENSE* LICENSE.$d done %build %cmake -DENABLE_DOXYGEN=OFF %cmake_build %install %cmake_install %check # upstream ships no tests, at least make sure the module loads PYTHONPATH=%{buildroot}%{python3_sitearch} \ LD_LIBRARY_PATH=%{buildroot}%{_libdir} \ %{python3} -c 'from gnuradio import m17' %files %license LICENSE LICENSE.libm17 LICENSE.micro-ecc LICENSE.tinier-aes LICENSE.codec2-mod %doc README.md examples/*.grc %{_libdir}/libgnuradio-m17.so.1.0.0* %{python3_sitearch}/gnuradio/m17/ %{_datadir}/gnuradio/grc/blocks/m17_*.block.yml %files devel %{_includedir}/gnuradio/m17/ %{_libdir}/libgnuradio-m17.so %{_libdir}/cmake/gnuradio-m17/ %changelog %autochangelog