# wrong version in the tinysa fork %global pyversion 0.2.2 Name: tinysa-saver Version: 0.11 Release: 1%{?dist} Summary: Tool for reading, displaying and saving data from the TinySA License: GPLv3 URL: https://github.com/erikkaashoek/tinySA-saver Source0: %{URL}/archive/v%{version}/%{name}-%{version}.tar.gz # Reported to original upstream: https://github.com/mihtjel/nanovna-saver/issues/163 Source1: tinysa-saver.desktop BuildArch: noarch BuildRequires: python3-setuptools BuildRequires: python3-devel BuildRequires: python3-pyserial BuildRequires: python3-numpy BuildRequires: python3-scipy BuildRequires: python3-qt5 BuildRequires: sed BuildRequires: desktop-file-utils Requires: hicolor-icon-theme # OS/distro specific Patch0: tinysa-saver-0.11-fedora-icon.patch # original patch # https://github.com/mihtjel/nanovna-saver/pull/162 Patch1: tinysa-saver-0.11-test-fix.patch %description A multiplatform tool to save scans from the TinySA, sweep frequency spans in segments to gain more than 290 data points, and generally display and analyze the resulting data. %prep %setup -q %autopatch -p1 # Drop shebang of non-executable sed -i '1 d' TinySASaver/__main__.py %build %py3_build %install %py3_install # drop the tests, we do not need them in production, do not use rm -rf pushd %{buildroot}%{python3_sitelib} rm -f test/__pycache__/* rmdir test/__pycache__ rm -f test/* rmdir test popd # icon install -Dpm 0644 icon_48x48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png # desktop file mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install --add-category="Utility" \ --dir=%{buildroot}%{_datadir}/applications \ %{SOURCE1} %check %{python3} setup.py test %files %license LICENSE %doc README.md %{_bindir}/TinySASaver %{python3_sitelib}/TinySASaver %{python3_sitelib}/TinySASaver-%{pyversion}-py*.egg-info %{_datadir}/icons/hicolor/48x48/apps/%{name}.png %{_datadir}/applications/%{name}.desktop %changelog * Tue Dec 7 2021 Jaroslav Škarvada - 0.11-1 - Initial version