1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/laptop-mode-tools-1.47-r1.ebuild,v 1.1 2009/03/17 02:16:16 dirtyepic Exp $
9 DESCRIPTION
="Linux kernel laptop_mode user-space utilities"
10 HOMEPAGE
="http://www.samwel.tk/laptop_mode/"
11 SRC_URI
="http://www.samwel.tk/laptop_mode/tools/downloads/${MY_P}.tar.gz"
15 KEYWORDS
="~amd64 ~ppc ~x86"
17 IUSE
="acpi apm bluetooth hal scsi"
19 DEPEND
="sys-apps/hdparm"
21 RDEPEND
="sys-apps/ethtool
22 acpi? ( sys-power/acpid )
23 apm? ( sys-apps/apmd )
27 net-wireless/bluez-utils
31 scsi? ( sys-apps/sdparm )"
33 S
="${WORKDIR}/${MY_P}"
46 MAN_D
="/usr/share/man" \
48 APM
="$(use apm && echo force || echo disabled)" \
49 ACPI
="$(use acpi && echo force || echo disabled)" \
50 PMU
="$(false && echo force || echo disabled)" \
51 .
/install.sh || die
"Install failed."
53 dodoc Documentation
/laptop-mode.txt README
54 newinitd
"${FILESDIR}"/laptop_mode.init-1.4 laptop_mode
56 exeinto
/etc
/pm
/power.d
57 newexe
"${FILESDIR}"/laptop_mode_tools.pmutils laptop_mode_tools
61 if ! use acpi
&& ! use apm
; then
63 ewarn
"Without USE=\"acpi\" or USE=\"apm\" ${PN} can not"
64 ewarn
"automatically disable laptop_mode on low battery."
66 ewarn
"This means you can lose up to 10 minutes of work if running"
67 ewarn
"out of battery while laptop_mode is enabled."
69 ewarn
"Please see /usr/share/doc/${PF}/laptop-mode.txt.gz for further"