summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter van den Abeele <pvdabeel@gentoo.org>2002-04-27 10:34:28 +0000
committerPieter van den Abeele <pvdabeel@gentoo.org>2002-04-27 10:34:28 +0000
commit5acad5a2440f55c0dc08816043f4f2d8ebffdc9e (patch)
treeb6057a79d14632fc4573f9f0721f2c4ab7a52173 /sys-apps
parentcleanup (diff)
downloadgentoo-2-5acad5a2440f55c0dc08816043f4f2d8ebffdc9e.tar.gz
gentoo-2-5acad5a2440f55c0dc08816043f4f2d8ebffdc9e.tar.bz2
gentoo-2-5acad5a2440f55c0dc08816043f4f2d8ebffdc9e.zip
PPC sys-apps merge
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/mac-fdisk/Changelog9
-rw-r--r--sys-apps/mac-fdisk/files/digest-mac-fdisk-0.12
-rw-r--r--sys-apps/mac-fdisk/mac-fdisk-0.1.ebuild47
-rw-r--r--sys-apps/pmud/ChangeLog11
-rw-r--r--sys-apps/pmud/files/digest-pmud-0.10.11
-rw-r--r--sys-apps/pmud/files/pmud-file-locations.patch13
-rw-r--r--sys-apps/pmud/files/pmud.start23
-rw-r--r--sys-apps/pmud/files/power.conf31
-rw-r--r--sys-apps/pmud/files/pwrctl297
-rw-r--r--sys-apps/pmud/files/pwrctl-local88
-rw-r--r--sys-apps/pmud/pmud-0.10.1.ebuild41
11 files changed, 563 insertions, 0 deletions
diff --git a/sys-apps/mac-fdisk/Changelog b/sys-apps/mac-fdisk/Changelog
new file mode 100644
index 000000000000..eb6a18511436
--- /dev/null
+++ b/sys-apps/mac-fdisk/Changelog
@@ -0,0 +1,9 @@
+# ChangeLog for sys-apps/mac-fdisk
+# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
+# $Id: Changelog,v 1.1 2002/04/27 10:31:17 pvdabeel Exp $
+
+*mac-fdisk-0.1 (Sun Mar 17 23:27:28 CST 2002)
+
+Sun Mar 17 23:29:06 CST 2002; Kain <kain@kain.org> all:
+
+ This is an initial .ebuild for mac-fdisk 0.1 for ppc machines.
diff --git a/sys-apps/mac-fdisk/files/digest-mac-fdisk-0.1 b/sys-apps/mac-fdisk/files/digest-mac-fdisk-0.1
new file mode 100644
index 000000000000..2e7306ce3a7f
--- /dev/null
+++ b/sys-apps/mac-fdisk/files/digest-mac-fdisk-0.1
@@ -0,0 +1,2 @@
+MD5 5dea1f9f8d44fe89c00322c315633443 mac-fdisk_0.1-8.diff.gz 17541
+MD5 24476329fe86ef6ccf222e233e2a99f1 mac-fdisk_0.1.orig.tar.gz 55817
diff --git a/sys-apps/mac-fdisk/mac-fdisk-0.1.ebuild b/sys-apps/mac-fdisk/mac-fdisk-0.1.ebuild
new file mode 100644
index 000000000000..6d5d62b91a60
--- /dev/null
+++ b/sys-apps/mac-fdisk/mac-fdisk-0.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Kain X <kain@kain.org>
+# $Id: mac-fdisk-0.1.ebuild,v 1.1 2002/04/27 10:31:17 pvdabeel Exp $
+
+S=${WORKDIR}/${P}
+DEBRV=8
+DESCRIPTION="Mac/PowerMac disk partitinoing utility"
+SRC_URI="http://http.us.debian.org/debian/pool/main/m/mac-fdisk/mac-fdisk_${PV}.orig.tar.gz
+ http://http.us.debian.org/debian/pool/main/m/mac-fdisk/mac-fdisk_${PV}-${DEBRV}.diff.gz"
+#HOMEPAGE=""
+DEPEND="virtual/glibc"
+
+src_unpack() {
+ cd ${WORKDIR}
+ unpack mac-fdisk_${PV}.orig.tar.gz
+ mv mac-fdisk-${PV}.orig ${P}
+ cd ${S}
+ cat ${DISTDIR}/mac-fdisk_${PV}-${DEBRV}.diff.gz | gzip -dc | patch -p1 || die
+ cd ${WORKDIR}
+ chown -R 0.0 *
+ chmod -R a+r-w+X,u+w *
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install () {
+ mv pdisk.8 pdisk.8.in
+ ln mac-fdisk.8.in mac-fdisk.8 || die
+ ln pmac-fdisk.8.in pmac-fdisk.8 || die
+ ln pdisk mac-fdisk || die
+ ln fdisk pmac-fdisk || die
+
+ into /
+
+ dosbin mac-fdisk
+ dosbin pmac-fdisk
+
+ into /usr
+
+ doman mac-fdisk.8
+ doman pmac-fdisk.8
+ dodoc README
+ dodoc HISTORY
+}
diff --git a/sys-apps/pmud/ChangeLog b/sys-apps/pmud/ChangeLog
new file mode 100644
index 000000000000..addb7d2369b7
--- /dev/null
+++ b/sys-apps/pmud/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sys-apps/pmud
+# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
+# $Id: ChangeLog,v 1.1 2002/04/27 10:34:28 pvdabeel Exp $
+
+*pmud-0.10.1 <kain@kain.org> ChangeLog:
+
+ Sat, 13 Apr 2002 23:04:14 -0500; kain <kain@kain.org> pmud/*:
+ Import of PMUD to gentoo. This works (kindof) on my Mac.
+ On my TiBook, X is screwed if you are using the radeonfb driver and
+ not a fbdev setup if you use this. :( Could someone try this with a
+ normal XFree 4.2.0/TiBook G4 and tell me what they get?
diff --git a/sys-apps/pmud/files/digest-pmud-0.10.1 b/sys-apps/pmud/files/digest-pmud-0.10.1
new file mode 100644
index 000000000000..777c71bda40a
--- /dev/null
+++ b/sys-apps/pmud/files/digest-pmud-0.10.1
@@ -0,0 +1 @@
+MD5 1bdc546199cd7e745c2cf7f560a52198 pmud-0.10.1.tar.gz 68417
diff --git a/sys-apps/pmud/files/pmud-file-locations.patch b/sys-apps/pmud/files/pmud-file-locations.patch
new file mode 100644
index 000000000000..748deae69919
--- /dev/null
+++ b/sys-apps/pmud/files/pmud-file-locations.patch
@@ -0,0 +1,13 @@
+--- pmud-0.10.1/pmud.8~ 2001-12-15 16:52:40.000000000 -0600
++++ pmud-0.10.1/pmud.8 2002-04-13 19:26:00.000000000 -0500
+@@ -160,8 +160,8 @@
+ /etc/power/pwrctl-local
+ /etc/power/levels
+ /etc/powerstatus
+-/etc/rc.d/init.d/pmud
+-/etc/sysconfig/power
++/etc/init.d/pmud
++/etc/power.conf
+ .fi
+ .Sh AUTHORS
+ initial pmud package by Paul Mackerras and initial manual and changes to
diff --git a/sys-apps/pmud/files/pmud.start b/sys-apps/pmud/files/pmud.start
new file mode 100644
index 000000000000..211a06a3b534
--- /dev/null
+++ b/sys-apps/pmud/files/pmud.start
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# /space/gentoo/cvsroot/gentoo-x86/net-nds/portmap/files/portmap.rc6,v 1.3 2001/12/29 00:22:51 azarah Exp
+
+depend() {
+ need bootmisc
+ need net.lo
+}
+
+[ -f /etc/power.conf ] && . /etc/power.conf
+
+start() {
+ ebegin "Starting PMUD"
+ start-stop-daemon --start --quiet --exec /sbin/pmud -- $PMUD_FLAGS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PMUD"
+ start-stop-daemon --stop --quiet --exec /sbin/pmud
+ eend $?
+}
diff --git a/sys-apps/pmud/files/power.conf b/sys-apps/pmud/files/power.conf
new file mode 100644
index 000000000000..51ca6f7b9742
--- /dev/null
+++ b/sys-apps/pmud/files/power.conf
@@ -0,0 +1,31 @@
+# -----------------------------------------------------------------------------
+# Specify the pmud start flags here, you can use the following flags:
+# -----------------------------------------------------------------------------
+# -a : enable apmd compatibility mode (fifo /etc/power/apm)
+# -d : enable debugging text; this flag implicitly
+# sets the -n flag to prevent backgrounding.
+# -f <facility>: use <facility> for syslogd(8) messages.
+# -h : this text.
+# -k : do not detect lid close
+# -K : do not detect lid close when on AC\n"
+# -l <seconds> : the numbers of <seconds> power left which
+# is considered to be a critical low level.
+# -m <seconds> : the number of <seconds> a critical low (see
+# the -l flag) power level has to endure in
+# order to enable sleeping|shutdown.
+# -n : do not detach. With this option the daemon
+# will not become a background process.
+# -p <port> : listen on <port> for requestes.
+# -s : send SIGPWR to init(8) on low power level;
+# this does not put the machine to sleep as
+# another SIGPWR needs to be send to init(8)
+# when power is restored.
+# -S : same as -s, but also send SIGPWR on every
+# sleep request or closing of the lid
+# -u : communicate through a AF_UNIX socket.
+# -v : print the version string of pmud.
+#
+# see also pmud(8)
+# -----------------------------------------------------------------------------
+
+PMUD_FLAGS=-a
diff --git a/sys-apps/pmud/files/pwrctl b/sys-apps/pmud/files/pwrctl
new file mode 100644
index 000000000000..6d721d21926f
--- /dev/null
+++ b/sys-apps/pmud/files/pwrctl
@@ -0,0 +1,297 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# $Id: pwrctl,v 1.1 2002/04/27 10:34:28 pvdabeel Exp $
+#
+# This script is invoked by pmud to configure the system for a
+# given power level. The desired level is indicated by the first
+# argument and can take the following values:
+#
+# minimum = minimum power
+# medium = medium power
+# maximum = full power
+# sleep = prepare for sleep
+# wakeup = system woke up after a sleep
+# warning = low battery condition detected, issue a warning to users
+#
+# the second argument gives the current power source, and can take the
+# following values:
+#
+# ac
+# battery
+#
+# This script is invoked when the AC power is connected or disconnected,
+# and also immediately after sleep. If the script /etc/power/pwrctl-local
+# is present and executable, it will be called by this script before the
+# main body of this script is executed. If pwrctl-local returns 1, then
+# the main body of this script is NOT executed, in all other cases the
+# main body of this script will be executed.
+#
+# Note that if you leave pwrctl-local writable by others than root (which
+# should be the owner) you have created a serious security hole!
+#
+# You can edit this file, but it's better to edit /etc/power/pwrctl-local
+# as that file will not be overwritten on upgrades.
+# -----------------------------------------------------------------------------
+# Debian add-on: support (sort of) for Core99 machines (Pismo,...). The
+# Pismo can't sleep right now so it will wake again immediately. We spin
+# down the disk on sleep, turn off backlight power and ignore the wakeup.
+#
+# While things are stabilizing, these commands could be used to put the system
+# into absolute minimum power mode. You can use commands of this sort in
+# /etc/init.d/powerfail if needs be (sample powerfail script is in
+# /usr/share/doc/sysvinit/examples/).
+# fblevel 0
+# [ "`cat /proc/ide/hde/model`" != "(none)" ] && hdparm -f -S 1 -Y /dev/hde
+# hdparm -f -S 1 -Y /dev/hda
+# Use this to switch the display back on if the powerfail status is called
+# off:
+# fblevel 12
+#
+# 01/09/13: Recent 2.4 kernel versions support sleep properly, by all
+# accounts. So shut down only if kernel version is insufficient.
+# Sample code to deal with broken airport drivers moved to pwrctl-local
+# (courtesy Tom Rini).
+#
+# $Log: pwrctl,v $
+# Revision 1.1 2002/04/27 10:34:28 pvdabeel
+# PPC sys-apps merge
+#
+# Revision 1.1 2002/04/14 03:41:30 kain
+# Initial import of PMUD for gentoo-ppc
+#
+# Revision 1.1.1.1 2001/12/07 11:31:53 sleemburg
+# Initial CVS import of the unreleased pmud-0.8 to apmud (new project name
+# because of a name clash at sourceforge.net).
+#
+# Revision 1.6 2000/12/12 08:56:57 stephan
+# support for iBook and Pismo (same as other G3's)
+#
+# Revision 1.5 2000/10/09 14:33:40 stephan
+# wakebay added
+#
+# Revision 1.4 2000/05/11 14:54:45 stephan
+# pmud 0.6 changes
+#
+# Revision 1.3 2000/03/25 21:26:32 stephan
+# pmud-0.5 changes
+#
+# Revision 1.2 2000/03/09 13:01:50 stephan
+# formatting and call to pwrctl-local
+#
+# Revision 1.1 2000/01/06 13:48:19 stephan
+# Initial revision
+# -----------------------------------------------------------------------------
+logger=/usr/bin/logger
+localfun=/etc/power/pwrctl-local
+
+function do_warn()
+{
+ local msg="Low battery, system will go down..."
+
+ (
+ /usr/X11R6/bin/xmessage -center -timeout 15 "$msg" || \
+ echo "$msg" | /usr/bin/wall
+ ) &
+}
+
+function pwrctl_G3()
+{
+ case "$1" in
+ minimum)
+ # min power, set disk to spin down after 1 minute
+ [ -f /sbin/hdparm ] && hdparm -p -S 12 /dev/hda
+ ;;
+ medium)
+ # medium power, set disk to spin down after 2.5 minutes
+ [ -f /sbin/hdparm ] && hdparm -p -S 30 /dev/hda
+ ;;
+ maximum)
+ case "$2" in
+ ac)
+ # on mains, do not spin down
+ [ -f /sbin/hdparm ] && hdparm -p -S 0 /dev/hda
+ ;;
+ *)
+ # on battery, set disk to spin down after 5 minutes
+ [ -f /sbin/hdparm ] && hdparm -p -S 60 /dev/hda
+ ;;
+ esac
+ ;;
+ warning)
+ do_warn
+ ;;
+ lid-closed)
+ ;;
+ lid-opened)
+ ;;
+ sleep)
+ ;;
+ wakeup)
+ [ -f /proc/sys/dev/cdrom/info ] && {
+ device=$(cat /proc/sys/dev/cdrom/info | (
+ IFS=":"
+ while read var val
+ do
+ [ "$var" = "drive name" ] && {
+ echo $val
+ break
+ }
+ done
+ ))
+ [ ! -z "$device" ] && {
+ /sbin/wakebay /dev/${device}
+ }
+ }
+ ;;
+ *)
+ $logger -p daemon.error -t pwrctl "$0: invalid arg $1"
+ ;;
+ esac
+}
+
+#------------------------------------------------------------------------------
+# This is largely a no-op on iBook or Pismo, as we don't know how to handle
+# the sleep functions yet. Instead, we shut down on the spot.
+#------------------------------------------------------------------------------
+
+function pwrctl_Core99()
+{
+ case "$1" in
+ minimum)
+ # min power, set disk to spin down after 1 minute
+ [ -f /sbin/hdparm ] && hdparm -p -S 12 /dev/hda
+ ;;
+ medium)
+ # medium power, set disk to spin down after 2.5 minutes
+ [ -f /sbin/hdparm ] && hdparm -p -S 30 /dev/hda
+ ;;
+ maximum)
+ case "$2" in
+ ac)
+ # on mains, do not spin down
+ [ -f /sbin/hdparm ] && hdparm -p -S 0 /dev/hda
+ ;;
+ *)
+ # on battery, set disk to spin down after 5 minutes
+ [ -f /sbin/hdparm ] && hdparm -p -S 60 /dev/hda
+ ;;
+ esac
+ ;;
+ warning)
+ do_warn
+ ;;
+ lid-closed)
+ ;;
+ lid-opened)
+ ;;
+ sleep)
+ # We may end up here if someone closed the lid ...
+ # SIGPWR can be sent to init anyway with -s option, do the only
+ # safe thing for now: shut the hell down on 2.2 kernels, or anything
+ # below a known safe 2.4 version.
+ KVER=`uname -r`
+ case "$KVER" in
+ 2.2.*|2.3.*|2.4.[1-7]|2.4.[1-7]-*)
+ $logger -p daemon.error -t pwrctl "$0: insufficient kernel verison - sleep function not implemented, shutting down!"
+ echo "Kernel does not support sleep, shutting down!" | /usr/bin/wall
+ /sbin/shutdown -h now
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ wakeup)
+ # maybe force wakeup of media bay devices?
+ ;;
+ *)
+ $logger -p daemon.error -t pwrctl "$0: invalid arg $1"
+ ;;
+ esac
+}
+
+# -----------------------------------------------------------------------------
+# On the 3400, for minimum power, we put the CPU into nap mode
+# (rather than doze mode) when it is idle. This reduces power
+# consumption but means that DMA is no longer cache coherent.
+# Therefore we have to disable DMA, including the ethernet.
+# We also turn the ethernet off during sleep.
+# -----------------------------------------------------------------------------
+
+function pwrctl_3400()
+{
+ case "$1" in
+ minimum)
+ ifconfig eth0 down
+ [ -f /sbin/hdparm ] && hdparm -d0 -S 12 /dev/hda
+ [ "`cat /proc/ide/hdc/model`" != "(none)" ] && [ -f /sbin/hdparm ] && hdparm -d0 /dev/hdc
+ echo 1 >/proc/sys/kernel/powersave-nap
+ ;;
+ medium)
+ echo 0 >/proc/sys/kernel/powersave-nap
+ [ -f /sbin/hdparm ] && hdparm -d1 -p -S 30 /dev/hda
+ [ "`cat /proc/ide/hdc/model`" != "(none)" ] && [ -f /sbin/hdparm ] && hdparm -d1 /dev/hdc
+ ifconfig eth0 up
+ ;;
+ maximum)
+ echo 0 >/proc/sys/kernel/powersave-nap
+ case "$2" in
+ ac)
+ # on mains, do not spin down
+ [ -f /sbin/hdparm ] && hdparm -d1 -p -S 0 /dev/hda
+ ;;
+ *)
+ # on battery, set disk to spin down after 5 minutes
+ [ -f /sbin/hdparm ] && hdparm -d1 -p -S 60 /dev/hda
+ ;;
+ esac
+ [ "`cat /proc/ide/hdc/model`" != "(none)" ] && [ -f /sbin/hdparm ] && hdparm -d1 /dev/hdc
+ ifconfig eth0 up
+ ;;
+ warning)
+ do_warn
+ ;;
+ sleep)
+ ifconfig eth0 down
+ ;;
+ wakeup)
+ ifconfig eth0 up
+ ;;
+ *)
+ $logger -p daemon.error -t pwrctl "$0: invalid arg $1"
+ ;;
+ esac
+}
+
+# -----------------------------------------------------------------------------
+# main
+# -----------------------------------------------------------------------------
+
+[ -x $localfun ] && {
+ $logger -p daemon.info -t pwrctl "calling $localfun $*"
+
+ $localfun $*
+
+ case $? in
+ 0)
+ $logger -p daemon.debug -t pwrctl "continuing with main"
+ ;;
+ 1)
+ $logger -p daemon.debug -t pwrctl "skipping main"
+ exit 0
+ ;;
+ *)
+ $logger -p daemon.error -t pwrctl "error in $localfun"
+ ;;
+ esac
+}
+
+case "$PMUVERSION" in
+9) pwrctl_3400 $1 $2 ;;
+10|11) pwrctl_G3 $1 $2 ;;
+12) pwrctl_Core99 $1 $2 ;;
+*)
+ $logger -p daemon.error -t pwrctl "no function for PMU $PMUVERSION"
+;;
+esac >>/var/log/pwrctls 2>&1
+
+exit 0
diff --git a/sys-apps/pmud/files/pwrctl-local b/sys-apps/pmud/files/pwrctl-local
new file mode 100644
index 000000000000..3f9df4448410
--- /dev/null
+++ b/sys-apps/pmud/files/pwrctl-local
@@ -0,0 +1,88 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# $Id: pwrctl-local,v 1.1 2002/04/27 10:34:28 pvdabeel Exp $
+#
+# This script is invoked by pwrctl to configure the system for a
+# given power level. The desired level is indicated by the first
+# argument, which can have the following values:
+#
+# minimum = minimum power
+# medium = medium power
+# maximum = full power
+# sleep = prepare for sleep
+# wakeup = system woke up after a sleep
+# warning = low battery condition detected, issue a warning to users
+#
+# the second argument gives the current power source, and can take the
+# following values:
+#
+# ac
+# battery
+#
+#
+# This script can be invoked by pwrctl when it is named /etc/power/pwrctl-local
+# and is executable. Pwrctl is called by pmud on a power event. If this
+# script returns the value 1, then pwrctl will skip it's main body
+#
+# Example usage: use ifdown -a on sleep (and ifup -a on wakeup) to
+# automagically renew DHCP leases. Similar use of iwconfig down/up might be
+# required for Wavelan users with older versions of the kernel.
+#
+# -----------------------------------------------------------------------------
+# $Log: pwrctl-local,v $
+# Revision 1.1 2002/04/27 10:34:28 pvdabeel
+# PPC sys-apps merge
+#
+# Revision 1.1 2002/04/14 03:41:31 kain
+# Initial import of PMUD for gentoo-ppc
+#
+# Revision 1.1.1.1 2001/12/07 11:31:48 sleemburg
+# Initial CVS import of the unreleased pmud-0.8 to apmud (new project name
+# because of a name clash at sourceforge.net).
+#
+# Revision 1.2 2000/03/25 21:26:37 stephan
+# pmud-0.5 changes
+#
+# Revision 1.1 2000/03/09 13:02:18 stephan
+# Initial revision
+#
+# -----------------------------------------------------------------------------
+logger=/usr/bin/logger
+
+# -----------------------------------------------------------------------------
+# main
+# -----------------------------------------------------------------------------
+case "$1" in
+minimum)
+ $logger -p daemon.info -t pwrctl-local "minimum power $2"
+;;
+medium)
+ $logger -p daemon.info -t pwrctl-local "medium power $2"
+;;
+maximum)
+ $logger -p daemon.info -t pwrctl-local "maximum power $2"
+ $logger -p daemon.info -t pwrctl-local "skipping pwrctl-main"
+ exit 1
+;;
+warning)
+ /usr/bin/wall "Low battery, system going down any minute now"
+;;
+lid-closed)
+ $logger -p daemon.info -t pwrctl-local "lid-closed $2"
+;;
+lid-opened)
+ $logger -p daemon.info -t pwrctl-local "lid-opened $2"
+;;
+sleep)
+ $logger -p daemon.info -t pwrctl-local "sleep $2"
+;;
+wakeup)
+ $logger -p daemon.info -t pwrctl-local "sleep $2"
+;;
+*)
+ $logger -p daemon.error -t pwrctl-local "invalid arg $1 $2"
+ exit 2
+;;
+esac
+
+exit 0
diff --git a/sys-apps/pmud/pmud-0.10.1.ebuild b/sys-apps/pmud/pmud-0.10.1.ebuild
new file mode 100644
index 000000000000..d7d2d6aea567
--- /dev/null
+++ b/sys-apps/pmud/pmud-0.10.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Kain <kain@kain.org>
+# $Id: pmud-0.10.1.ebuild,v 1.1 2002/04/27 10:34:28 pvdabeel Exp $
+
+S=${WORKDIR}/${P}
+
+DESCRIPTION="PowerMac power management utilities"
+SRC_URI="http://linuxppc.jvc.nl/${P}.tar.gz"
+HOMEPAGE="http://penguinppc.org/"
+DEPEND="sys-kernel/linux-headers"
+RDEPEND="sys-apps/util-linux"
+
+src_unpack() {
+ cd ${WORKDIR}
+ unpack ${P}.tar.gz
+ mv pmud-0.10 ${P}
+ cd ${S}
+ patch -p1 < ${FILESDIR}/pmud-file-locations.patch
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" || die
+}
+
+src_install () {
+ doman pmud.8 snooze.8 fblevel.8 batmon.8 xmouse.8
+ exeinto /sbin
+ doexe pmud wakebay snooze fblevel
+ exeinto /usr/bin
+ doexe Batmon
+ exeinto /usr/X11R6/bin
+ doexe xmouse
+ exeinto /etc/power
+ doexe ${FILESDIR}/pwrctl{,-local}
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/pmud.start pmud
+ insinto /etc
+ doins ${FILESDIR}/power.conf
+}