Files
python-catt/python-catt.spec

84 lines
2.5 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package python-catt
#
# 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/
#
%define skip_python311 1
%define skip_python312 1
%define base_name catt
Name: python-catt
Version: 0.13.1+git20250902.e62a54d
Release: 0
Summary: Cast All The Things allows you to send videos to your Chromecast
License: BSD-2-Clause
URL: https://github.com/skorokithakis/catt
Source0: %{base_name}-%{version}.tar.gz
Patch1: pyproject.toml.diff
Patch2: fix-codename.diff
BuildRequires: %{python_module PyChromecast}
BuildRequires: %{python_module click}
BuildRequires: %{python_module ifaddr}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module yt_dlp}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python3-click
Requires: python3-ifaddr
Requires: python3-PyChromecast
Requires: python3-requests
Requires: python3-yt_dlp
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
Cast All The Things allows you to send videos from many, many online sources to your Chromecast.
%prep
%setup -q -n catt-%{version}
%patch -P 1
%patch -P 2
%build
### This works using "poetry" instead of "poetry-core", (vs. patching pyproject.toml), but it's heavy ...
#poetry version %%{version}
#####
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/catt
%python_expand chmod -v u-x,g-x,o-x %{buildroot}%{$python_sitelib}/catt/cli.py
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative catt
%postun
%python_uninstall_alternative catt
%files %{python_files}
%doc README.md
%license LICENSE
%python_alternative %{_bindir}/catt
%{python_sitelib}/%{base_name}*
%changelog