File qcsuper.spec of Package qcsuper

#
# spec file for package qcsuper
#
# Copyright (c) 2024 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
%define realname QCSuper
Name:           qcsuper
Version:        2.0.1
Release:        0
Summary:        DIAGnostic tool for Qualcomm-based phones and modems
License:        GPL-3.0-only
Group:          Productivity/Networking/Diagnostic
URL:            https://github.com/P1sec/QCSuper
Source0:        https://github.com/P1sec/QCSuper/archive/refs/tags/%{version}.tar.gz#/%{realname}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  python3-pip
BuildRequires:  python3-setuptools
BuildRequires:  python3-pyserial >= 3.5
BuildRequires:  python3-pyusb >= 1.2.1
BuildRequires:  python3-crcmod >= 1.7
BuildRequires:  python3-pycrate >= 0.7.0
BuildRequires:  python3-wheel
Requires:       python3-pyserial >= 3.5
Requires:       python3-pyusb >= 1.2.1
Requires:       python3-crcmod >= 1.7
Requires:       python3-pycrate >= 0.7.0
#BuildArch:      noarch
#[   12s] qcsuper.noarch: E: arch-independent-package-contains-binary-or-object (Badness: 499) /usr/lib/python3.11/site-packages/qcsuper/inputs/adb_bridge/adb_bridge
#[   12s] qcsuper.noarch: E: arch-independent-package-contains-binary-or-object (Badness: 499) /usr/lib/python3.11/site-packages/qcsuper/inputs/external/adb/adb_linux

%description
QCSuper is a tool communicating with Qualcomm-based phones and modems,
allowing to capture raw 2G/3G/4G radio frames, among other things.

%prep
%setup -q -n %{realname}-%{version}
# drop shebang
find ./src/ -name "*.py" -exec sed -i '/^#!\//, 1d' {} \;

%build
%pyproject_wheel

%install
%pyproject_install
%fdupes %{buildroot}%{python3_sitelib}

%check
# nothing to check yet

%files
%license LICENSE
%doc README.md
%{_bindir}/qcsuper
%{python3_sitelib}/qcsuper*
# !!! also ships an 32bit-ARM version of adb_bridge ...
#%%{python3_sitelib}/qcsuper/inputs/adb_bridge/README.md
#%%{python3_sitelib}/qcsuper/inputs/adb_bridge/adb_bridge
#%%{python3_sitelib}/qcsuper/inputs/adb_bridge/adb_bridge.c
# !!! also ships an x64_64 version of adb_linux ...
#%%{python3_sitelib}/qcsuper/inputs/external/adb/adb_linux

%changelog
openSUSE Build Service is sponsored by