From d20f5e89e8385b195771441db90246bcac3ac237 Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Mon, 25 Mar 2019 07:51:14 +0000 Subject: [PATCH] sysutils/consolekit2: Make ck-system-* scripts user editable This might be needed when using alternatives to init(8), like sysutils/runit-faster, which do not react well to signals send by shutdown(8)/reboot(8) and where you have to use other commands, like runit-init {0,6}. By updating the ck-system-* scripts to run them instead, we can actually make use of things like the Xfce4 logout dialog or Kodi's shutdown dialog with runit-faster. But to make this permanent across updates the scripts have to be installed as sample files. PR: 236445 Submitted by: tobik Approved by: gnome (maintainer timeout, 14 days) --- sysutils/consolekit2/Makefile | 8 ++++++++ sysutils/consolekit2/pkg-plist | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/sysutils/consolekit2/Makefile b/sysutils/consolekit2/Makefile index e9895cc1d7fe..57f2a4af2d0b 100644 --- a/sysutils/consolekit2/Makefile +++ b/sysutils/consolekit2/Makefile @@ -3,6 +3,7 @@ PORTNAME= consolekit PORTVERSION= 1.2.1 +PORTREVISION= 1 CATEGORIES= sysutils gnome MASTER_SITES= https://github.com/ConsoleKit2/ConsoleKit2/releases/download/${PORTVERSION}/ PKGNAMESUFFIX= 2 @@ -39,4 +40,11 @@ CONFIGURE_ARGS= --with-pid-file=/var/run/${PORTNAME}.pid \ --without-systemdsystemunitdir INSTALL_TARGET= install-strip +post-install: +.for script in ck-system-hibernate ck-system-hybridsleep \ + ck-system-restart ck-system-stop ck-system-suspend + cd ${STAGEDIR}${PREFIX}/lib/ConsoleKit/scripts && \ + ${MV} ${script} ${script}.sample +.endfor + .include diff --git a/sysutils/consolekit2/pkg-plist b/sysutils/consolekit2/pkg-plist index a9fa2b823e3f..110873b5fd6d 100644 --- a/sysutils/consolekit2/pkg-plist +++ b/sysutils/consolekit2/pkg-plist @@ -9,11 +9,11 @@ include/ConsoleKit/ck-connector/ck-connector.h include/ConsoleKit/libconsolekit.h lib/ConsoleKit/scripts/ck-get-x11-display-device lib/ConsoleKit/scripts/ck-get-x11-server-pid -lib/ConsoleKit/scripts/ck-system-hibernate -lib/ConsoleKit/scripts/ck-system-hybridsleep -lib/ConsoleKit/scripts/ck-system-restart -lib/ConsoleKit/scripts/ck-system-stop -lib/ConsoleKit/scripts/ck-system-suspend +@sample lib/ConsoleKit/scripts/ck-system-hibernate.sample +@sample lib/ConsoleKit/scripts/ck-system-hybridsleep.sample +@sample lib/ConsoleKit/scripts/ck-system-restart.sample +@sample lib/ConsoleKit/scripts/ck-system-stop.sample +@sample lib/ConsoleKit/scripts/ck-system-suspend.sample lib/girepository-1.0/libconsolekit-1.0.typelib lib/libck-connector.so lib/libck-connector.so.0