diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2010-04-26 12:55:42 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2010-04-26 12:55:42 +0000 |
commit | fba056b84a4028dc116a8960a4c959e8f4995749 (patch) | |
tree | 67f8cb30f52267dc603da494551e82851a0de459 /sys-power | |
parent | old (diff) | |
download | gentoo-2-fba056b84a4028dc116a8960a4c959e8f4995749.tar.gz gentoo-2-fba056b84a4028dc116a8960a4c959e8f4995749.tar.bz2 gentoo-2-fba056b84a4028dc116a8960a4c959e8f4995749.zip |
Version bump wrt #317273 by Tim Harder. Install new powerbtn.sh wrt #253764 by Pacho Ramos.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/acpid/ChangeLog | 9 | ||||
-rw-r--r-- | sys-power/acpid/acpid-2.0.4.ebuild | 52 | ||||
-rwxr-xr-x | sys-power/acpid/files/acpid-2.0.4-default.sh | 59 |
3 files changed, 119 insertions, 1 deletions
diff --git a/sys-power/acpid/ChangeLog b/sys-power/acpid/ChangeLog index 9c873543f3bd..922b0e6dc7ee 100644 --- a/sys-power/acpid/ChangeLog +++ b/sys-power/acpid/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-power/acpid # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/ChangeLog,v 1.45 2010/04/04 16:39:09 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/ChangeLog,v 1.46 2010/04/26 12:55:42 ssuominen Exp $ + +*acpid-2.0.4 (26 Apr 2010) + + 26 Apr 2010; Samuli Suominen <ssuominen@gentoo.org> +acpid-2.0.4.ebuild, + +files/acpid-2.0.4-default.sh: + Version bump wrt #317273 by Tim Harder. Install new powerbtn.sh wrt + #253764 by Pacho Ramos. *acpid-2.0.3-r1 (04 Apr 2010) diff --git a/sys-power/acpid/acpid-2.0.4.ebuild b/sys-power/acpid/acpid-2.0.4.ebuild new file mode 100644 index 000000000000..6bd955302513 --- /dev/null +++ b/sys-power/acpid/acpid-2.0.4.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/acpid-2.0.4.ebuild,v 1.1 2010/04/26 12:55:42 ssuominen Exp $ + +EAPI=2 +inherit eutils toolchain-funcs + +DESCRIPTION="Daemon for Advanced Configuration and Power Interface" +HOMEPAGE="http://tedfelix.com/linux/acpid-netlink.html" +SRC_URI="http://tedfelix.com/linux/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ia64 -ppc ~x86" +IUSE="" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.0.3.patch +} + +src_compile() { + tc-export CC CPP + emake || die + emake -C kacpimon || die +} + +src_install() { + emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install || die + + dobin kacpimon/kacpimon || die + newdoc kacpimon/README README.kacpimon + + exeinto /etc/acpi + newexe "${FILESDIR}"/${PN}-2.0.4-default.sh default.sh || die + doexe samples/powerbtn/powerbtn.sh || die + + insinto /etc/acpi/events + newins "${FILESDIR}"/${PN}-1.0.4-default default || die + + newinitd "${FILESDIR}"/${PN}-2.0.3-init.d acpid || die + newconfd "${FILESDIR}"/${PN}-1.0.6-conf.d acpid || die + + prepalldocs +} + +pkg_postinst() { + echo + elog "You may wish to read the Gentoo Linux Power Management Guide," + elog "which can be found online at:" + elog "http://www.gentoo.org/doc/en/power-management-guide.xml" + echo +} diff --git a/sys-power/acpid/files/acpid-2.0.4-default.sh b/sys-power/acpid/files/acpid-2.0.4-default.sh new file mode 100755 index 000000000000..7f8f6c963e25 --- /dev/null +++ b/sys-power/acpid/files/acpid-2.0.4-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/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 |