File curseradio.spec of Package curseradio

#
# spec file for package curseradio.spec
#
# Copyright (c) 2019-2020 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# 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/
#


Name:           curseradio
Version:        0.2+git20171017.1bd4bd0
Release:        0
Summary:        Command line radio player
License:        MIT
URL:            https://github.com/chronitis/curseradio
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  python-rpm-macros
BuildRequires:  python3-setuptools
## MANUAL BEGIN
Requires:       mpv
Requires:       python3-lxml
Requires:       python3-requests
Requires:       python3-pyxdg
## MANUAL END
BuildArch:      noarch

%description
Curseradio is a `curses` interface for browsing and playing an `OPML` directory
of internet radio streams. It is designed to use the *tunein* directory found
at <http://opml.radiotime.com/>, but could be adapted to others.

%prep
%autosetup
# Fix rpm runtime dependency rpmlint error replace the shebang in all the scripts with %%{_bindir}/python3
find . -name "*.py" -exec sed -i 's|#!%{_bindir}/env python3|#%{_bindir}/python3|' {} ";"

%build
export LC_ALL=en_US.utf8
%python3_build

%install
export LC_ALL=en_US.utf8
%python3_install

%files
%license LICENSE
%{_bindir}/curseradio
%{python3_sitelib}/*

%changelog
openSUSE Build Service is sponsored by