public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-power/acpid/files/, sys-power/acpid/
@ 2015-10-08 13:10 Lars Wendler
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Wendler @ 2015-10-08 13:10 UTC (permalink / raw
  To: gentoo-commits

commit:     fb9cbe7e486b3a1d3ffc1c6e0ac4eff041fc329d
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  8 13:02:55 2015 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Oct  8 13:10:29 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb9cbe7e

sys-power/acpid: Bump to version 2.0.25 (bug #558294).

Fixed kde4 power management detection (bug #515088).
Added mate power manager support (bug #538590).
Fixed documentation URL (bug #534514).

Package-Manager: portage-2.2.22
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-power/acpid/Manifest                           |  1 +
 sys-power/acpid/acpid-2.0.25.ebuild                | 73 ++++++++++++++++++++++
 .../acpid-2.0.25-add_mate-power-manager.patch      | 13 ++++
 sys-power/acpid/files/acpid-2.0.25-kde4.patch      | 13 ++++
 4 files changed, 100 insertions(+)

diff --git a/sys-power/acpid/Manifest b/sys-power/acpid/Manifest
index 937904d..ce0bafd 100644
--- a/sys-power/acpid/Manifest
+++ b/sys-power/acpid/Manifest
@@ -2,3 +2,4 @@ DIST acpid-2.0.20.tar.xz 151380 SHA256 6a1ebaf52c6bef0f3d6da24a364e5f9401004d60e
 DIST acpid-2.0.21.tar.xz 152968 SHA256 c4e67e59888ccb43e6b8f01efb794945356aecdff86155c6a5b0f371d1ff636f SHA512 c449a234f04e8d2e1c7a3eac7e36c020c829e5cd00de3e8716c7645c7e53d8fd4d430f862cb320ed536918fff190b6582f932feff315b0cb117ef89d9fec274e WHIRLPOOL b7162e6f6d00cb2495bb61112e26cfd2c0c27567f35d6329b9f4c953ad74b189ba0141253517b24af447ef3b4352ab00cfeb067e2f779694397d0788bd1edc3f
 DIST acpid-2.0.22.tar.xz 153596 SHA256 3d11454f4283c8f771d8dbd5eb6b5f2bbd9d94d9f77d68bab89e35d98b67ab31 SHA512 ed52d80a17bca082cfe8d14acd4e9f736337f43c3c5c1e90b9fd5c4e8bfc2525dd0992d47230f0cae65e0eac1b2454adb350024f2955e82ffa7125e6eabf4f6a WHIRLPOOL 18acb58b2f454ed15fb024005e2bbb42550b9c283c1a1514cd08c2db8d2daccab2509871c956ea0f528519aa8896748119cc7a972c3d1216600f3fa8353761ac
 DIST acpid-2.0.23.tar.xz 154504 SHA256 4396aaec13510c3a1faa941a15a4b5335b6ae4fbec8438b9249b88c3b66187ee SHA512 b2f01f04a9c5370608016c16ecfbc5b503170c2686e6557ab1463e25d56a3ef1d2093d4701205ec1261564b1073653b404d0ae278c0bd8c8496606be1785963f WHIRLPOOL b9c7d4d64e663ffb9c58d2129b4f599453b4da0111b244269cf89ca50cc2de7ecdbea361825724963ee0b93294cadde12dee06c4816f5b709a23e7d443df0afd
+DIST acpid-2.0.25.tar.xz 154124 SHA256 0b700a8072bec162c512f72cbe419195601ab3e0ffd2138f9bd95ed3097a5c68 SHA512 8a2561549aa05d1dd763a973145b37bedf935df1d73310b09bd52473b51fdc14bbb10da6e4bd1c2086962d92bd12f3a03924cfe75b2d50bf95b50ded9b67b05f WHIRLPOOL 0431f03df75334731ca40310a579eecac87b4023818eb9ca26b2e7152a74417fae9426efc2389688e5456b4d666f6aa191272bf956bfef21f9667f41e476c17a

diff --git a/sys-power/acpid/acpid-2.0.25.ebuild b/sys-power/acpid/acpid-2.0.25.ebuild
new file mode 100644
index 0000000..6563669
--- /dev/null
+++ b/sys-power/acpid/acpid-2.0.25.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info systemd
+
+DESCRIPTION="Daemon for Advanced Configuration and Power Interface"
+HOMEPAGE="http://sourceforge.net/projects/acpid2"
+SRC_URI="mirror://sourceforge/${PN}2/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-apm )"
+DEPEND=">=sys-kernel/linux-headers-3"
+
+pkg_pretend() {
+	local CONFIG_CHECK="~INPUT_EVDEV"
+	local WARNING_INPUT_EVDEV="CONFIG_INPUT_EVDEV is required for ACPI button event support."
+	[[ ${MERGE_TYPE} != buildonly ]] && check_extra_config
+}
+
+pkg_setup() { :; }
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-2.0.25-kde4.patch #515088
+	epatch "${FILESDIR}"/${PN}-2.0.25-add_mate-power-manager.patch #538590
+}
+
+src_configure() {
+	econf --docdir=/usr/share/doc/${PF}
+}
+
+src_install() {
+	emake DESTDIR="${D}" install
+
+	newdoc kacpimon/README README.kacpimon
+	dodoc -r samples
+	rm -f "${D}"/usr/share/doc/${PF}/COPYING || die
+
+	exeinto /etc/acpi
+	newexe "${FILESDIR}"/${PN}-1.0.6-default.sh default.sh
+	exeinto /etc/acpi/actions
+	newexe samples/powerbtn/powerbtn.sh powerbtn.sh
+	insinto /etc/acpi/events
+	newins "${FILESDIR}"/${PN}-1.0.4-default default
+
+	newinitd "${FILESDIR}"/${PN}-2.0.16-init.d ${PN}
+	newconfd "${FILESDIR}"/${PN}-2.0.16-conf.d ${PN}
+
+	systemd_dounit "${FILESDIR}"/systemd/${PN}.{service,socket}
+}
+
+pkg_postinst() {
+	if [[ -z ${REPLACING_VERSIONS} ]]; then
+		elog
+		elog "You may wish to read the Gentoo Linux Power Management Guide,"
+		elog "which can be found online at:"
+		elog "https://wiki.gentoo.org/wiki/Power_management/Guide"
+		elog
+	fi
+
+	# files/systemd/acpid.socket -> ListenStream=/run/acpid.socket
+	mkdir -p "${ROOT%/}"/run
+
+	if ! grep -qs "^tmpfs.*/run " "${ROOT%/}"/proc/mounts ; then
+		echo
+		ewarn "You should reboot the system now to get /run mounted with tmpfs!"
+	fi
+}

diff --git a/sys-power/acpid/files/acpid-2.0.25-add_mate-power-manager.patch b/sys-power/acpid/files/acpid-2.0.25-add_mate-power-manager.patch
new file mode 100644
index 0000000..7061744
--- /dev/null
+++ b/sys-power/acpid/files/acpid-2.0.25-add_mate-power-manager.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/538590
+
+--- acpid-2.0.25/samples/powerbtn/powerbtn.sh
++++ acpid-2.0.25/samples/powerbtn/powerbtn.sh
+@@ -51,7 +51,7 @@
+ getXconsole
+ 
+ # A list of power management system process names.
+-PMS="gnome-power-manager kpowersave xfce4-power-manager"
++PMS="gnome-power-manager kpowersave xfce4-power-manager mate-power-manager"
+ PMS="$PMS guidance-power-manager.py dalston-power-applet"
+ 
+ # If one of those is running or any of several others,

diff --git a/sys-power/acpid/files/acpid-2.0.25-kde4.patch b/sys-power/acpid/files/acpid-2.0.25-kde4.patch
new file mode 100644
index 0000000..1a91bb9
--- /dev/null
+++ b/sys-power/acpid/files/acpid-2.0.25-kde4.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/515088
+
+--- acpid-2.0.25/samples/powerbtn/powerbtn.sh
++++ acpid-2.0.25/samples/powerbtn/powerbtn.sh
+@@ -57,7 +57,7 @@
+ # If one of those is running or any of several others,
+ if pidof x $PMS > /dev/null ||
+ 	( test "$XUSER" != "" && pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop --user $XUSER kded kded loadedModules | grep -q klaptopdaemon) ||
+-	( test "$XUSER" != "" && test -x /usr/bin/qdbus && test -r /proc/$(pidof kded4)/environ && su - $XUSER -c "eval $(echo -n 'export '; cat /proc/$(pidof kded4)/environ |tr '\0' '\n'|grep DBUS_SESSION_BUS_ADDRESS); qdbus org.kde.kded" | grep -q powerdevil) ; then
++	( test "$XUSER" != "" && test -x /usr/bin/qdbus && test -r /proc/$(pgrep -n kded4)/environ && su - $XUSER -c "eval $(echo -n 'export '; cat /proc/$(pgrep -n kded4)/environ |tr '\0' '\n'|grep DBUS_SESSION_BUS_ADDRESS); qdbus org.kde.kded" | grep -q powerdevil) ; then
+ 	# Get out as the power manager that is running will take care of things.
+     exit
+ fi


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-power/acpid/files/, sys-power/acpid/
@ 2022-04-06 23:29 Marek Szuba
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Szuba @ 2022-04-06 23:29 UTC (permalink / raw
  To: gentoo-commits

commit:     925b860332cacf91c6028e2082285ef1a9cb09c0
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  6 22:05:28 2022 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Wed Apr  6 23:29:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=925b8603

sys-power/acpid: add 2.0.33

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 sys-power/acpid/Manifest                     |  1 +
 sys-power/acpid/acpid-2.0.33.ebuild          | 56 ++++++++++++++++++++++++++
 sys-power/acpid/files/acpid-1.0.4-default    | 19 +++++++++
 sys-power/acpid/files/acpid-1.0.6-default.sh | 59 ++++++++++++++++++++++++++++
 sys-power/acpid/files/acpid-2.0.16-conf.d    |  6 +++
 sys-power/acpid/files/acpid-2.0.26-init.d    | 19 +++++++++
 sys-power/acpid/files/acpid.service          | 10 +++++
 sys-power/acpid/files/acpid.socket           |  8 ++++
 8 files changed, 178 insertions(+)

diff --git a/sys-power/acpid/Manifest b/sys-power/acpid/Manifest
index 9b2b11111ae4..8c4bc36725df 100644
--- a/sys-power/acpid/Manifest
+++ b/sys-power/acpid/Manifest
@@ -1,2 +1,3 @@
 DIST acpid-2.0.32.tar.xz 155768 BLAKE2B 829b2f78f497d9c0bbd90d952cadad96beece3070240bee69f2a5cf28903e9e5f969a3bf9000552c63a52c17f8b94285a181f4301449a9b64c573032d9a4d255 SHA512 c7afffdf9818504e1ac03b0ad693a05f772bfd07af9808262b3b6bb82ca4dabe6253c94e6dc59e5be6f0da9e815e8bcf2d3e16f02b23d0248b6bad4509e78be7
+DIST acpid-2.0.33.tar.xz 156580 BLAKE2B 72a0835f3d88f4ccae44016809fdb930977f6b02dae6f74068186a8c850237764a1e8cd69a478e5af42115d5f630a9f91cd77b35b8cf01854e24b7e06bbdd536 SHA512 491a58c62fcad44dc57cbd9294437fbc215c2ec99a030286601cd1956ea504e723e61b11b315983073d66aace1997bc40e6421475f6073298f60b8dcda2add75
 DIST sys-power_acpid_2.0.32-r2_extras.tar.xz 2196 BLAKE2B 0975289f7cff6ce24523246f1daac22149d69c410e07a19a5952457e269fc1f736bd3636c93038f660c411f3085d375250c31dc3de3ac1bc6335a97e1fa3dea3 SHA512 f49cf3f75f5db4ca454d29330ae40461deb1109f076e140188a7560fedd78970572a6c023146c4d33c0778ff65056abcbc66725c000ece8e6861419d02d0c6ca

diff --git a/sys-power/acpid/acpid-2.0.33.ebuild b/sys-power/acpid/acpid-2.0.33.ebuild
new file mode 100644
index 000000000000..ea38f6148a38
--- /dev/null
+++ b/sys-power/acpid/acpid-2.0.33.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-info systemd
+
+DESCRIPTION="Daemon for Advanced Configuration and Power Interface"
+HOMEPAGE="https://sourceforge.net/projects/acpid2/"
+SRC_URI="mirror://sourceforge/${PN}2/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~riscv ~x86"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-apm )"
+DEPEND=">=sys-kernel/linux-headers-3"
+
+pkg_pretend() {
+	local CONFIG_CHECK="~INPUT_EVDEV"
+	local WARNING_INPUT_EVDEV="CONFIG_INPUT_EVDEV is required for ACPI button event support."
+	[[ ${MERGE_TYPE} != buildonly ]] && check_extra_config
+}
+
+pkg_setup() { :; }
+
+src_install() {
+	emake DESTDIR="${D}" install
+
+	newdoc kacpimon/README README.kacpimon
+	dodoc -r samples
+	rm -f "${D}"/usr/share/doc/${PF}/COPYING || die
+
+	exeinto /etc/acpi
+	newexe "${FILESDIR}"/${PN}-1.0.6-default.sh default.sh
+	exeinto /etc/acpi/actions
+	newexe samples/powerbtn/powerbtn.sh powerbtn.sh
+	insinto /etc/acpi/events
+	newins "${FILESDIR}"/${PN}-1.0.4-default default
+
+	newinitd "${FILESDIR}"/${PN}-2.0.26-init.d ${PN}
+	newconfd "${FILESDIR}"/${PN}-2.0.16-conf.d ${PN}
+
+	systemd_dounit "${FILESDIR}"/${PN}.{service,socket}
+}
+
+pkg_postinst() {
+	if [[ -z ${REPLACING_VERSIONS} ]]; then
+		elog
+		elog "You may wish to read the Gentoo Linux Power Management Guide,"
+		elog "which can be found online at:"
+		elog "https://wiki.gentoo.org/wiki/Power_management/Guide"
+		elog
+	fi
+}

diff --git a/sys-power/acpid/files/acpid-1.0.4-default b/sys-power/acpid/files/acpid-1.0.4-default
new file mode 100644
index 000000000000..a07c1827f4e9
--- /dev/null
+++ b/sys-power/acpid/files/acpid-1.0.4-default
@@ -0,0 +1,19 @@
+# /etc/acpi/events/default
+# This is the ACPID default configuration, it takes all
+# events and passes them to /etc/acpi/default.sh for further
+# processing.
+
+# event keeps a regular expression matching the event. To get
+# power events only, just use something like "event=button[ /]power.*"
+# to catch it.
+# action keeps the command to be executed after an event occurs
+# In case of the power event above, your entry may look this way:
+#event=button[ /]power.*
+#action=/sbin/init 0
+
+# Optionally you can specify the placeholder %e. It will pass
+# through the whole kernel event message to the program you've
+# specified.
+
+event=.*
+action=/etc/acpi/default.sh %e

diff --git a/sys-power/acpid/files/acpid-1.0.6-default.sh b/sys-power/acpid/files/acpid-1.0.6-default.sh
new file mode 100644
index 000000000000..8be6f3e1a9f4
--- /dev/null
+++ b/sys-power/acpid/files/acpid-1.0.6-default.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+# /etc/acpi/default.sh
+# Default acpi script that takes an entry for all actions
+
+set $*
+
+group=${1%%/*}
+action=${1#*/}
+device=$2
+id=$3
+value=$4
+
+log_unhandled() {
+	logger "ACPI event unhandled: $*"
+}
+
+case "$group" in
+	button)
+		case "$action" in
+			power)
+				/etc/acpi/actions/powerbtn.sh
+				;;
+
+			# if your laptop doesnt turn on/off the display via hardware
+			# switch and instead just generates an acpi event, you can force
+			# X to turn off the display via dpms.  note you will have to run
+			# 'xhost +local:0' so root can access the X DISPLAY.
+			#lid)
+			#	xset dpms force off
+			#	;;
+
+			*)	log_unhandled $* ;;
+		esac
+		;;
+
+	ac_adapter)
+		case "$value" in
+			# Add code here to handle when the system is unplugged
+			# (maybe change cpu scaling to powersave mode).  For
+			# multicore systems, make sure you set powersave mode
+			# for each core!
+			#*0)
+			#	cpufreq-set -g powersave
+			#	;;
+
+			# Add code here to handle when the system is plugged in
+			# (maybe change cpu scaling to performance mode).  For
+			# multicore systems, make sure you set performance mode
+			# for each core!
+			#*1)
+			#	cpufreq-set -g performance
+			#	;;
+
+			*)	log_unhandled $* ;;
+		esac
+		;;
+
+	*)	log_unhandled $* ;;
+esac

