File ssterm.spec of Package ssterm

#
# spec file for package ssterm
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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:           ssterm
Version:        3.0.0
Release:        0
Summary:        Simple Serial-Port Terminal
License:        MIT
Group:          Hardware/Other
# was http://dev.frozeneskimo.com/software_projects:ssterm
URL:            https://github.com/vsergeev/ssterm
Source:         https://github.com/vsergeev/ssterm/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  help2man
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildArch:      noarch

%description
ssterm (short for "simple serial-port terminal") is a console-based serial port
terminal with curses and stdin/stdout user interfaces. ssterm supports a
variety of features, such as hexadecimal data representation, remapping of
transmitted and received newlines, newline character color-coding, buffer
scrolling/dumping, and data piping.

%prep
%setup -q
# fix shebang
sed -i '/^#!/d' %{name}.py

%build
python3 setup.py build

%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
mkdir -pv %{buildroot}%{_mandir}/man1
PYTHONPATH=%{buildroot}%{python3_sitelib} help2man \
%{buildroot}%{_bindir}/%{name} -N -o \
%{buildroot}%{_mandir}/man1/%{name}.1

%check
python3 test_ssterm.py

%files
%doc ChangeLog.md LICENSE README.md
%attr (0755,root,root) %{_bindir}/%{name}
%{_mandir}/man1/%{name}.1%{ext_man}
%{python3_sitelib}/__pycache__/%{name}.cpython-*.pyc
%{python3_sitelib}/%{name}.py
%{python3_sitelib}/%{name}-%{version}-py*.egg-info

%changelog
openSUSE Build Service is sponsored by