%{?!_without_airspy:%global with_airspy 1 && (0%{?_with_airspy:1} || !0%{?rhel})} %{?!_without_goesrecv:%global with_goesrecv 1} %{?!_without_goesproc:%global with_goesproc 1 && (0%{?_with_goesproc} || (0%{?fedora} < 35 && 0%{?rhel} < 9))} %global commit 9f21e52dcba8d4a11322c204597e8c0f65af0f49 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapinfo .20220327git%{shortcommit} Name: goestools Version: 0 Release: 6%{?snapinfo}%{?dist} Summary: Tools to work with signals and files from GOES satellites License: BSD URL: https://pietern.github.io/%{name} Source0: https://github.com/pietern/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz # Submitted upstream Patch7: %{name}-system-json.patch Patch8: %{name}-system-nanomsg.patch # Not submitted upstream Patch10: %{name}-sphinx-extensions.patch Patch11: %{name}-proj-compat.patch Patch12: %{name}-unbundle.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: json-static BuildRequires: libaec-devel BuildRequires: libcorrect-devel BuildRequires: libusbx-devel BuildRequires: nanomsg-devel BuildRequires: pkgconfig BuildRequires: tinytoml-static BuildRequires: zlib-devel BuildRequires: python3-rpm-macros BuildRequires: python%{python3_pkgversion}-sphinx_rtd_theme BuildRequires: python%{python3_pkgversion}-sphinx %if 0%{?with_goesrecv} Requires: goesrecv%{?_isa} = %{version}-%{release} %endif %if 0%{?with_goesproc} Requires: goesproc%{?_isa} = %{version}-%{release} %endif %description Tools to work with signals and files from GOES satellites. * goesrecv: Demodulate and decode signal into packet stream. * goeslrit: Assemble LRIT files from packet stream. * goesproc: Process LRIT files into plain files and images. I started writing this to learn about things involved in the GOES communication pipeline and in the process learn more about space communication standards. Everything is written in C++ to strike a balance between usability (no need for yet another hash table in C) and performance. %if 0%{?with_goesrecv} %package -n goesrecv Summary: Demodulate and decode signal into packet stream %if 0%{?with_airspy} BuildRequires: airspyone_host-devel %endif BuildRequires: rtl-sdr-devel Suggests: goestools%{?isa} = %{version}-%{release} %description -n goesrecv You can use goesrecv with an RTL-SDR (make sure you have one with the R820T tuner chip), or an Airspy (confirmed to work with the Mini). The raw signal is then processed by the demodulator and turned into a stream of 1s and 0s. This is then passed to the decoder where the bitstream is synchronized and error correction is applied. Every valid packet is then forwarded to downstream tools (e.g. goeslrit or goesproc). %endif %if 0%{?with_goesproc} %package -n goesproc Summary: Process LRIT files into plain files and images BuildRequires: opencv-devel BuildRequires: proj-devel pkgconfig(proj) Suggests: goestools%{?isa} = %{version}-%{release} %description -n goesproc Process stream of packets (VCDUs) or list of LRIT files. %endif %prep %autosetup -p1 -n %{name}-%{commit} # Unbundle rm -rf vendor %build export CXXFLAGS="%{optflags} -I/usr/include/tinytoml -fPIC" %cmake \ -DCMAKE_CXX_STANDARD=14 \ -DGIT_COMMIT_HASH="%{shortcommit}" \ -DGIT_COMMIT_DATE="Sun, 27 Mar 2022 14:00:22 +0200" \ %if 0%{?with_goesrecv} -DBUILD_GOESRECV=ON \ %else -DBUILD_GOESRECV=OFF \ %endif %if 0%{?with_goesproc} -DBUILD_GOESPROC=ON \ %else -DBUILD_GOESPROC=OFF \ %endif . %cmake_build %make_build -C docs html man SPHINXBUILD=sphinx-build-%{python3_version} rm -f docs/_build/html/.{buildinfo,nojekyll} %install %cmake_install install -m0644 -p -D docs/_build/man/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 %files %license LICENSE %doc README.md docs/_build/html %{_bindir}/goeslrit %{_bindir}/goespackets %{_mandir}/man1/%{name}.1.* %if 0%{?with_goesrecv} %files -n goesrecv %license LICENSE %{_bindir}/goesrecv %endif %if 0%{?with_goesproc} %files -n goesproc %license LICENSE %{_bindir}/goesproc %{_datadir}/%{name} %endif %changelog * Mon Feb 14 2022 Scott K Logan - 0-6.20220327git9f21e52 - Update to latest snapshot - Drop RHEL 7 support - Switch to CMake build macros - Disable goesproc on f35+ and RHEL 9+ due to proj 8 incompatibility * Fri May 15 2020 Scott K Logan - 0-6.20200505git543ece3 - Update to latest snapshot - Separate subpackages for goesproc and goesrecv - Submit most of the patches upstream * Sun Dec 08 2019 Scott K Logan - 0-6.20190724git24c7fcb - Handle proj that doesn't include proj.pc * Sat Dec 07 2019 Scott K Logan - 0-5.20190724git24c7fcb - Update to latest snapshot - Drop Airspy dependency for RHEL - Add devtoolset dependency for RHEL - Drop github Sphinx extension - Add a patch for Sphinx RTD theme compatibility - Add a patch for proj 6 compatibility * Fri Jun 21 2019 Scott K Logan - 0-4.20190515gitb0700de - Update to latest snapshot * Sun Apr 28 2019 Scott K Logan - 0-4.20190425gitcf4c27a - Update to latest snapshot - Add three patches which were submitted upstream * Sun Mar 24 2019 Scott K Logan - 0-3.20181228gitaef638e - Fix CXXFLAGS - Add patch for 'proj' compatibility * Sun Mar 24 2019 Scott K Logan - 0-2.20181228gitaef638e - Add dependency on 'proj' for f29 - Add commit information * Tue Mar 19 2019 Scott K Logan - 0-1.20181228gitaef638e - Initial package