summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2012-01-01 16:04:34 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2012-01-01 16:04:34 +0000
commit3c826342c7a115f0d88d2eab09051eb394b3907f (patch)
tree64a45e07d70fc1d5dfbeeb38d753672f0460501a /app-laptop
parentalpha/ia64/sh/sparc stable wrt #393807 (diff)
downloadgentoo-2-3c826342c7a115f0d88d2eab09051eb394b3907f.tar.gz
gentoo-2-3c826342c7a115f0d88d2eab09051eb394b3907f.tar.bz2
gentoo-2-3c826342c7a115f0d88d2eab09051eb394b3907f.zip
Non maintainer version bump. Bug #359187. Thanks to Ondrej Grover <ondrej.grover@gmail.com>
(Portage version: 2.2.0_alpha82/cvs/Linux x86_64)
Diffstat (limited to 'app-laptop')
-rw-r--r--app-laptop/laptop-mode-tools/ChangeLog10
-rw-r--r--app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.60-pm-utils-1.4.0.patch20
-rw-r--r--app-laptop/laptop-mode-tools/laptop-mode-tools-1.60.ebuild80
3 files changed, 109 insertions, 1 deletions
diff --git a/app-laptop/laptop-mode-tools/ChangeLog b/app-laptop/laptop-mode-tools/ChangeLog
index fef1c192ca60..8d58b71dd276 100644
--- a/app-laptop/laptop-mode-tools/ChangeLog
+++ b/app-laptop/laptop-mode-tools/ChangeLog
@@ -1,6 +1,14 @@
# 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.56 2012/01/01 14:44:49 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.57 2012/01/01 16:04:34 hwoarang Exp $
+
+*laptop-mode-tools-1.60 (01 Jan 2012)
+
+ 01 Jan 2012; Markos Chandras <hwoarang@gentoo.org>
+ +files/laptop-mode-tools-1.60-pm-utils-1.4.0.patch,
+ +laptop-mode-tools-1.60.ebuild:
+ Non maintainer version bump. Bug #359187. Thanks to Ondrej Grover
+ <ondrej.grover@gmail.com>
*laptop-mode-tools-1.55-r5 (01 Jan 2012)
diff --git a/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.60-pm-utils-1.4.0.patch b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.60-pm-utils-1.4.0.patch
new file mode 100644
index 000000000000..d9f7e3e359cc
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.60-pm-utils-1.4.0.patch
@@ -0,0 +1,20 @@
+Index: laptop-mode-tools_1.60/install.sh
+===================================================================
+--- laptop-mode-tools_1.60.orig/install.sh
++++ laptop-mode-tools_1.60/install.sh
+@@ -180,15 +180,6 @@ if ( ! $INSTALL -m 744 man/* "$DESTDIR/$
+ fi
+
+
+-# Install pm-utils hook only if pm-utils config dir is present, or force the
+-# install if we have a DESTDIR.
+-if [ -n "$DESTDIR" -o -d "$DESTDIR/usr/lib/pm-utils/sleep.d" ] ; then
+- if ( ! $INSTALL -D -m 755 usr/lib/pm-utils/sleep.d/01laptop-mode "$DESTDIR/usr/lib/pm-utils/sleep.d/01laptop-mode" ) ; then
+- echo "$0: Failed to install 01-laptop-mode into /usr/lib/pm-utils/sleep.d. Installation failed."
+- exit 36
+- fi
+-fi
+-
+ if [ -f "$DESTDIR/usr/lib/pm-utils/sleep.d/99laptop-mode" ]; then
+ rm -f $DESTDIR/usr/lib/pm-utils/sleep.d/99laptop-mode;
+ fi
diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.60.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.60.ebuild
new file mode 100644
index 000000000000..3a12dcd900a8
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.60.ebuild
@@ -0,0 +1,80 @@
+# 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.ebuild,v 1.1 2012/01/01 16:04:34 hwoarang Exp $
+
+EAPI=2
+inherit eutils
+
+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
+ acpi? ( sys-power/acpid )
+ apm? ( sys-apps/apmd )
+ bluetooth? ( net-wireless/bluez )
+ scsi? ( sys-apps/sdparm )
+ sys-apps/hdparm"
+DEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ # Patching to avoid !sys-power/pm-utils depend wrt #327443
+ epatch "${FILESDIR}"/${P}-pm-utils-1.4.0.patch
+}
+
+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
+
+ # Commented out to avoid !sys-power/pm-utils depend wrt #327443
+ # exeinto /etc/pm/power.d
+ # newexe "${FILESDIR}"/laptop_mode_tools.pmutils laptop_mode_tools
+}
+
+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 /usr/share/doc/${PF}/laptop-mode.txt.gz for further"
+ ewarn "information."
+ ewarn
+ fi
+}