summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorazazello <gentoo@horizon.ath.cx>2007-02-28 15:07:32 +0000
committerazazello <gentoo@horizon.ath.cx>2007-02-28 15:07:32 +0000
commitf042a5846d33288351e69ab79136ea20240531ec (patch)
tree4dcdb22b2a1181a69c01b78a632911c85b246446 /sys-power
parentnew USE flag for sys-power/acpi-support (diff)
downloadsunrise-reviewed-f042a5846d33288351e69ab79136ea20240531ec.tar.gz
sunrise-reviewed-f042a5846d33288351e69ab79136ea20240531ec.tar.bz2
sunrise-reviewed-f042a5846d33288351e69ab79136ea20240531ec.zip
sys-power/acpi-support: New package: sys-power/acpi-support (port from ubuntu)
svn path=/sunrise/; revision=3102
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/acpi-support/ChangeLog8
-rw-r--r--sys-power/acpi-support/Manifest20
-rw-r--r--sys-power/acpi-support/acpi-support-0.91.ebuild86
-rw-r--r--sys-power/acpi-support/files/acpi-support-0.91-gentoo.patch126
-rw-r--r--sys-power/acpi-support/files/digest-acpi-support-0.913
-rw-r--r--sys-power/acpi-support/metadata.xml5
6 files changed, 248 insertions, 0 deletions
diff --git a/sys-power/acpi-support/ChangeLog b/sys-power/acpi-support/ChangeLog
new file mode 100644
index 000000000..afeb5bef5
--- /dev/null
+++ b/sys-power/acpi-support/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for sys-power/acpi-support
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 28 Feb 2007; AK (gentoo@horizon.ath.cx) +acpi-support-0.91.ebuild,
+ +files/acpi-support-0.91-gentoo.patch, +metadata.xml:
+ New package: sys-power/acpi-support (port from ubuntu)
+
diff --git a/sys-power/acpi-support/Manifest b/sys-power/acpi-support/Manifest
new file mode 100644
index 000000000..2f1bffc29
--- /dev/null
+++ b/sys-power/acpi-support/Manifest
@@ -0,0 +1,20 @@
+AUX acpi-support-0.91-gentoo.patch 3436 RMD160 ae281ea3525a06b1c37c1fe1ae1931212bc0f9f0 SHA1 5cef02fd662ebcaf810f351ad49e1edb1c8d99b2 SHA256 2d6303a518c1f58cdf852706023c9e226ec21906e589e139125080628997f7a6
+MD5 5a9424457ec9bd1a1814e420acd99176 files/acpi-support-0.91-gentoo.patch 3436
+RMD160 ae281ea3525a06b1c37c1fe1ae1931212bc0f9f0 files/acpi-support-0.91-gentoo.patch 3436
+SHA256 2d6303a518c1f58cdf852706023c9e226ec21906e589e139125080628997f7a6 files/acpi-support-0.91-gentoo.patch 3436
+DIST acpi-support_0.91.tar.gz 40745 RMD160 427cb721b42e0db955cb27bcfaaa8bda1c5ecbe6 SHA1 8b61797cdd977df546ddee43c46b1c3cc3f72401 SHA256 4724a162cb63728761da9f2c10d106a63a33c523a335be6dc38bb1fe68173a5a
+EBUILD acpi-support-0.91.ebuild 2698 RMD160 24f1c1e2a6dd12f58916042fd37f3ce2d04816ca SHA1 e46d2b3202d69d51175ac84df6757ded1e89dff1 SHA256 88e704682f7a8168fb15757b6a95472ac8d20a8dc8f8a2df34d0eefdb9556c3f
+MD5 87e8f3fff69ce3c47371222319c1f335 acpi-support-0.91.ebuild 2698
+RMD160 24f1c1e2a6dd12f58916042fd37f3ce2d04816ca acpi-support-0.91.ebuild 2698
+SHA256 88e704682f7a8168fb15757b6a95472ac8d20a8dc8f8a2df34d0eefdb9556c3f acpi-support-0.91.ebuild 2698
+MISC ChangeLog 306 RMD160 beb86110413b19907d6ea516f9d2f4d05f8a3b7a SHA1 ff57dc18d4dcdf23e65907fead9148c327ff192b SHA256 4e9d615078842f7ce37399a0532bb112a7d3487969cd7c98f2777a734f968766
+MD5 1285621f22c41e45c955f3198ae303ad ChangeLog 306
+RMD160 beb86110413b19907d6ea516f9d2f4d05f8a3b7a ChangeLog 306
+SHA256 4e9d615078842f7ce37399a0532bb112a7d3487969cd7c98f2777a734f968766 ChangeLog 306
+MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
+MD5 1e678929a9fec6632e227bdf2262e9a1 metadata.xml 170
+RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 metadata.xml 170
+SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 metadata.xml 170
+MD5 7311b7e4b5cef0cb561fdc455ea55f02 files/digest-acpi-support-0.91 250
+RMD160 8d323b2ef10cb60943bd231b182a9990a5b1d988 files/digest-acpi-support-0.91 250
+SHA256 eb264b6e323631b9f0c61e2e320ad217bafbe6ae678af1dbc053351f6fed5641 files/digest-acpi-support-0.91 250
diff --git a/sys-power/acpi-support/acpi-support-0.91.ebuild b/sys-power/acpi-support/acpi-support-0.91.ebuild
new file mode 100644
index 000000000..d2dbc6609
--- /dev/null
+++ b/sys-power/acpi-support/acpi-support-0.91.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+# sys-power/acpi-support derived from http://packages.ubuntu.com/cgi-bin/search_packages.pl?version=all&keywords=acpi-support
+# Author: azazello (gentoo@horizon.ath.cx)
+# See http://bugs.gentoo.org/show_bug.cgi?id=99446
+
+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 video_cards_radeon"
+
+RESTRICT=mirror
+
+DEPEND=""
+RDEPEND="sys-power/acpid
+ sys-apps/kbd
+ sys-apps/dmidecode
+ sys-apps/vbetool
+ sys-power/powermgmt-base
+ kde? ( =kde-base/kdelibs-3.5* )
+ laptop-mode? ( =app-laptop/laptop-mode-tools )
+ video_cards_radeon? ( app-laptop/radeontool )"
+# sys-power/hibernate-script
+# sys-apps/ethtool
+
+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
+ sed -i 's!/usr/bin/dcop!/usr/kde/3.5/bin/dcop!' ${S}/lib/policy-funcs
+ sed -i 's!finger!who!' ${S}/lib/power-funcs
+
+ epatch ${FILESDIR}/${P}-gentoo.patch
+ # TODO: fix acpi_fakekey, vbesave, integrate hibernate-script, ethtool, resume.d/*-855-resolution-set.sh: . /etc/default/855resolution
+}
+
+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() {
+# [ -e /etc/acpi/actions/startup.d/10-save-dmidecode.sh ] \
+# && /etc/acpi/actions/startup.d/10-save-dmidecode.sh
+ einfo
+ einfo "You may wish to read the Gentoo Linux Power Management Guide,"
+ einfo "which can be found online at:"
+ einfo
+ einfo " http://www.gentoo.org/doc/en/power-management-guide.xml"
+ einfo
+ einfo "The following packages provide additional functionality:"
+ einfo " sys-power/powersave"
+ einfo " sys-power/kpowersave"
+ einfo " app-laptop/laptop-mode-tools"
+ einfo
+ einfo "To initialize power management options for your devices at"
+ einfo "system startup, please run the following:"
+ einfo
+ einfo " rc-update add acpi-support default"
+ einfo
+}
diff --git a/sys-power/acpi-support/files/acpi-support-0.91-gentoo.patch b/sys-power/acpi-support/files/acpi-support-0.91-gentoo.patch
new file mode 100644
index 000000000..aba336085
--- /dev/null
+++ b/sys-power/acpi-support/files/acpi-support-0.91-gentoo.patch
@@ -0,0 +1,126 @@
+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/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/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
+ ;;
+ *)
diff --git a/sys-power/acpi-support/files/digest-acpi-support-0.91 b/sys-power/acpi-support/files/digest-acpi-support-0.91
new file mode 100644
index 000000000..aa238bc34
--- /dev/null
+++ b/sys-power/acpi-support/files/digest-acpi-support-0.91
@@ -0,0 +1,3 @@
+MD5 e8b0f07451b26108010dc7a75d3919fc acpi-support_0.91.tar.gz 40745
+RMD160 427cb721b42e0db955cb27bcfaaa8bda1c5ecbe6 acpi-support_0.91.tar.gz 40745
+SHA256 4724a162cb63728761da9f2c10d106a63a33c523a335be6dc38bb1fe68173a5a acpi-support_0.91.tar.gz 40745
diff --git a/sys-power/acpi-support/metadata.xml b/sys-power/acpi-support/metadata.xml
new file mode 100644
index 000000000..7e3286984
--- /dev/null
+++ b/sys-power/acpi-support/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>maintainer-wanted</herd>
+</pkgmetadata>