File pyradio.spec of Package pyradio
#
# spec file for package pyradio
#
# Copyright (c) 2025 SUSE LLC
#
# 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: pyradio
Version: @SERVICE@
Release: 0
Summary: Curses based internet radio player
License: MIT
URL: https://github.com/coderholic/pyradio
Source0: %{name}-%{version}.tar.xz
Source1: %{name}.rpmlintrc
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-base >= 3.8
BuildRequires: python3-pip
BuildRequires: python3-setuptools
BuildRequires: python3-wheel
Requires: python3-charset-normalizer
Requires: python3-dateutils
Requires: python3-dnspython
Requires: python3-psutil
Requires: python3-rich
Recommends: vlc-noX
BuildArch: noarch
%description
A command line Internet radio player based on curses, that uses external
media players to perform the actual playback. It currently supports the
following players: MPV, MPlayer and VLC.
%prep
%autosetup -p1
chmod -x %{name}/notification
%build
export LC_ALL=C.UTF-8
%python3_pyproject_wheel
%install
%python3_pyproject_install
# Fix python-bytecode-inconsistent-mtime
#pushd %%{buildroot}%%{python3_sitelib}/
#%%py3_compile -O .
#popd
%fdupes -s %{buildroot}%{python3_sitelib}/
sed -i '1s/env bash/bash/' %{buildroot}%{python3_sitelib}/%{name}/scripts/fix_%{name}_desktop_file
chmod 0755 %{buildroot}%{python3_sitelib}/%{name}/scripts/fix_%{name}_desktop_file
install -Dm 0644 docs/%{name}*.1 -t %{buildroot}%{_mandir}/man1/
install -Dm 0644 docs/*.md -t %{buildroot}%{_defaultdocdir}/%{name}/docs/
%files
%doc Changelog README.md
%doc %{_defaultdocdir}/%{name}/docs
%{_bindir}/%{name}
%{_bindir}/%{name}-client
%{_mandir}/man?/%{name}*.?%{?ext_man}
%{python3_sitelib}/%{name}
%{python3_sitelib}/%{name}-*.dist-info
%license LICENSE
%changelog