File slimbookintelcontroller.spec of Package slimbookintelcontroller
#
# spec file for package slimbookintelcontroller
#
# Copyright (c) 2023 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: slimbookintelcontroller
Version: 1689318489.b9b8695
Release: 0
Summary: Battery optimization application for portable devices
BuildArch: noarch
License: GPL-3.0
Group: System/Management
URL: https://github.com/Slimbook-Team/slimbookintelcontroller
Source0: %{name}-%{version}.tar.xz
Patch0: %{name}-subcommand.patch
BuildRequires: fdupes
BuildRequires: python3-base
BuildRequires: python3-gobject
BuildRequires: python3-dbus-python-devel
BuildRequires: polkit
BuildRequires: update-desktop-files
BuildRequires: hicolor-icon-theme
# systray icon embedding
Recommends: typelib(AyatanaAppIndicator3)
%description
Slimbook Intel Controller works by setting your CPU TDP value. That is,
the amount of power measured in watts that you CPU is allowed to draw to
save battery or to improve the overall performance under heavy workloads
like rendering jobs or serious number crunching on large spreadsheets.
Increasing the TDP allows the CPU to use its boost frequency more often
or even permanently on some scenarios.
Use this software with caution as the heat output will increase
dramatically on the higher performance settings, we can't guarantee that
all INTEL CPU's will behave the same way, so your mileage may vary.
Slimbook Intel Controller is designed with mobile intel pocessors in mind.
If you want to try the software in any other CPU, you can add it to the
configuration file
/home/(username)/.config/slimboookintelcontroller/slimbookintelcontroller.conf
NOTE: After installing this program, run
"python3 /usr/share/slimbookintelcontroller/src/configuration/check_config.py"
to initially create the aforementioned default configuration file.
NOTE: Secureboot enabled does not allow kernel to manage CPU parameters.
%prep
%autosetup -p1
%build
%install
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
mkdir -p %{buildroot}/usr/lib/systemd/system-sleep/
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_datadir}/polkit-1/actions/
mkdir -p %{buildroot}%{_udevrulesdir}
mkdir %{buildroot}%{_datadir}/%{name}/images
mkdir %{buildroot}%{_datadir}/%{name}/src
install -m 755 bin/* %{buildroot}%{_bindir}
install -m 755 post-suspension/* %{buildroot}/usr/lib/systemd/system-sleep/
cp -r src/images/* %{buildroot}%{_datadir}/%{name}/images/
install src/images/%{name}.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
chmod 755 src/*.py
chmod 644 src/utils.py
cp -r src/* %{buildroot}%{_datadir}/%{name}/src/
install -m 644 policykit/* %{buildroot}%{_datadir}/polkit-1/actions/
install -m 644 udev-rules/* %{buildroot}%{_udevrulesdir}/
%suse_update_desktop_file -i %{name} Utility System Settings
%fdupes %{buildroot}
%files
%license LICENSE
%doc README.md
%{_bindir}/*
%dir /usr/lib/systemd/system-sleep
/usr/lib/systemd/system-sleep/*
%{_udevrulesdir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_datadir}/polkit-1/actions/*
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/scalable/apps/*
%changelog