Original package.
This commit is contained in:
commit
c62c198193
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/idlehack
|
||||
.osc
|
15
_service
Normal file
15
_service
Normal file
@ -0,0 +1,15 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="versionprefix">0.0+git</param>
|
||||
<param name="url">https://github.com/loops/idlehack.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="exclude">.git*</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="changesauthor">mcepl@cepl.eu</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled" />
|
||||
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/loops/idlehack.git</param>
|
||||
<param name="changesrevision">03b91c2a7717d72e9ff5fcd2eca46daae5964a5c</param></service></servicedata>
|
BIN
idlehack-0.0+git.1638710471.03b91c2.tar.gz
Normal file
BIN
idlehack-0.0+git.1638710471.03b91c2.tar.gz
Normal file
Binary file not shown.
9
idlehack.changes
Normal file
9
idlehack.changes
Normal file
@ -0,0 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 6 07:04:01 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Use right macros for user systemd services.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 5 21:21:32 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Initial packaging effort
|
71
idlehack.spec
Normal file
71
idlehack.spec
Normal file
@ -0,0 +1,71 @@
|
||||
#
|
||||
# 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.1638710471.03b91c2
|
||||
Release: 0
|
||||
Summary: Monitor dbus and inhibit swayidle when Firefox or Chromium request it
|
||||
License: ISC
|
||||
URL: https://github.com/loops/idlehack
|
||||
Source0: idlehack-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM order_libs.patch bugno mcepl@suse.com
|
||||
# Fix building
|
||||
Patch0: order_libs.patch
|
||||
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
|
||||
%autosetup -p1
|
||||
|
||||
%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
|
13
order_libs.patch
Normal file
13
order_libs.patch
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,4 +1,4 @@
|
||||
CFLAGS:=$(shell pkg-config --cflags dbus-1) -DHAVE_LIBSYSTEMD -DHAVE_UNISTD_H -DGETTIMEOFDAY_TWO_ARGS -O3
|
||||
LDFLAGS:=$(shell pkg-config --libs dbus-1) $(shell pkg-config --libs libsystemd)
|
||||
-idlehack: idlehack.c blurb.c yarandom.c
|
||||
-
|
||||
+idlehack: idlehack.o blurb.o yarandom.o
|
||||
+ cc -o $@ $? $(LDFLAGS)
|
Loading…
Reference in New Issue
Block a user