File scat.spec of Package scat
#
# spec file for package scat
#
# Copyright (c) 2023-2025, Martin Hauke <mardnh@gmx.de>
#
# 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 https://bugs.opensuse.org/
#
%define pythons python3
Name: scat
Version: 2.0.0
Release: 0
Summary: Mobile baseband message analyzer
License: GPL-2.0-only
URL: https://github.com/fgsect/scat
Source: https://github.com/fgsect/scat/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3
BuildRequires: python3-bitstring
BuildRequires: python3-hatchling
BuildRequires: python3-pip
BuildRequires: python3-pyserial
BuildRequires: python3-pytest
BuildRequires: python3-pyusb
BuildRequires: python3-wheel
Requires: python3
Requires: python3-bitstring
Requires: python3-pyserial
Requires: python3-pyusb
BuildArch: noarch
%description
SCAT: *S*ignaling *C*ollection and *A*nalysis *T*ool.
IT parses diagnostic messages of Qualcomm and Samsung baseband
through USB, and generates a stream of GSMTAP packet containing
cellular control plane messages.
%prep
%setup -q
sed -i -e '/^#!\//, 1d' src/scat/main.py
chmod -x src/scat/main.py
%build
%pyproject_wheel
%install
%pyproject_install
find %{buildroot}%{python3_sitelib} -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
%fdupes %{buildroot}%{python3_sitelib}
%check
%pytest
%files
%doc README.md
%doc wireshark/scat.lua
%license COPYING
%{_bindir}/scat
%{python3_sitelib}/scat
%{python3_sitelib}/signalcat-%{version}.dist-info
%changelog