%{?!_without_airspy:%global with_airspy 0%{?_with_airspy:1} || !0%{?rhel}} %{?!_without_devtoolset:%global with_devtoolset 0%{?_with_devtoolset:1} || (0%{?rhel} && 0%{?rhel} < 8)} %{?!_without_goesrecv:%global with_goesrecv 1} %{?!_without_goesproc:%global with_goesproc 1} %global commit 543ece3dc99ac865d87ac03490be99cf1f0457a7 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapinfo .20200505git%{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 Patch0: %{name}-commit-info.patch Patch1: %{name}-sphinx-rtd-theme-compat.patch Patch2: %{name}-proj-6.patch Patch3: %{name}-cstdint.patch Patch4: %{name}-opencv-compat.patch Patch5: %{name}-set-default-interval-value-for-goesrecv.patch Patch6: %{name}-no-sanitizers.patch 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: cmake3 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_devtoolset} BuildRequires: devtoolset-8-gcc-c++ %endif Requires: goesrecv%{?_isa} = %{version}-%{release} Requires: goesproc%{?_isa} = %{version}-%{release} %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 %if !0%{?rhel} || 0%{?rhel} >= 8 Suggests: goestools%{?isa} = %{version}-%{release} %endif %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) %if !0%{?rhel} || 0%{?rhel} >= 8 Suggests: goestools%{?isa} = %{version}-%{release} %endif %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 %if 0%{?with_devtoolset} . /opt/rh/devtoolset-8/enable %endif export CXXFLAGS="%{optflags} -I/usr/include/tinytoml -fPIC" %cmake3 \ -DCMAKE_CXX_STANDARD=14 \ -DGIT_COMMIT_HASH="%{shortcommit}" \ -DGIT_COMMIT_DATE="Tue, 5 May 2020 10:42:24 +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 . %make_build %make_build -C docs html man SPHINXBUILD=sphinx-build-%{python3_version} rm -f docs/_build/html/.{buildinfo,nojekyll} %install %make_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 * 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