File nanovna-saver.spec of Package nanovna-saver
#
# spec file for package nanovna-saver
#
# 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 http://bugs.opensuse.org/
#
Name: nanovna-saver
Version: 0.6.5
Release: 0
Summary: A tool to save Touchstone files from the NanoVNA
License: GPL-3.0
Group: Productivity/Hamradio/Other
Url: https://github.com/NanoVNA-Saver/nanovna-saver
#Git-Clone: https://github.com/NanoVNA-Saver/nanovna-saver.git
Source: https://github.com/NanoVNA-Saver/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3 >= 3.6
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
#BuildRequires: python3-setuptools-wheel
BuildRequires: python3-wheel
BuildRequires: update-desktop-files
BuildRequires: hicolor-icon-theme
Requires: hicolor-icon-theme
Requires: python3-Cython >= 0.29.33
Requires: python3-numpy >= 1.24.2
Requires: python3-pyserial >= 3.5
Requires: python3-qt5 >= 5.15.9
Requires: python3-scipy >= 1.10.1
%description
This software connects to a NanoVNA and extracts the data for display on a
computer, and for saving to Touchstone files.
Current features:
- Reading data from a NanoVNA
- Splitting a frequency range into multiple segments to increase resolution
(tried up to >10k points)
- Averaging data for better results particularly at higher frequencies
- Displaying data on multiple chart types, such as Smith, LogMag, Phase and
VSWR-charts, for both S11 and S21
- Displaying markers, and the impedance, VSWR, Q, equivalent capacitance/inductance
etc. at these locations
- Displaying customizable frequency bands as reference, for example amateur
radio bands
- Exporting and importing 1-port and 2-port Touchstone files
- TDR function (measurement of cable length) - including impedance display
- Filter analysis functions for low-pass, high-pass, band-pass and band-stop
filters
- Display of both an active and a reference trace
- Live updates of data from the NanoVNA, including for multi-segment sweeps
- In-application calibration, including compensation for non-ideal calibration
standards
- Customizable display options, including "dark mode"
- Exporting images of plotted values
%prep
%setup -q
# fix version
sed -i '/^\s*version\s=/ s/attr: NanoVNASaver.About.version/%{version}/' setup.cfg
%build
%{__python3} setup.py build
%install
%{__python3} setup.py install --root=%{buildroot} --prefix=/usr
# rename icon
mv %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/NanoVNASaver_48x48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/NanoVNASaver.png
# create desktop file
%suse_update_desktop_file -c NanoVNASaver NanoVNASaver "Tool to save Touchstone files from the NanoVNA" NanoVNASaver nanovna-saver.png "Network;HamRadio"
# move installed doc files
mkdir -p %{buildroot}%{_docdir}/%{name}
mv %{buildroot}%{_datadir}/doc/nanovnasaver/README.md %{buildroot}%{_docdir}/%{name}
rm -Rf %{buildroot}%{_datadir}/doc/nanovnasaver
# remove build and test files
rm -rf %{buildroot}%{python3_sitelib}/build
rm -rf %{buildroot}%{python3_sitelib}/test
%files
%{_bindir}/NanoVNASaver
%{python3_sitelib}/NanoVNASaver*
%{_datadir}/applications/NanoVNASaver.desktop
%{_datadir}/icons/hicolor/*x*/apps/NanoVNASaver.png
%license LICENSE
%doc README.md
%changelog