71 lines
2.1 KiB
RPMSpec
71 lines
2.1 KiB
RPMSpec
#
|
|
# spec file for package idlehack
|
|
#
|
|
# Copyright (c) 2021 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: idlehack
|
|
Version: 0.0+git.1662393976.fd73c76
|
|
Release: 0
|
|
Summary: Monitor dbus and inhibit swayidle when Firefox or Chromium request it
|
|
License: ISC
|
|
URL: https://github.com/loops/idlehack
|
|
#!RemoteAssetUrl: git+https://github.com/loops/idlehack.git
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: systemd-rpm-macros
|
|
BuildRequires: pkgconfig(dbus-1)
|
|
BuildRequires: pkgconfig(libsystemd) >= 237
|
|
BuildRequires: pkgconfig(x11)
|
|
|
|
%description
|
|
Listen for Firefox/Chromium dbus messages that request screensaver
|
|
inhibit, typically because the user is watching video. Sway doesn't
|
|
currently listen for such messages, so here we create a daemon that
|
|
listens for these messages and then invokes "/bin/swayidle-inhibit"
|
|
which is responsible for temporarily disabling the screen blanking.
|
|
|
|
%prep
|
|
%setup -q -n vis -c -T
|
|
|
|
cp -a %{_sourcedir}/idlehack/* .
|
|
|
|
%build
|
|
%make_build
|
|
|
|
%install
|
|
install -D -m 0755 idlehack %{buildroot}/%{_libexecdir}/idlehack
|
|
install -D -m 0755 swayidle-inhibit %{buildroot}/%{_bindir}/swayidle-inhibit
|
|
install -D -m 0644 idlehack.service %{buildroot}/%{_userunitdir}/idlehack.service
|
|
|
|
%pre
|
|
%systemd_user_pre idlehack.service
|
|
|
|
%post
|
|
%systemd_user_post idlehack.service
|
|
|
|
%preun
|
|
%systemd_user_preun idlehack.service
|
|
|
|
%postun
|
|
%systemd_user_postun idlehack.service
|
|
|
|
%files
|
|
%doc README
|
|
%{_bindir}/swayidle-inhibit
|
|
%{_userunitdir}/idlehack.service
|
|
%{_libexecdir}/idlehack
|
|
|
|
%changelog
|