fix(kde-material-you-colors): Use file-magic instead of magic (#9303) (#9313)

* fix(kde-material-you-colors): Use file-magic instead of magic



* If it's this again



* fix: BuildRequires



* chore: See if Mock is needed



* Aghhhh



* I swear



* Try this first I guess?



* fix: Python macro weirdness



* fix: This is how the dev does it so this is how I will



---------


(cherry picked from commit ec9c48060b)

Signed-off-by: Gilver <roachy@fyralabs.com>
Co-authored-by: Gilver <roachy@fyralabs.com>
This commit is contained in:
Raboneko
2026-01-18 20:30:40 -08:00
committed by GitHub
parent 84c82eb92b
commit efcaec53ce
@@ -4,7 +4,7 @@
Name: kde-material-you-colors
Version: 2.0.0
Release: 1%?dist
Release: 2%?dist
Summary: Automatic Material You Colors Generator from your wallpaper for the Plasma Desktop
License: GPL-3.0-only
URL: https://github.com/luisbocanegra/%{name}
@@ -17,15 +17,17 @@ BuildRequires: cmake >= 3.16
BuildRequires: extra-cmake-modules >= 6.0.0
BuildRequires: fdupes
BuildRequires: generic-logos
BuildRequires: libplasma-devel
BuildRequires: plasma5support-devel
BuildRequires: pyproject-rpm-macros
BuildRequires: python3-devel
BuildRequires: python-rpm-macros
BuildRequires: python3dist(pip)
BuildRequires: python3dist(setuptools) >= 61.0
BuildRequires: python3dist(wheel) >= 0.37.1
BuildRequires: qt5-qtbase-devel
BuildRequires: cmake(KF6KirigamiPlatform)
BuildRequires: cmake(Plasma)
BuildRequires: cmake(Plasma5Support)
BuildRequires: cmake(Qt5Core)
BuildRequires: pkgconfig(ocl-icd)
Requires: qt5-qtbase
Requires: kf6-filesystem >= 6.0.0
Requires: python3-%{name} = %{version}-%{release}
@@ -49,6 +51,7 @@ Python files for KDE Material You Colors.
%prep
%autosetup -p1 -n %{name}-%{version}
sed -iE 's:\"python-magic.*\":\"file-magic\":' pyproject.toml
%build
%pyproject_wheel
@@ -61,7 +64,7 @@ Python files for KDE Material You Colors.
%pyproject_install
DESTDIR="%{buildroot}" %cmake_install
sed -i "1{/^#!\/usr\/bin\/env python3/d}" %{buildroot}%{python3_sitelib}/kde_material_you_colors/main.py
sed -Ei "s:^(#!.*)env (python.*)$:\1python3:" %{buildroot}%{python3_sitelib}/kde_material_you_colors/main.py
%fdupes %{buildroot}%{python3_sitelib}/%{name}/
%terra_appstream