Permalink
Browse files

add laptop-mode-tools-1.62

  • Loading branch information...
1 parent 4127613 commit 3b8c4318dd0192e5db537b060ef40c9b9efba3b8 @miramir committed Dec 24, 2012
@@ -0,0 +1,4 @@
+AUX laptop_mode.init-1.4 1190 SHA256 90a18e5c7e4d0b264bb51deb7b92ff25b508a3ddd75dd6c849fdc48c07ce4fda SHA512 47e67d54ed8005a864c017f4ef063c8a17286c6f8a260984fda96392e6461a3f0c5e4f17f8cf2272b072c1545b8f8e99fe45579a81b4d08a99e1eeb46f400fe5 WHIRLPOOL 7a87608d947be301400f2f1a0294a60f21e2cd1b6bed961788f7fc018bf4ac32d69a50e11e735db3cb6c000174ebd78e59f7ac0cd474bef3b803872b6a6665e5
+DIST laptop-mode-tools_1.62.tar.gz 105941 SHA256 d40b3d2fb4dc120b4a427ef7dbddc9dd4d9ea0c475685538d36d3457b39158cd SHA512 3ba2a8db860349c5766f5282ca6f70f3bb780cb44e8674beb7e9c5783e96fc07a144245cc50414fef61b1cd6e08a2096667806792c2853cbcc9c83eb7d796b1a WHIRLPOOL 232115a3a6599241892abcc3f64db8bfa1c897bebbc22c198ce58bcb6bb3dd99aa3fb143c07f69fd6e6099b76da9c494423def0c86c8eeb3b610f9f3e51c0505
+EBUILD laptop-mode-tools-1.62.ebuild 2325 SHA256 d1a017658837ca3815a01ce4e50e1fee2fb8880ccb56e43b0b9b48adea05a4fe SHA512 1b355b8c27749542c220426f9d32e383402ccf66d0479d30abd4e7ebe70109bd84ac4696fc5d98d693055183c4ea437a2a869fc9b4ebf2e326b4f47e2a2d1783 WHIRLPOOL 1cd185542cd6e6f55a8102dab3df447003b1b2566f54ec29a3062e264f8f63bf5c68da29b61a1b0940a38242b5c772088943ecc43ccaffd383e7545715a6f98e
+MISC metadata.xml 307 SHA256 3e0b23d71bfbbc6da3e2c97a285a0e5888d21c637fae42542489fdf843139430 SHA512 88c1fe4f56cda32f814f283091f84a9c28e2734a3a8de1c5e00b8c4172456badb6ac6097e6dde929cd45d0d1dcbab0147a2b08d727aac17e3e25cab85490a3a8 WHIRLPOOL 0512e5310143e54a4cc2d6370a32b5c10fcb093c136c0ebf52ecf03606b0ed36cd0711b6b1a40112b5ea230884f1787e2e9ed15a401f5d8f5ceb4637f7c078c6
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# 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/files/laptop_mode.init-1.4,v 1.4 2012/01/01 14:44:49 hwoarang Exp $
+
+extra_started_commands="reload"
+
+depend() {
+ need localmount
+ use acpid hald
+ after bootmisc
+}
+
+checkconfig() {
+ if [ ! -f /proc/sys/vm/laptop_mode ] ; then
+ eerror "Kernel does not support laptop_mode"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting laptop_mode"
+ # bug #342049 fix
+ # check if dir exists and creates if it doesn't
+ checkpath -q -d -m 755 /var/run/laptop-mode-tools
+ touch /var/run/laptop-mode-tools/enabled
+ /usr/sbin/laptop_mode auto >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping laptop_mode"
+ rm -f /var/run/laptop-mode-tools/enabled
+ /usr/sbin/laptop_mode stop >/dev/null
+ eend $?
+}
+
+reload() {
+ if ! service_started "${SVCNAME}" ; then
+ eerror "${SVCNAME} has not yet been started"
+ return 1
+ fi
+
+ ebegin "Reloading laptop_mode"
+ /usr/sbin/laptop_mode stop >/dev/null
+ rm -f /var/run/laptop-mode-tools/*
+ /usr/sbin/laptop_mode auto force >/dev/null
+ eend $?
+}
+
+# vim: set ts=4 :
@@ -0,0 +1,85 @@
+# 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.6 2012/06/14 14:28:42 xmw 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="net-wireless/wireless-tools
+ 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
+ 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
+}
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+<use>
+ <flag name='scsi'>Adds dependency on sdparm to control non-SATA SCSI drivers</flag>
+</use>
+</pkgmetadata>

0 comments on commit 3b8c431

Please sign in to comment.