File plasma-panel-colorizer.spec of Package plasma-panel-colorizer
#
# spec file for package plasma-panel-colorizer
#
# 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/
#
%global kf6_version 6.0.0
%define pythons python3
%if 0%{?fedora}
%global debug_package %{nil}
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%endif
Name: plasma-panel-colorizer
Version: 5.7.0
Release: 0%{?dist}
Summary: Widget to bring customization features to the default Plasma panel
License: GPL-3.0-only
URL: https://github.com/luisbocanegra/%{name}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: cmake >= 3.16
BuildRequires: extra-cmake-modules >= %{kf6_version}
BuildRequires: cmake(Plasma)
%if 0%{?fedora}
BuildRequires: generic-logos
%endif
BuildRequires: python-rpm-macros
BuildRequires: %{python_module gobject}
BuildRequires: pkgconfig(dbus-python)
Requires: spectacle
ExclusiveArch: x86_64
%description
Fully-featured widget to bring Latte-Dock and WM status bar customization features to the default Plasma panel
%prep
%autosetup -p1 -n %{name}-%{version}
%build
%cmake -DINSTALL_PLASMOID=ON -DBUILD_PLUGIN=ON -S %{_builddir}/%{name}-%{version}
%cmake_build
%install
%cmake_install
sed -Ei "s:^(#!.*)env (python.*)$:\1python3:" %{buildroot}%{_datadir}/plasma/plasmoids/luisbocanegra.panel.colorizer/contents/ui/tools/service.py
sed -Ei "s:^(#!.*)env (bash)$:\1\2:" %{buildroot}%{_datadir}/plasma/plasmoids/luisbocanegra.panel.colorizer/contents/ui/tools/list_presets.sh
sed -Ei "s:^(#!.*)env (bash)$:\1\2:" %{buildroot}%{_datadir}/plasma/plasmoids/luisbocanegra.panel.colorizer/contents/ui/tools/gdbus_get_signal.sh
chmod +x %{buildroot}%{_datadir}/plasma/plasmoids/luisbocanegra.panel.colorizer/contents/ui/tools/service.py
chmod +x %{buildroot}%{_datadir}/plasma/plasmoids/luisbocanegra.panel.colorizer/contents/ui/tools/list_presets.sh
chmod +x %{buildroot}%{_datadir}/plasma/plasmoids/luisbocanegra.panel.colorizer/contents/ui/tools/gdbus_get_signal.sh
%files
%doc README.md
%license LICENSE
%{_datadir}/plasma/plasmoids/*
%dir %{_libdir}/qt6/qml/org
%dir %{_libdir}/qt6/qml/org/kde
%dir %{_libdir}/qt6/qml/org/kde/plasma
%dir %{_libdir}/qt6/qml/org/kde/plasma/panelcolorizer
%{_libdir}/qt6/qml/org/kde/plasma/panelcolorizer/
%if (0%{?fedora} && 0%{?fedora} < 43) || (0%{?suse_version} && 0%{?suse_version} < 1699)
%{_datadir}/metainfo/*
%endif
%changelog