File viewsb.spec of Package viewsb

#
# spec file for package viewsb
#
# Copyright (c) 2020, 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 http://bugs.opensuse.org/


Name:           viewsb
Version:        0.0.0+git.20200330
Release:        0
Summary:        USB analyzer toolkit
License:        BSD-3-Clause AND GPL-2.0-or-later
Group:          Development/Languages/Python
URL:            https://github.com/usb-tools/viewsb
Source:         %{name}-%{version}.tar.xz
Patch0:         viewsb-dont-require-optional-dependencies.patch
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  python3-setuptools
Requires:       python3-bitstruct
Requires:       python3-construct
Requires:       python3-crcmod
Requires:       python3-pyside2
Requires:       python3-tableprint
Requires:       python3-urwid
BuildArch:      noarch

%description
Open-source USB analyzer toolkit with support for a variety
of capture hardware.

%prep
%setup -q
%patch0 -p1
sed -i -e '/^#!\//, 1d' viewsb/commands/viewsb.py

%build
%python3_build

%install
%python3_install
%fdupes %{buildroot}%{python3_sitelib}

#%%check
# there are no tests atm

%files
%license LICENSE-BSD LICENSE-GPLv2
%doc README.md
%{_bindir}/viewsb
%{python3_sitelib}/viewsb*
#### FIXME: wrong dir
%dir %{_prefix}/viewsb/frontends
%dir %{_prefix}/viewsb/
%{_prefix}/viewsb/frontends/qt.ui
#### /FIXME

%changelog
openSUSE Build Service is sponsored by