summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-01-16 19:14:16 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-01-16 19:14:16 +0000
commit5c9e996bb93c79c7b51abb9bc829d2af65fd18a4 (patch)
tree9c9094e43b4eab91a72bc144c5aef73676d417af /app-laptop
parentMigrate to cdrom.eclass, bug 398809. (diff)
downloadgentoo-2-5c9e996bb93c79c7b51abb9bc829d2af65fd18a4.tar.gz
gentoo-2-5c9e996bb93c79c7b51abb9bc829d2af65fd18a4.tar.bz2
gentoo-2-5c9e996bb93c79c7b51abb9bc829d2af65fd18a4.zip
Stop using -pm-utils-1.4.0.patch and install file containing HOOK_BLACKLIST="00powersave" to /etc/pm/config.d instead wrt #327443 and #396703 by Ondrej Grover. Install 99-laptop-mode.rules to /lib/udev/rules.d instead of /etc/udev/rules.d.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'app-laptop')
-rw-r--r--app-laptop/laptop-mode-tools/ChangeLog11
-rw-r--r--app-laptop/laptop-mode-tools/laptop-mode-tools-1.60-r1.ebuild84
2 files changed, 94 insertions, 1 deletions
diff --git a/app-laptop/laptop-mode-tools/ChangeLog b/app-laptop/laptop-mode-tools/ChangeLog
index 8d58b71dd276..0b1bbacc0741 100644
--- a/app-laptop/laptop-mode-tools/ChangeLog
+++ b/app-laptop/laptop-mode-tools/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-laptop/laptop-mode-tools
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.57 2012/01/01 16:04:34 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.58 2012/01/16 19:14:16 ssuominen Exp $
+
+*laptop-mode-tools-1.60-r1 (16 Jan 2012)
+
+ 16 Jan 2012; Samuli Suominen <ssuominen@gentoo.org>
+ +laptop-mode-tools-1.60-r1.ebuild:
+ Stop using -pm-utils-1.4.0.patch and install file containing
+ HOOK_BLACKLIST="00powersave" to /etc/pm/config.d instead wrt #327443 and
+ #396703 by Ondrej Grover. Install 99-laptop-mode.rules to /lib/udev/rules.d
+ instead of /etc/udev/rules.d.
*laptop-mode-tools-1.60 (01 Jan 2012)
diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.60-r1.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.60-r1.ebuild
new file mode 100644
index 000000000000..a47344d4bf09
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.60-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/laptop-mode-tools-1.60-r1.ebuild,v 1.1 2012/01/16 19:14:16 ssuominen Exp $
+
+EAPI=4
+
+MY_P=${PN}_${PV}
+
+DESCRIPTION="Linux kernel laptop_mode user-space utilities"
+HOMEPAGE="http://www.samwel.tk/laptop_mode/"
+SRC_URI="http://www.samwel.tk/laptop_mode/tools/downloads/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="acpi apm bluetooth scsi"
+
+RDEPEND="sys-apps/ethtool
+ sys-apps/hdparm
+ acpi? ( sys-power/acpid )
+ apm? ( sys-apps/apmd )
+ bluetooth? ( net-wireless/bluez )
+ scsi? ( sys-apps/sdparm )"
+DEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ # Install 99-laptop-mode.rules to rules.d directory in /lib instead of /etc
+ sed -i -e '/udev/s:/etc:/lib:' install.sh || die
+
+ # This should avoid conflict with pm-powersave wrt #327443 and #396703
+ cat <<-EOF > "${T}"/${PN}
+ HOOK_BLACKLIST="00powersave"
+ EOF
+}
+
+src_compile() { :; }
+
+src_install() {
+ DESTDIR="${D}" \
+ INIT_D="none" \
+ MAN_D="/usr/share/man" \
+ ACPI="$(use acpi && echo force || echo disabled)" \
+ PMU="$(false && echo force || echo disabled)" \
+ APM="$(use apm && echo force || echo disabled)" \
+ ./install.sh || die
+
+ dodoc Documentation/*.txt README || die
+ newinitd "${FILESDIR}"/laptop_mode.init-1.4 laptop_mode
+
+ # See src_prepare()
+ insinto /etc/pm/config.d
+ doins "${T}"/${PN}
+}
+
+pkg_postinst() {
+ if use acpi || use apm; then
+ if use acpi; then
+ daemon_name="acpid"
+ elif use apm; then
+ deamon_name="apmd"
+ fi
+ ewarn
+ ewarn "To enable automatic power state event handling,"
+ ewarn "e.g. enabling laptop_mode after unplugging the battery,"
+ ewarn "both laptop_mode and the ${daemon_name} daemon"
+ ewarn "must be added to a runlevel,"
+ ewarn " rc-update add laptop_mode default"
+ ewarn " rc-update add ${daemon_name} default"
+ ewarn
+ else
+ ewarn
+ ewarn "Without USE=\"acpi\" or USE=\"apm\" ${PN} can not"
+ ewarn "automatically disable laptop_mode on low battery."
+ ewarn
+ ewarn "This means you can lose up to 10 minutes of work if running"
+ ewarn "out of battery while laptop_mode is enabled."
+ ewarn
+ ewarn "Please see laptop-mode.txt in /usr/share/doc/${PF} for further"
+ ewarn "information."
+ ewarn
+ fi
+}