--- pmud-0.10.orig/debian/devfs.pmud
+++ pmud-0.10/debian/devfs.pmud
@@ -0,0 +1,2 @@
+REGISTER ^misc/pmu$   PERMISSIONS root.root 0600
+REGISTER ^misc/apm_bios$   PERMISSIONS root.root 0660
--- pmud-0.10.orig/debian/postrm
+++ pmud-0.10/debian/postrm
@@ -0,0 +1,25 @@
+#! /bin/sh
+set -e
+
+# paranoia
+if [ -f /var/run/pmud.pid ]; then
+    if [ -x /usr/sbin/invoke-rc.d ]
+    then
+	invoke-rc.d pmud stop
+    else
+	/etc/init.d/pmud stop
+    fi
+fi
+
+if [ -p /etc/power/apm ]; then
+	rm -f /etc/power/apm
+fi
+
+if [ "$1" = "purge" ]; then
+  update-rc.d -f pmud remove
+  rm -f /etc/power/pwrctl*
+fi
+ 
+#DEBHELPER#
+
+exit 0
--- pmud-0.10.orig/debian/rules
+++ pmud-0.10/debian/rules
@@ -0,0 +1,120 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatability version to use.
+export DH_COMPAT=1
+
+prefix=debian/tmp
+prefix_util=debian/pmud-utils
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+
+	# Add here commands to compile the package.
+	$(MAKE)
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) clean
+	#-$(MAKE) distclean
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp.
+	#$(MAKE) prefix=`pwd`/debian/tmp install
+
+	# pmud binaries and conffiles
+	install -d $(prefix)/sbin
+	install -c pmud $(prefix)/sbin/
+	install -c snooze $(prefix)/sbin/
+	install -c wakebay $(prefix)/sbin/
+	install -d $(prefix)/etc/default
+	install -m 644 power.conf $(prefix)/etc/default/power
+	install -d $(prefix)/etc/power
+	install -c pwrctl $(prefix)/etc/power/pwrctl
+	install -d $(prefix)/etc/init.d
+	install -c pmud.rc.debian $(prefix)/etc/init.d/pmud
+	install -p -D -m 644 debian/devfs.pmud $(prefix)/etc/devfs/conf.d/pmud
+	install -d $(prefix)/usr/share/doc/pmud/examples
+	install -m 644 pwrctl-local $(prefix)/usr/share/doc/pmud/examples
+	install -m 644 powerfail $(prefix)/usr/share/doc/pmud/examples
+
+	install -d $(prefix)/usr/bin
+	(cd $(prefix)/usr/bin && ln -sf ../../sbin/snooze apm)
+
+	# pmud-utils binaries
+	#install -d $(prefix_util)/sbin
+	#install -c fblevel $(prefix_util)/sbin/
+	# this breaks xorg 7.x
+	##install -d $(prefix_util)/usr/X11R6/bin
+	##install -c xmouse $(prefix_util)/usr/X11R6/bin/
+	install -d $(prefix_util)/usr/bin
+	install -c xmouse $(prefix_util)/usr/bin/
+	install -c Batmon $(prefix_util)/usr/bin/
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+#	dh_testversion
+	dh_testdir
+	dh_testroot
+#	dh_installdebconf	
+	dh_installdocs -A README
+	# install README.Debian also in utils package (not done by dh_installdocs)
+	install -m 644 debian/README.Debian $(prefix_util)/usr/share/doc/pmud-utils/README.Debian
+	dh_installexamples
+	dh_installmenu
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installinit
+	dh_installcron
+	dh_installmanpages
+	# symlink apm man page
+	(cd  $(prefix)/usr/share/man/man8/ && ln -sf snooze.8 apm.8)
+	# remove the ones that aren't relevant to a particular package
+	rm -f $(prefix)/usr/share/man/man8/fblevel.8
+	rm -f $(prefix)/usr/share/man/man8/xmouse.8
+	rm -f $(prefix_util)/usr/share/man/man8/pmud.8
+	rm -f $(prefix_util)/usr/share/man/man8/snooze.8
+	rm -f $(prefix_util)/usr/share/man/man8/fblevel.8
+	rm -f $(prefix_util)/usr/share/man/man8/wakebay.8
+	dh_installinfo
+#	dh_undocumented
+	dh_installchangelogs CHANGES
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_makeshlibs
+	dh_installdeb
+#	dh_perl
+	dh_shlibdeps
+	dh_gencontrol -ppmud
+	dh_gencontrol -ppmud-utils
+	dh_md5sums
+	dh_builddeb -ppmud
+	dh_builddeb -ppmud-utils
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- pmud-0.10.orig/debian/copyright
+++ pmud-0.10/debian/copyright
@@ -0,0 +1,20 @@
+The pmud package was debianized by Michael Schmitz
+<schmitz@biophys.uni-duesseldorf.de> on Mon, 22 May 2000 23:53:00 +0800
+
+The source distribution was downloaded from http://www3.jvc.nl/linuxppc/
+
+Copyright notice:
+
+Copyright 2000 Stephan Leemburg
+
+At present this supports the PB2400/3400/3500,
+the 1999 G3 Powerbooks (aka "Lombard"), and the previous 
+generation of G3 Powerbooks (aka "Wallstreet").
+ 
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version
+2 of the License, or (at your option) any later version.
+
+pmud is a system daemon, which is usefull only for Apple Macintosh
+Powerbooks. 
--- pmud-0.10.orig/debian/README.Debian
+++ pmud-0.10/debian/README.Debian
@@ -0,0 +1,41 @@
+pmud was debianized in May 2000 based on the pmud-0.6.1 release by Stephan
+Leemburg <stephan@jvc.nl>. 
+
+Not Debian related bugs, as well as feature requests should be reported to
+the pmud bug mailing list. <pmud-bugs@jvc.nl>
+
+Notable differences from the LinuxPPC (basically RedHat) version:
+
+- the pmud config file is located in /etc/default not /etc/sysconfig.
+  /var/lock/subsystem is not used on Debian.
+
+- the non-essential utilities have been moved to a separate pmud-utils 
+  package - this includes Batmon, fblevel and the xmouse program (save 
+  and restore X11 mouse settings) which wasn't included before. 
+
+pmud startup options are customized by editing /etc/default/power. For a
+list of options, see the pmud(8) man page.
+
+A supplementary pwrctl script for local customization has been provided in
+/usr/share/doc/pmud/examples/pwrctl-local. Common usage: run trackpad notap
+after wakeup to restore the pesky trackpad to a sane setting (this is being
+taken care of by pmud internally now!), or adjust the screen backlight level 
+according to power source and battery level. 
+Copy this script to /etc/power and customize according to your preferences. 
+This local script will never be overwritten by upgrades (nor removed on 
+package removal). /etc/power/pwrctl may be replaced by a new version on 
+occasion so be sure to make any changes to /etc/power/pwrctl-local only!
+
+apmd compatibility support has been added in the 0.6 release but is not
+mentioned in the documentation yet. So here's the scoop: 
+
+apmd support is enabled by the -a flag to pmud (in /etc/defaults/power) and
+results in status information being logged to the /etc/power/apm fifo every
+second. To use this feature, you'll need a patched version of any applet 
+or program that uses the apmd interface (these would usually look at
+/proc/apm and we can't really fake that from user space). A GKrellM plugin
+is available at http://www.execpc.com/~jpgarcia. 
+Recent kernels should have APM emulation built in so /proc/apm should be
+used where possible. 
+
+	Michael Schmitz
--- pmud-0.10.orig/debian/purge
+++ pmud-0.10/debian/purge
@@ -0,0 +1,2 @@
+/etc/power/pwrctl
+/etc/default/power
--- pmud-0.10.orig/debian/changelog
+++ pmud-0.10/debian/changelog
@@ -0,0 +1,224 @@
+pmud (0.10-12) unstable; urgency=low
+
+  * Fix error in low voltage threshold default (patch by Paul Collins
+    <paul@ondioline.org>).
+    Closes: #574422.
+  * Fix lintian warnings WRT mknod use in postinst.
+
+ -- Michael Schmitz <schmitz@debian.org>  Sat, 17 Apr 2010 11:44:13 +1200
+
+pmud (0.10-11) unstable; urgency=low
+
+  * New feature: use low voltage threshold for sleep.
+
+ -- Michael Schmitz <schmitz@debian.org>  Tue, 06 Aug 2009 20:20:57 +1200
+
+pmud (0.10-10) unstable; urgency=low
+
+  * Incorporate #363476 NMU.
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Tue, 30 Jun 2006 15:55:40 +0100
+
+pmud (0.10-9) unstable; urgency=low
+
+  * Build-depend on libx11-dev after xlibs-dev split.
+    Closes: #347026.
+
+  * Add man pages for apm and wakebay.
+    Closes: #311190.
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Mon, 9 Jan 2006 18:04:40 +0100
+
+pmud (0.10-8) unstable; urgency=low
+
+  * Add option to ignore lid open events. Thanks to Colin Leroy for alerting
+    me to the corresponding /proc/pmu option.
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Tue, 23 Nov 2004 10:36:28 +0100
+
+pmud (0.10-7) unstable; urgency=low
+
+  * Add suspend-to-disk support for machines with no kernel sleep support.
+    Experimental, requires sysfs and swsusp patches to work. 
+
+  * Don't remove /etc/power on purge since pbbuttonsd might need it. 
+    Closes: #272106.
+
+  * Execute scripts in /etc/power/event.d to support generic power
+    management interface. This isn't quite what the bug submitter asked, but 
+    close enough, and should take care of long standing wishlist items as 
+    well. Closes: #263344,#164875.
+
+  * Use invoke-rc.d if available. Closes: #273918.
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Tue, 26 Oct 2004 14:33:34 +0200
+
+pmud (0.10-6) unstable; urgency=low
+
+  * Move update-rc.d remove to postrm purge step (spotted by Colin Watson
+    <cjwatson@debian.org>). Closes: #228219.
+
+  * Add 'restart/force-reload' option to rc script (patch by Michael Shields
+    <shields@msrl.com>). Closes: #230609.
+
+  * Add 'nobeep' option to shut off beep on sleep/wakeup. Patch by Graham
+    Wilson <bob@decoy.wox.org>. Closes: #229478.
+
+  * Should be fixed IN -5 but forgot to close: display blanks/unblanks/blanks 
+    again on iBook (reported by Michael Shields <shields@msrl.com>, compare
+    #205896). Closes: #185370.
+
+  * Display shutdown on lid close with -k apparently fixed by -5 changes in 
+    backlight handling: Closes: #150623.
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Thu, 12 Feb 2004 17:07:11 +0100
+
+pmud (0.10-5) unstable; urgency=low
+
+  * Stop pmud tweaking the backlight, recent kernels should cope now. 
+    Closes: #205896.
+
+  * Document '-o' flag in usage and man page. Closes: #221288.
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Thu, 15 Jan 2004 16:00:10 +0200
+
+pmud (0.10-4) unstable; urgency=low
+
+  * Add postinst code to create /dev/apm_bios (or have devfsd register
+    the devices) to enable the kernel APM emulation for XFree86 (should
+    really be in the XFree86 or kernel image postinst). Adding a Depends: on
+    powermgmt-base seems unnecessary (maybe XFree86 should do that, and use
+    apm_available). 
+    Closes: #167009.
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Fri, 24 Jan 2003 14:47:51 +0200
+
+pmud (0.10-3) unstable; urgency=low
+
+  * Fix fcntl syscall syntax problem resulting in pmud crashing with 2.5
+    kernels (patch by Paul Mackerras)
+    Closes: #167836.
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Tue, 05 Nov 2002 09:52:55 +0200+
+
+pmud (0.10-2) unstable; urgency=low
+
+  * Removed on_ac_power which is in powermgmt-base, add Recommends:
+    powermgmt-base instead (reported by Jens Schmalzing).
+    Closes: #150622.
+
+  * Add debhelper build-depends (reported by Junichi Uekawa).
+    Closes: #139651.
+
+  * Unlink (stale) pmud socket special file before socket (stale socket file
+    resulted in pmud failing to start up after crash; reported by no-idea-who 
+    && fixed upstream in the meantime).
+
+  * Fix 'AC powerstatus forced on lid open' bug (reported by Michel Lanners)
+    Closes: #145922.
+
+  * Fix log message grammar typo (reported by Mark Brown).
+    Closes: #126615.
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Tue, 07 May 2002 12:20:25 +0200
+
+pmud (0.10-1) unstable; urgency=low
+
+  * New upstream release; applied various patches from 0.7/0.8 not yet propagated 
+    upstream.
+
+  * Upstream changes include Unix domain socket support (for pmud only). 
+    Closes: #122866.
+    Forked processes get stdin/stderr/stdout redirected to the bit bucket.
+    Closes: #123375.
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Tue, 18 Dec 2001 14:20:25 +0200
+
+pmud (0.8-1) unstable; urgency=low
+
+  * New upstream release; source now at http://sourceforge.net/projects/apmud/
+    Applied various patches from 0.7 not yet propagated upstream.
+
+  * Batmon font patch (Rusty Russell <rusty@rustcorp.com.au>). Closes: #111830.
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Fri, 07 Dec 2001 16:14:25 +0200
+
+pmud (0.7-6) unstable; urgency=low
+
+  * Conditionalize Core99 pwrctl section to shut down instead of sleep only 
+    if kernel version is below 2.4.8. 
+
+  * Fix broken wall usage in pwrctl. Closes: 112123
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Thu, 13 Sep 2001 13:31:23 +0200
+
+pmud (0.7-5) unstable; urgency=low
+
+  * Add conflicts on apmd for as long as it takes to convince the PTB 
+    that apmd makes no sense whatsoever on powerpc.
+
+  * Big package split: separate non-essential tools off into extra 
+    pmud-utils package (#79905). 
+
+  * Add sample powerfail script for use by init on SIGPWR in examples 
+    - untested (#79904).
+
+  * Change Core99 pwrctl section once again as these machines appear to 
+    be almost supported by the kernel now.
+
+    Closes #79904, #79905
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Fri, 25 May 2001 15:48:12 +0200
+
+pmud (0.7-4) unstable; urgency=low
+
+  * fixed broken pwrctl script (Pismo section), do a shutdown now.
+    Closes: #81103
+
+  * added devfs support code for /dev/pmu (Thanks to Chad Miller for the
+    patch). 
+    Closes: #89928
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Sun, 18 Mar 2001 20:57:14 +0200
+
+pmud (0.7-3) unstable; urgency=low
+
+  * fixed missing dependency (hdparm).
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Thu, 19 Oct 2000 23:32:31 +0200
+
+pmud (0.7-2) unstable; urgency=low
+
+  * Bugfix: trackpad status save/restore mangled the trackpad state (reply
+    buffer pointer off by one). Added 'show' option to trackpad tool. 
+    Closes: #74527
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Mon, 12 Oct 2000 20:14:19 +0200
+
+pmud (0.7-1) unstable; urgency=low
+
+  * New upstream release, adding wakebay support and trackpad status
+    save/restore.
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Mon, 09 Oct 2000 13:43:19 +0200
+
+pmud (0.6-2) unstable; urgency=low
+
+  * Added 3400 PMU APM patch from Joseph Garcia <jpgarcia@execpc.com>
+
+  * Fixed handling of -f option (patch by Jens Schmalzing <jens@tac.dk>). Closes #69591
+
+  * Added -a and -s options to man page (Jens Schmalzing <jens@tac.dk>). Closes #69587
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Mon, 21 Aug 2000 22:02:19 +0100
+
+pmud (0.6-1) unstable; urgency=low
+
+  * Initial Release. (built from LinuxPPC pmud-0.6 by Stephan Leemburg <stephan@jvc.nl>)
+
+ -- Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>  Mon, 23 May 2000 23:58:07 +0100
+
+Local variables:
+mode: debian-changelog
+add-log-mailing-address: "schmitz@biophys.uni-duesseldorf.de"
+End:
--- pmud-0.10.orig/debian/conffiles
+++ pmud-0.10/debian/conffiles
@@ -0,0 +1,4 @@
+/etc/init.d/pmud
+/etc/power/pwrctl
+/etc/default/power
+/etc/devfs/conf.d/pmud
--- pmud-0.10.orig/debian/postinst
+++ pmud-0.10/debian/postinst
@@ -0,0 +1,58 @@
+#! /bin/sh
+set -e
+
+if [ "$1" = "configure" ]; then
+# register devices
+    if [ -e /dev/.devfsd ]; then # devfs enabled
+	update-devfsd > /dev/null 2>&1 || true
+    elif  [ ! -d /dev/.udev ]; then # udev enabled
+	cat <<EOM
+Important notice:
+=================
+You are installing the pmud power management daemon on a system without 
+devfs or udev support. Make sure the following device files are present:
+/dev/pmu (char 10 154)
+/dev/apm_bios (char 10 134)
+Both should be owned by root and not readable/writeable by anyone else.
+EOM
+	read -p "* Press return to continue" foo
+    fi
+
+# APM compatibility fifo; use /proc/apm if possible
+    if [ ! -p /etc/power/apm ]; then
+	mkfifo -m 644 /etc/power/apm
+    fi
+fi
+
+update-rc.d pmud defaults 40 60
+
+#DEBHELPER#
+
+if [ "$1" = "configure" ]; then
+	if ! grep -q "PowerBook" /proc/cpuinfo ; then
+		cat <<EOM
+Important notice:
+=================
+You are installing the pmud power management daemon on a desktop PowerPC
+model. pmud is intended for use on Apple Powerbook models only. Using pmud
+or its helper tools to switch to sleep mode on your desktop machine may
+cause the system to hang (this is not a bug!). It may, accidentially, work 
+as expected on some models (undocumented feature). You have been warned.
+
+If you feel comfortable with pmud operating on your system, fine. Otherwise
+please remove the pmud package from your system as soon as possible.
+EOM
+		read -p "* Press return to continue" foo
+	fi
+fi
+
+if [ "$1" = "configure" -a ! -f /var/run/pmud.pid ]; then
+    if [ -x /usr/sbin/invoke-rc.d ]
+    then
+	invoke-rc.d pmud start
+    else
+	/etc/init.d/pmud start
+    fi
+fi
+ 
+exit 0
--- pmud-0.10.orig/debian/prerm
+++ pmud-0.10/debian/prerm
@@ -0,0 +1,15 @@
+#! /bin/sh
+set -e
+
+if [ -f /var/run/pmud.pid ]; then
+    if [ -x /usr/sbin/invoke-rc.d ]
+    then
+	invoke-rc.d pmud stop
+    else
+	/etc/init.d/pmud stop
+    fi
+fi
+
+#DEBHELPER#
+
+exit 0
--- pmud-0.10.orig/debian/control
+++ pmud-0.10/debian/control
@@ -0,0 +1,32 @@
+Source: pmud
+Section: admin
+Priority: optional
+Build-Depends: debhelper, libx11-dev
+Maintainer: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
+Standards-Version: 3.5.8.0
+
+Package: pmud
+Architecture: powerpc
+Depends: hdparm, ${shlibs:Depends}
+Recommends: powermgmt-base, powerpc-utils
+Conflicts: apmd
+Description: Apple PowerBook power management daemon
+ pmud is a daemon which periodically polls the PMU 
+ (power manager) and performs functions such as enabling 
+ or disabling devices appropriately when the power source 
+ changes, or putting the computer into sleep mode when the 
+ remaining battery power drops below a critical threshold.
+ Additional tools include a sleep command and a tool for 
+ waking up media bay devices to work around a CD-ROM wakeup 
+ bug in old kernels.
+
+Package: pmud-utils
+Architecture: powerpc
+Depends: pmud (>= 0.7-5), wish, ${shlibs:Depends}
+Description: Apple PowerBook power management daemon utils
+ pmud is a daemon which periodically polls the PMU 
+ (power manager) and performs various housekeeping functions 
+ depending on the power status. 
+ This package contains additional tools including a battery 
+ status monitor and a tool to preserve X mouse settings 
+ across sleep.
