+++ /dev/null
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-inherit eutils
-
-DESCRIPTION="Ubuntu scripts and events for acpid, power management, and vendor-specific laptop configuration"
-HOMEPAGE="http://packages.ubuntu.com/feisty/admin/acpi-support"
-SRC_URI="http://archive.ubuntu.com/ubuntu/pool/main/a/acpi-support/acpi-support_${PV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~x86"
-IUSE="kde laptop-mode pcmcia video_cards_radeon"
-
-DEPEND=""
-RDEPEND="sys-power/acpid
- sys-apps/kbd
- sys-apps/dmidecode
- sys-apps/vbetool
- sys-power/powermgmt-base
- x11-apps/xset
- kde? ( =kde-base/kdelibs-3.5* )
- laptop-mode? ( =app-laptop/laptop-mode-tools-1.32 )
- video_cards_radeon? ( app-laptop/radeontool )
- pcmcia? ( >=sys-apps/pcmciautils-013 )"
-
-src_unpack() {
- unpack ${A}
- use video_cards_radeon && sed -i 's/# RADEON_LIGHT=true/RADEON_LIGHT=true/' "${S}/acpi-support"
- sed -i 's!/etc/default/acpi-support!/etc/conf.d/acpi-support!' "${S}"/*.sh "${S}/vbesave"
- epatch "${FILESDIR}/${P}-gentoo.patch"
-}
-
-src_compile() {
- sed -i 's/strip acpi_fakekey//' Makefile
- emake || die "emake failed"
-}
-
-src_install() {
- dobin acpi_fakekey
-
- insinto /usr/share/${PN}
- doins key-constants lib/*
-
- insinto /etc/acpi
- insopts -m755
- doins *.sh
- doins -r *.d events
-
- doconfd ${PN}
- newinitd debian/init.d ${PN}
-
- keepdir /etc/acpi/{local,{resume,battery,events,suspend,start,ac}.d} /var/lib/${PN}
- dodoc README COPYING
-}
-
-pkg_postinst() {
- elog "You may wish to read the Gentoo Linux Power Management Guide,"
- elog "which can be found online at:"
- elog
- elog "http://www.gentoo.org/doc/en/power-management-guide.xml"
- elog
- elog "The following packages provide additional functionality:"
- elog "sys-power/powersave"
- elog "sys-power/kpowersave"
- elog "app-laptop/laptop-mode-tools"
- elog
- elog "To initialize power management options for your devices at"
- elog "system startup, please run the following:"
- elog
- elog "rc-update add acpi-support default"
- elog
- elog "This package will not work until you restart acpid. Please run the following:"
- elog
- elog "/etc/init.d/acpid restart"
-}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
-IUSE="hibernate-script intel-855 kde laptop-mode pcmcia toshiba X video_cards_radeon"
+IUSE="X hibernate-script video_cards_radeon"
DEPEND=""
RDEPEND="sys-power/acpid
sys-apps/ethtool
sys-power/powermgmt-base
hibernate-script? ( sys-power/hibernate-script )
- intel-855? ( sys-apps/855resolution )
- laptop-mode? ( app-laptop/laptop-mode-tools )
- kde? ( =kde-base/kdelibs-3.5* )
- pcmcia? ( >=sys-apps/pcmciautils-013 )
- toshiba? ( app-laptop/toshset )
X? ( x11-apps/xset )
video_cards_radeon? ( app-laptop/radeontool )"
elog "http://www.gentoo.org/doc/en/power-management-guide.xml"
elog
elog "The following packages provide additional functionality:"
- elog "sys-power/powersave"
- elog "sys-power/kpowersave"
+ elog
elog "app-laptop/laptop-mode-tools"
+ elog "app-laptop/toshset"
+ elog "sys-power/kpowersave"
+ elog "sys-power/powersave"
+ elog "sys-apps/855resolution"
+ elog "sys-apps/pcmciautils"
elog
elog "To initialize power management options for your devices at"
elog "system startup, please run the following:"
+++ /dev/null
-diff -ur orig/acpi-support-0.91/debian/init.d work/acpi-support-0.91/debian/init.d
---- orig/acpi-support-0.91/debian/init.d 2006-03-28 11:26:44.000000000 -0500
-+++ work/acpi-support-0.91/debian/init.d 2007-02-28 09:14:59.000000000 -0500
-@@ -1,39 +1,37 @@
--#!/bin/bash
-+#!/sbin/runscript
- # INIT script to check whether we're on batteries, and so start with laptop
- # mode etc enabled.
-
- # BUGS: unless we start *really* late, we have no way of throttling
- # xscreensaver, since it won't be there to command.
--. /usr/share/acpi-support/power-funcs
--
--test -f /lib/lsb/init-functions || exit 1
--. /lib/lsb/init-functions
--
--test -d /var/lib/acpi-support || exit 0
--
--shopt -s nullglob
--
--case "$1" in
-- start)
-- log_begin_msg "Checking battery state..."
-- if [ `echo /proc/acpi/ac_adapter/*` ]; then
-- /etc/acpi/power.sh
-- fi
-- # Source everything in /etc/acpi/start.d/
-- for SCRIPT in /etc/acpi/start.d/*.sh; do
-- . $SCRIPT
-- done
-- log_end_msg 0
-- ;;
-- stop)
-- log_begin_msg "Disabling power management..."
-- if [ `echo /proc/acpi/ac_adapter/*` ]; then
-- /etc/acpi/power.sh stop
-- fi
-- log_end_msg 0
-- ;;
-- *)
-- ;;
--esac
--
-
-+depend() {
-+ need acpid
-+}
-+
-+start() {
-+ ebegin "Starting acpi-support"
-+ . /usr/share/acpi-support/power-funcs
-+
-+ test -d /var/lib/acpi-support || eend 0
-+
-+ shopt -s nullglob
-+
-+ ebegin "Checking battery state..."
-+ if [ `echo /proc/acpi/ac_adapter/*` ]; then
-+ /etc/acpi/power.sh
-+ fi
-+ # Source everything in /etc/acpi/start.d/
-+ for SCRIPT in /etc/acpi/start.d/*.sh; do
-+ . $SCRIPT
-+ done
-+ eend 0
-+}
-+
-+stop() {
-+ ebegin "Disabling power management..."
-+ if [ `echo /proc/acpi/ac_adapter/*` ]; then
-+ /etc/acpi/power.sh stop
-+ fi
-+ eend 0
-+}
-Only in work/acpi-support-0.91/debian: init.d~
-diff -ur orig/acpi-support-0.91/hibernatebtn.sh work/acpi-support-0.91/hibernatebtn.sh
---- orig/acpi-support-0.91/hibernatebtn.sh 2006-02-06 09:54:47.000000000 -0500
-+++ work/acpi-support-0.91/hibernatebtn.sh 2007-02-28 09:43:52.000000000 -0500
-@@ -1,3 +1,3 @@
- #!/bin/bash
--. /usr/share/acpi-support/key-constants
--acpi_fakekey $KEY_SUSPEND
-+
-+. /etc/acpi/hibernate.sh
-diff -ur orig/acpi-support-0.91/lib/policy-funcs work/acpi-support-0.91/lib/policy-funcs
---- orig/acpi-support-0.91/lib/policy-funcs 2006-05-19 16:21:58.000000000 -0400
-+++ work/acpi-support-0.91/lib/policy-funcs 2007-03-06 16:39:26.000000000 -0500
-@@ -1,6 +1,6 @@
- CheckPolicy() {
- if pidof gnome-power-manager kpowersave > /dev/null ||
-- (pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop kded kded loadedModules | grep -q klaptopdaemon) ; then
-+ (pidof dcopserver > /dev/null && test -x /usr/kde/3.5/bin/dcop && /usr/kde/3.5/bin/dcop kded kded loadedModules | grep -q klaptopdaemon) ; then
- echo 0;
- else
- echo 1;
-diff -ur orig/acpi-support-0.91/lib/power-funcs work/acpi-support-0.91/lib/power-funcs
---- orig/acpi-support-0.91/lib/power-funcs 2005-11-29 12:50:02.000000000 -0500
-+++ work/acpi-support-0.91/lib/power-funcs 2007-03-06 16:38:39.000000000 -0500
-@@ -6,9 +6,9 @@
- POWERSTATE="/var/lib/acpi-support/powerstate"
-
- getXuser() {
-- user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'`
-+ user=`who| grep -m1 ":$displaynum " | awk '{print $1}'`
- if [ x"$user" = x"" ]; then
-- user=`finger| grep -m1 ":$displaynum" | awk '{print $1}'`
-+ user=`who| grep -m1 ":$displaynum" | awk '{print $1}'`
- fi
- if [ x"$user" != x"" ]; then
- userhome=`getent passwd $user | cut -d: -f6`
-diff -ur orig/acpi-support-0.91/resume.d/40-infra-red.sh work/acpi-support-0.91/resume.d/40-infra-red.sh
---- orig/acpi-support-0.91/resume.d/40-infra-red.sh 2006-04-21 10:12:54.000000000 -0400
-+++ work/acpi-support-0.91/resume.d/40-infra-red.sh 2007-03-06 16:37:12.000000000 -0500
-@@ -3,7 +3,6 @@
- # Restart IR if necessary
- if [ -f /var/run/irdadev ] && [ x$RESTART_IRDA = xtrue ]; then
- rm /var/run/irdadev;
-- /etc/init.d/irda-setup start;
-- /etc/init.d/irda-utils start;
-+ /etc/init.d/irda start;
- fi;
-
-diff -ur orig/acpi-support-0.91/resume.d/62-ifup.sh work/acpi-support-0.91/resume.d/62-ifup.sh
---- orig/acpi-support-0.91/resume.d/62-ifup.sh 2006-04-21 10:13:34.000000000 -0400
-+++ work/acpi-support-0.91/resume.d/62-ifup.sh 2007-03-06 16:40:59.000000000 -0500
-@@ -3,6 +3,6 @@
- # Bring up the interfaces (this should probably be left up to some policy
- # manager, but at the moment we just bring back whatever we ifdowned)
- for x in $INTERFACES; do
-- ifup $x &
-+ /etc/init.d/net.$x start &
- done
-
-diff -ur orig/acpi-support-0.91/sleepbtn.sh work/acpi-support-0.91/sleepbtn.sh
---- orig/acpi-support-0.91/sleepbtn.sh 2006-02-06 09:55:00.000000000 -0500
-+++ work/acpi-support-0.91/sleepbtn.sh 2007-02-28 09:41:59.000000000 -0500
-@@ -1,3 +1,3 @@
- #!/bin/bash
--. /usr/share/acpi-support/key-constants
--acpi_fakekey $KEY_SLEEP
-+
-+. /etc/acpi/sleep.sh
-diff -ur orig/acpi-support-0.91/suspend.d/50-irda-stop.sh work/acpi-support-0.91/suspend.d/50-irda-stop.sh
---- orig/acpi-support-0.91/suspend.d/50-irda-stop.sh 2006-04-21 11:05:47.000000000 -0400
-+++ work/acpi-support-0.91/suspend.d/50-irda-stop.sh 2007-03-06 16:36:57.000000000 -0500
-@@ -2,7 +2,7 @@
-
- # Stop IRDA if it's running
- if [ -f /var/run/irattach.pid ]; then
-- /etc/init.d/irda-utils stop
-+ /etc/init.d/irda stop
- killall -9 irattach
- fi
-
-diff -ur orig/acpi-support-0.91/suspend.d/55-down-interfaces.sh work/acpi-support-0.91/suspend.d/55-down-interfaces.sh
---- orig/acpi-support-0.91/suspend.d/55-down-interfaces.sh 2006-05-16 07:57:43.000000000 -0400
-+++ work/acpi-support-0.91/suspend.d/55-down-interfaces.sh 2007-03-06 16:40:01.000000000 -0500
-@@ -10,7 +10,7 @@
-
- # And shut them down
- for x in $INTERFACES; do
-- ifdown $x;
-+ /etc/init.d/net.$x stop;
- ifconfig $x down;
- done
-
-diff -ur orig/acpi-support-0.91/vbesave work/acpi-support-0.91/vbesave
---- orig/acpi-support-0.91/vbesave 2006-05-03 16:31:51.000000000 -0400
-+++ work/acpi-support-0.91/vbesave 2007-02-28 09:17:44.000000000 -0500
-@@ -3,8 +3,6 @@
- test -x /usr/sbin/vbetool || exit 0
- set -e
-
--. /lib/lsb/init-functions
--
- test -f /etc/default/rcS && . /etc/default/rcS
- test -f /etc/default/acpi-support && . /etc/default/acpi-support
- test -f /usr/share/acpi-support/device-funcs && . /usr/share/acpi-support/device-funcs
-@@ -20,20 +18,16 @@
- fi
-
- DeviceConfig
-- log_begin_msg "Saving VESA state..."
- if [ "$SAVE_VBE_STATE" = "true" ]; then
- if [ "$VERBOSE" = no ]; then
- if ! vbetool vbestate save > $VBESTATE 2>/dev/null; then
-- log_end_msg $?
- exit 1
- fi
- else
- if ! vbetool vbestate save > $VBESTATE ; then
-- log_end_msg $?
- exit 1
- fi
- fi
-- log_end_msg 0
- fi
- ;;
- *)