acpid: bumpy

This commit is contained in:
Rick Farina (Zero_Chaos) 2016-10-14 10:11:02 -04:00
parent 62a4c42c02
commit fb9df8c47e
No known key found for this signature in database
GPG key ID: A5DD1427DD11F94A
5 changed files with 120 additions and 0 deletions

View file

@ -1 +1,2 @@
DIST acpid-2.0.23.tar.xz 154504 SHA256 4396aaec13510c3a1faa941a15a4b5335b6ae4fbec8438b9249b88c3b66187ee SHA512 b2f01f04a9c5370608016c16ecfbc5b503170c2686e6557ab1463e25d56a3ef1d2093d4701205ec1261564b1073653b404d0ae278c0bd8c8496606be1785963f WHIRLPOOL b9c7d4d64e663ffb9c58d2129b4f599453b4da0111b244269cf89ca50cc2de7ecdbea361825724963ee0b93294cadde12dee06c4816f5b709a23e7d443df0afd
DIST acpid-2.0.27.tar.xz 155012 SHA256 820c223e53cc11d9d7229fb1ffc2c2205f1054082c80f83f5a4ec4df16d3a616 SHA512 0633f494b7f8cfd362f8baad9c69508acb650ea6545a59e6ec572aef610244341ea851084c737ede4bfcf8822431ac01e4b90f5e505cb838683296749307c22f WHIRLPOOL 9698daa35db7cc63b5fce1cdd310f9b3019b91e89793cfd565aa146e8f26856ad9b4e198117280bf6a2d06f1425926ade7127b027af3e3475256b2c4ab5f5b44

View file

@ -0,0 +1,73 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
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 ~ia64 x86"
IUSE="pentoo 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() { :; }
PATCHES=(
"${FILESDIR}"/${PN}-2.0.25-kde4.patch #515088
"${FILESDIR}"/${PN}-2.0.25-add_mate-power-manager.patch #538590
)
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
if use pentoo; then
newexe "${FILESDIR}"/${PN}-pentoo-1.0.6-default.sh default.sh
else
newexe "${FILESDIR}"/${PN}-1.0.6-default.sh default.sh
fi
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}"/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
}

View file

@ -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,

View file

@ -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

View file

@ -0,0 +1,20 @@
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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 $?
}