summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Brix Andersen <brix@gentoo.org>2005-03-22 18:52:40 +0000
committerHenrik Brix Andersen <brix@gentoo.org>2005-03-22 18:52:40 +0000
commit91072cf4afb1b6de11b7149d96e0224746088d13 (patch)
tree655a739c4c852298bc95709891854726f2f56bc9 /app-laptop
parentspelling fix (diff)
downloadhistorical-91072cf4afb1b6de11b7149d96e0224746088d13.tar.gz
historical-91072cf4afb1b6de11b7149d96e0224746088d13.tar.bz2
historical-91072cf4afb1b6de11b7149d96e0224746088d13.zip
Initial import, fixes bug #45593. Thank you to all who commented on the bug report.
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'app-laptop')
-rw-r--r--app-laptop/laptop-mode-tools/ChangeLog11
-rw-r--r--app-laptop/laptop-mode-tools/Manifest5
-rw-r--r--app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.041
-rw-r--r--app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.04.init25
-rw-r--r--app-laptop/laptop-mode-tools/laptop-mode-tools-1.04.ebuild74
-rw-r--r--app-laptop/laptop-mode-tools/metadata.xml9
6 files changed, 125 insertions, 0 deletions
diff --git a/app-laptop/laptop-mode-tools/ChangeLog b/app-laptop/laptop-mode-tools/ChangeLog
new file mode 100644
index 000000000000..9ffedf9df8ad
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for app-laptop/laptop-mode-tools
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.1 2005/03/22 18:52:40 brix Exp $
+
+*laptop-mode-tools-1.04 (22 Mar 2005)
+
+ 22 Mar 2005; <brix@gentoo.org> +metadata.xml,
+ +files/laptop-mode-tools-1.04.init, +laptop-mode-tools-1.04.ebuild:
+ Initial import, fixes bug #45593. Thank you to all who commented on the bug
+ report.
+
diff --git a/app-laptop/laptop-mode-tools/Manifest b/app-laptop/laptop-mode-tools/Manifest
new file mode 100644
index 000000000000..b025e61b253a
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/Manifest
@@ -0,0 +1,5 @@
+MD5 2a244615a7cc165f929c64f693076391 laptop-mode-tools-1.04.ebuild 1880
+MD5 d09878758f6e4ed4150841ee757ef50d ChangeLog 473
+MD5 b280eebc74d70d85e664debf1adce2c3 metadata.xml 255
+MD5 01157e9eeb38f22cca5aaa8fc1a448c3 files/laptop-mode-tools-1.04.init 700
+MD5 142ca4fd50b03cccc557a89a2bafc022 files/digest-laptop-mode-tools-1.04 73
diff --git a/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.04 b/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.04
new file mode 100644
index 000000000000..1dbed76c46c5
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.04
@@ -0,0 +1 @@
+MD5 b26fcc4df2b38da17e4f09872a1cfeda laptop-mode-tools_1.04.tar.gz 30908
diff --git a/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.04.init b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.04.init
new file mode 100644
index 000000000000..d05d8e8c94c9
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.04.init
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2005 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-tools-1.04.init,v 1.1 2005/03/22 18:52:40 brix Exp $
+
+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"
+ touch /var/run/laptop-mode-enabled && /usr/sbin/laptop_mode start &> /dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping laptop_mode"
+ /usr/sbin/laptop_mode stop &> /dev/null && rm -f /var/run/laptop-mode-enabled
+ eend $?
+}
diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.04.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.04.ebuild
new file mode 100644
index 000000000000..37da22575e02
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.04.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2005 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.04.ebuild,v 1.1 2005/03/22 18:52:40 brix Exp $
+
+inherit linux-info
+
+MY_P=${PN}_${PV}
+
+DESCRIPTION="Linux kernel laptop_mode user-space utilities"
+
+HOMEPAGE="http://www.xs4all.nl/~bsamwel/laptop_mode/tools/"
+SRC_URI="http://www.xs4all.nl/~bsamwel/laptop_mode/tools/downloads/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+
+IUSE="acpi apm"
+
+DEPEND="acpi? ( sys-power/acpid )
+ apm? ( sys-apps/apmd )"
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ if [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -eq 6 -a ${KV_PATCH} -lt 6 ]; then
+ eerror "${P} requires kernel version 2.6.6 or newer."
+ die "${P} requires kernel version 2.6.6 or newer"
+ elif [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -eq 4 -a ${KV_PATCH} -lt 23 ]; then
+ eerror "${P} requires kernel version 2.4.23 or newer."
+ die "${P} requires kernel version 2.4.23 or newer"
+ fi
+}
+
+src_install() {
+ dosbin usr/sbin/laptop_mode
+
+ insinto /etc/laptop-mode
+ doins etc/laptop-mode/laptop-mode.conf
+
+ newinitd ${FILESDIR}/${P}.init laptop_mode
+
+ doman man/*
+
+ dodoc Documentation/laptop-mode.txt README
+
+ if useq acpi; then
+ insinto /etc/acpi/events/
+ doins etc/acpi/events/*
+
+ exeinto /etc/acpi/actions/
+ doexe etc/acpi/actions/*
+ fi
+
+ if useq apm; then
+ exeinto /etc/apm/event.d/
+ doexe etc/apm/event.d/*
+ fi
+}
+
+pkg_postinst() {
+ if ! useq acpi && ! useq apm; then
+ 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
+}
diff --git a/app-laptop/laptop-mode-tools/metadata.xml b/app-laptop/laptop-mode-tools/metadata.xml
new file mode 100644
index 000000000000..cfbdff13bd61
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>mobile</herd>
+<maintainer>
+ <email>brix@gentoo.org</email>
+ <name>Henrik Brix Andersen</name>
+</maintainer>
+</pkgmetadata>