diff --git a/sys-power/acpid/files/acpid-2.0.16-conf.d b/sys-power/acpid/files/acpid-2.0.16-conf.d
new file mode 100644
index 000000000000..9aadb4cd814a
--- /dev/null
+++ b/sys-power/acpid/files/acpid-2.0.16-conf.d
@@ -0,0 +1,6 @@
+# /etc/conf.d/acpid: config file for /etc/init.d/acpid
+
+# Options to pass to the acpid daemon.
+# See the acpid(8) man page for more info.
+
+ACPID_ARGS=""

diff --git a/sys-power/acpid/files/acpid-2.0.26-init.d b/sys-power/acpid/files/acpid-2.0.26-init.d
new file mode 100644
index 000000000000..f8076d43b0ab
--- /dev/null
+++ b/sys-power/acpid/files/acpid-2.0.26-init.d
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+command="/usr/sbin/acpid"
+command_args="${ACPID_ARGS}"
+description="Daemon for Advanced Configuration and Power Interface"
+
+depend() {
+	need localmount
+	use logger
+}
+
+reload() {
+	ebegin "Reloading acpid configuration"
+	start-stop-daemon --exec $command --signal HUP
+	eend $?
+}

diff --git a/sys-power/acpid/files/acpid.service b/sys-power/acpid/files/acpid.service
new file mode 100644
index 000000000000..e4ddacdbead7
--- /dev/null
+++ b/sys-power/acpid/files/acpid.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=ACPI event daemon
+Requires=acpid.socket
+
+[Service]
+ExecStart=/usr/sbin/acpid -f
+
+[Install]
+WantedBy=multi-user.target
+Also=acpid.socket

diff --git a/sys-power/acpid/files/acpid.socket b/sys-power/acpid/files/acpid.socket
new file mode 100644
index 000000000000..1e5365bf1ecb
--- /dev/null
+++ b/sys-power/acpid/files/acpid.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=ACPID Listen Socket
+
+[Socket]
+ListenStream=/run/acpid.socket
+
+[Install]
+WantedBy=sockets.target


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-06 23:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-06 23:29 [gentoo-commits] repo/gentoo:master commit in: sys-power/acpid/files/, sys-power/acpid/ Marek Szuba
  -- strict thread matches above, loose matches on Subject: below --
2015-10-08 13:10 Lars Wendler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox