Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kwin-system76-scheduler-integration for KWin 6 #1090

Merged
merged 6 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
%global debug_package %nil

Name: kwin-system76-scheduler-integration
Version: 0.1
Release: 4%?dist
Summary: Notify the System76 Scheduler which app has focus so it can be prioritized
License: MIT
URL: https://github.com/maxiberta/kwin-system76-scheduler-integration
Source0: %url/archive/refs/tags/%version.tar.gz
Source1: system76-scheduler-dbus-proxy.sh
Source2: com.system76.Scheduler.dbusproxy.service
Requires: bash dbus-tools system76-scheduler kde-cli-tools systemd kf5-kconfig-core qt
Name: kwin-system76-scheduler-integration

%global forgeurl https://github.com/maxiberta/%{name}
%global commit 093a269670275feaa240d02c712f1ec8b812fd80
%global date 20240320
%forgemeta

Version: 0.1
Release: 5%?dist
Summary: Notify the System76 Scheduler which app has focus so it can be prioritized
License: MIT
URL: %forgeurl
Source0: %forgesource
Source1: com.system76.Scheduler.dbusproxy.service
Requires: bash dbus-tools system76-scheduler kde-cli-tools systemd kf6-kconfig-core
BuildRequires: systemd-rpm-macros

%description
Expand All @@ -20,32 +25,36 @@ This KWin Script interactively notifies System76 Scheduler which app has focus
via D-Bus, so it is prioritized.

%prep
%autosetup
%forgeautosetup

%build

%install
mkdir -p %buildroot%_datadir/kwin/scripts/kwin-system76-scheduler-integration/
cp -r * %buildroot%_datadir/kwin/scripts/kwin-system76-scheduler-integration/
install -Dm755 %SOURCE1 %buildroot%_libexecdir/system76-scheduler-dbus-proxy.sh
install -Dm644 %SOURCE2 %buildroot%_userunitdir/com.system76.Scheduler.dbusproxy.service
install -Dm644 metadata.desktop %buildroot%_datadir/kservices5/kwin-system76-scheduler-integration.desktop
mkdir -p %buildroot%_datadir/kwin/scripts/%{name}/
mkdir -p %buildroot%_libexecdir/
mkdir -p %buildroot%_userunitdir/

cp -r contents %buildroot%_datadir/kwin/scripts/%{name}/
cp -r metadata.json %buildroot%_datadir/kwin/scripts/%{name}/
cp -r system76-scheduler-dbus-proxy.sh %buildroot%_libexecdir/

install -Dm644 %SOURCE1 %buildroot%_userunitdir/com.system76.Scheduler.dbusproxy.service

%post
%systemd_user_post com.system76.Scheduler.dbusproxy.service


%preun
%systemd_user_preun com.system76.Scheduler.dbusproxy.service

%postun
%systemd_user_postun_with_restart com.system76.Scheduler.dbusproxy.service

%files
%license LICENSE
%doc README.md
%config %_userunitdir/com.system76.Scheduler.dbusproxy.service
%_libexecdir/system76-scheduler-dbus-proxy.sh
%_datadir/kwin/scripts/kwin-system76-scheduler-integration/
%_datadir/kservices5/kwin-system76-scheduler-integration.desktop
%_datadir/kwin/scripts/%{name}/

%changelog
%autochangelog

This file was deleted.

6 changes: 5 additions & 1 deletion anda/misc/kwin-system76-scheduler-integration/update.rhai
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
rpm.version(gh("maxiberta/kwin-system76-scheduler-integration"));
rpm.global("commit", gh("maxiberta/kwin-system76-scheduler-integration"));
if rpm.changed() {
rpm.global("date", date()); // remove if we don't need the `date` macro
rpm.release();
}
Loading