%{?!python3_pkgversion:%global python3_pkgversion 3}

%global srcname mlat-client

Name:           mlat-client
Version:        0.2.13
Release:        3%{?dist}
Summary:        Mode S multilateration client
License:        GPLv3
URL:            https://github.com/mutability/mlat-client/
Source0:        https://github.com/mutability/mlat-client/archive/refs/tags/v%{version}.zip

BuildRequires:  gcc
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools

%{?python_enable_dependency_generator}

%description
This is a client that selectively forwards Mode S messages to a server that
resolves the transmitter position by multilateration of the same message
received by multiple clients.


%package -n python%{python3_pkgversion}-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{srcname}}

Requires:       python%{python3_pkgversion}-pyasyncore

%description -n python%{python3_pkgversion}-%{srcname}
This is a client that selectively forwards Mode S messages to a server that
resolves the transmitter position by multilateration of the same message
received by multiple clients.

%prep
%autosetup -p1 -n %{srcname}-%{version}

%build
%py3_build


%install
rm -rf $RPM_BUILD_ROOT
%py3_install


%files -n  python%{python3_pkgversion}-%{srcname}
%license COPYING
%doc README.md
%{_bindir}/*
%{python3_sitearch}/mlat
%{python3_sitearch}/flightaware
%{python3_sitearch}/MlatClient-%{version}-py%{python3_version}.egg-info
%{python3_sitearch}/_*.so


%changelog
* Tue Oct 01 2024 Ralf Ertzinger <ralf@skytale.net> - 0.2.13-3
- Update to 0.2.13
- Add dependency on python3-pyasyncore

* Thu May 27 2021 Ralf Ertzinger <ralf@skytale.net> - 0.2.11
- Initial build for 0.2.11