--- cpcieject-0.2.4.orig/driver/Makefile
+++ cpcieject-0.2.4/driver/Makefile
@@ -5,10 +5,14 @@
 
 INSTALL  = /usr/bin/install
 
-LINUX    = /lib/modules/$(shell uname -r)
+# Debian
+#LINUX    = /lib/modules/$(shell uname -r)
+LINUX    = /lib/modules/$(KVERS)
 INSTDIR  = $(DESTDIR)$(LINUX)
-LINUXINC = $(LINUX)/build/include
+# Debian
+#LINUXINC = $(LINUX)/build/include
 #LINUXINC = /usr/src/linux/include
+LINUXINC = $(KSRC)/include
 
 MODULEDEFS := -DMODULE -D__KERNEL__ $(shell [ -f $(LINUXINC)/linux/modversions.h ] && echo -DEXPORT_SYMTAB -DMODVERSIONS -include $(LINUXINC)/linux/modversions.h )
 
--- cpcieject-0.2.4.orig/debian/README.Debian
+++ cpcieject-0.2.4/debian/README.Debian
@@ -0,0 +1,22 @@
+cpcieject for Debian
+--------------------
+Please see ./README for a description of the cpcieject software.
+
+The Debian cpcieject source package provides two packages,
+
+ 1) cpcieject, which the provides the userspace daemon
+ 2) cpcieject-source, which provides the source for the kernel module
+
+The cpcieject-source package can be used in several ways,
+
+ - Using the make-kpkg(1) command provided by the kernel-package Debian
+   package. This will produce a corresponding cpcieject-modules package for
+   the Debian kernel-image package that you are using. This is "the Debian
+   way". See the "modules_image" section of the make-kpkg(1) man page.
+
+ - Changing to the /usr/src/modules/cpcieject/ directory and building as
+   the README file instructs using "make; make install". This will build
+   and install a module specific to the system you are building on and is
+   not under control of the packaging system.
+
+ -- Matt Taggart <taggart@debian.org>, Thu,  6 Jun 2002 18:10:08 -0600
--- cpcieject-0.2.4.orig/debian/changelog
+++ cpcieject-0.2.4/debian/changelog
@@ -0,0 +1,25 @@
+cpcieject (0.2.4-2) unstable; urgency=low
+
+  * First upload to Debian archive
+  * Write better README.Debian
+  * Write better debian/copyright file
+  * Clean up lintian errors
+
+ -- Matt Taggart <taggart@debian.org>  Thu,  6 Jun 2002 18:10:08 -0600
+
+cpcieject (0.2.4-1) unstable; urgency=low
+
+  * New upstream release
+  * Package renamed
+
+ -- Matt Taggart <taggart@debian.org>  Fri, 19 Apr 2002 16:28:48 -0600
+
+sdd (0.01-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- dann frazier <dannf@dannf.org>  Sun, 17 Jun 2001 18:41:22 -0600
+
+Local variables:
+mode: debian-changelog
+End:
--- cpcieject-0.2.4.orig/debian/cpcieject.postinst
+++ cpcieject-0.2.4/debian/cpcieject.postinst
@@ -0,0 +1,48 @@
+#! /bin/sh
+# postinst script for cpcieject
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+    configure)
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cpcieject-0.2.4.orig/debian/control
+++ cpcieject-0.2.4/debian/control
@@ -0,0 +1,24 @@
+Source: cpcieject
+Section: admin
+Priority: extra
+Maintainer: Matt Taggart <taggart@debian.org>
+Build-Depends: debhelper (>> 3.0.0)
+Standards-Version: 3.5.2
+
+Package: cpcieject
+Architecture: i386
+Depends: ${shlibs:Depends}
+Description: Userspace daemon for cpcieject kernel driver.
+ This is a userspace daemon for the cpcieject kernel driver.
+ It allows for a clean shutdown of a Compact PCI processor blade prior to
+ removal from the chassis upon flipping the ejection tab. This package is
+ only needed on Compact PCI systems (such as the HP bc1100) that implement
+ this functionality.
+
+Package: cpcieject-source
+Architecture: all
+Depends: make
+Description: Source for the cpcieject driver.
+ This package provides the source code for the cpcieject kernel module.
+ The cpciejct package is also required in order to make use of this
+ module. Kernel source is required to compile these modules.
--- cpcieject-0.2.4.orig/debian/cpcieject-source.prerm
+++ cpcieject-0.2.4/debian/cpcieject-source.prerm
@@ -0,0 +1,39 @@
+#! /bin/sh
+# prerm script for cpcieject
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+#       install-info --quiet --remove /usr/info/cpcieject.info.gz
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cpcieject-0.2.4.orig/debian/cpcieject.conffiles
+++ cpcieject-0.2.4/debian/cpcieject.conffiles
@@ -0,0 +1 @@
+/etc/init.d/cpcieject
--- cpcieject-0.2.4.orig/debian/cpcieject.postrm
+++ cpcieject-0.2.4/debian/cpcieject.postrm
@@ -0,0 +1,38 @@
+#! /bin/sh
+# postrm script for cpcieject
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+       purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- cpcieject-0.2.4.orig/debian/cpcieject.preinst
+++ cpcieject-0.2.4/debian/cpcieject.preinst
@@ -0,0 +1,44 @@
+#! /bin/sh
+# preinst script for cpcieject
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+#        if [ "$1" = "upgrade" ]
+#        then
+#            start-stop-daemon --stop --quiet --oknodo  \
+#                --pidfile /var/run/cpcieject.pid  \
+#                --exec /usr/sbin/cpcieject 2>/dev/null || true
+#        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cpcieject-0.2.4.orig/debian/cpcieject.prerm
+++ cpcieject-0.2.4/debian/cpcieject.prerm
@@ -0,0 +1,39 @@
+#! /bin/sh
+# prerm script for cpcieject
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+#       install-info --quiet --remove /usr/info/cpcieject.info.gz
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cpcieject-0.2.4.orig/debian/rules
+++ cpcieject-0.2.4/debian/rules
@@ -0,0 +1,318 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper. 
+# GNU copyright 1997 by Joey Hess.
+#
+# This version is for a hypothetical package that can build a kernel modules
+# architecture-dependant package via make-kpkg, as well as an
+# architecture-independent module source package, and other packages
+# either dep/indep for things like common files or userspace components
+# needed for the kernel modules.
+
+# Uncomment this to turn on verbose mode. 
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use.
+export DH_COMPAT=3
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+### KERNEL SETUP
+### Setup the stuff needed for making kernel module packages
+### taken from /usr/share/kernel-package/sample.module.rules
+
+# Name of package
+package		= cpcieject
+# KSRC is the location of the kernel source. This is the default value,
+# when make-kpkg is used it will supply to real value
+KSRC		= /usr/src/linux
+# KDREV is the package-revision, as given to make-kpkg by the user.
+# Just put a simply default value in here which we use when we test
+# the packagebuilding without make-kpkg
+ifeq ($(strip $(KDREV)),)
+KDREV		= "test1.0"
+endif
+
+## Now to determine the kernel version, normally supplied by make-kpkg
+ifeq ($(strip $(KVERS)),)
+# Now we need to get the kernel-version somehow (we are not running
+# under make-kpkg?)
+ifeq ($(strip $(KSRC)),)
+$(error Error. I do not know how to determine the kernel version)
+else
+kversion :=$(shell egrep '^VERSION +=' $(KSRC)/Makefile 2>/dev/null | \
+                 sed -e 's/[^0-9]*\([0-9]*\)/\1/')
+kplevel  :=$(shell egrep '^PATCHLEVEL +=' $(KSRC)/Makefile 2>/dev/null | \
+                    sed -e 's/[^0-9]*\([0-9]*\)/\1/')
+ksublevel:=$(shell egrep '^SUBLEVEL +=' $(KSRC)/Makefile 2>/dev/null | \
+                  sed -e 's/[^0-9]*\([0-9]*\)/\1/')
+EXTRA_VERSION:=$(shell egrep '^EXTRAVERSION +=' $(KSRC)/Makefile 2>/dev/null | \
+                 sed -e 's/EXTRAVERSION[\t ]*=[\t ]*\(.*\)/\1/')
+kextra:=$(strip $(EXTRA_VERSION))
+HAVE_NEW_MODLIB:=$(shell egrep '\(INSTALL_MOD_PATH\)' \
+                            $(KSRC)/Makefile 2>/dev/null )
+
+# If you want to have more than one kernel configuration per kernel
+# version, set FLAVOUR in the top level kernel Makefile *before*
+# invoking make-kpkg -- it will be appended to UTS_RELEASE in
+# version.h (separated by a hyphen). This affects everything -- the
+# names and versions of the image, source, headers, and doc packages,
+# and where the modules are searched for in /lib/modules.
+
+ifdef FLAVOUR
+# uhm - should check if we really have a Makefile capable of Flavours?
+endif
+
+FLAVOUR:=$(shell grep ^FLAVOUR $(KSRC)/Makefile 2>/dev/null | \
+                  perl -ple 's/FLAVOUR[\s:=]+//g')
+
+ifneq ($(strip $(FLAVOUR)),)
+INT_FLAV := -$(FLAVOUR)
+FLAV_ARG := FLAVOUR=$(FLAVOUR)
+else
+INT_FLAV :=
+FLAV_ARG :=
+endif
+
+## This is the replacement for FLAVOUR
+ifneq ($(strip $(APPEND_TO_VERSION)),)
+iatv := $(strip $(APPEND_TO_VERSION))
+EXTRAV_ARG := EXTRAVERSION=${EXTRA_VERSION}${iatv}
+else
+iatv :=
+EXTRAV_ARG :=
+endif
+
+KVERS = $(kversion).$(kplevel).$(ksublevel)$(kextra)$(iatv)$(INT_FLAV)
+
+endif
+endif
+
+non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
+epoch=$(shell echo $(KVERS) | perl -ne 'm/^(\d+:)/ && print $$1')
+
+# We also need the package version
+pversion	= $(shell sed -ne '1s/.*\((.*)\).*/\1/' debian/changelog)
+pversion	= $(shell sed -ne '1s/.*(\(.*\)).*/\1/p' debian/changelog)
+
+# MODDIR is the place where the final .deb package should be made. This is the
+# default value, when make-kpkg is used it will supply to real value
+MODDIR		= ..
+
+pmodules = $(package)-modules-$(non_epoch_version)
+psource = $(package)-source
+
+# Prepares the package for distribution.  Intended for the kernel
+# maintainer.
+kdist: kdist_clean kdist_config kdist_image
+
+# The kdist_configure target is called by make-kpkg modules_config. It
+# should configure the module so it is ready for compilation (mostly
+# useful for calling configure)
+kdist_config:
+	@echo Nothing to configure
+
+# the kdist_image target is called by make-kpkg modules_image. It is
+# responsible for compiling the module and creating the package. It
+# should also clean up after making the module. Please note we use a
+# seperate binary-modules target to make testing the package building
+# easier
+kdist_image:
+	$(MAKE) $(MFLAGS) -f debian/rules binary-modules
+	$(MAKE) $(MFLAGS) -f debian/rules clean
+
+# the kdist_clean target is called by make-kpkg modules_clean. It is
+# responsible for cleaning up any changes that have been made by the
+# other kdist_commands (except for the .deb files created).
+kdist_clean:
+	$(MAKE) $(MFLAGS) debian/rules clean
+
+### end  KERNEL SETUP
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+
+	touch configure-stamp
+
+build-arch: configure-stamp build-arch-stamp
+build-arch-stamp:
+	dh_testdir
+
+	# Add here command to compile/build the package.
+	$(MAKE) -C daemon
+
+	touch build-arch-stamp
+
+# the binary-modules target prepares the $(pmodules) package.
+# It is called by make-kpkg and *not* during a normal build
+binary-modules:
+	export DH_OPTIONS='-p$(pmodules)'
+
+	# Is this needed for setting up a Depends?
+	#echo "kpkg:Package-Version=$(epoch)$(pversion)+$(non_epoch_version)" \
+	#	 >> debian/$(package).substvars
+	echo "kpkg:Kernel-Version=$(non_epoch_version)" > \
+		debian/$(pmodules).substvars
+
+	# The substvars mechanism seems slightly broken, hack to get around it
+	# stolen from the qce-ga package. Yaaaa!
+	sed -e 's/$${kpkg\:Kernel\-Version}/$(non_epoch_version)/' \
+	debian/control.in > debian/control
+
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	
+	# Build the module
+	$(MAKE)
+
+	# Install the module
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/$(pmodules)
+
+	dh_installdebconf
+	# FIXME dh_installdocs README
+	dh_installchangelogs
+
+	# We're not using this yet
+	#dh_installmodules
+
+	dh_installdeb
+	#dh_gencontrol -- -v$(epoch)$(pversion)+$(non_epoch_version)+$(KDREV)
+	dh_gencontrol -- -v$(epoch)$(pversion)
+	dh_md5sums
+	#dh_builddeb --destdir=$(KSRC)/..
+	dh_builddeb --destdir=$(MODDIR)
+
+
+build-indep: configure-stamp build-indep-stamp
+build-indep-stamp:
+	dh_testdir
+
+	# Add here command to compile/build the arch indep packages.
+	# It's ok not to do anything here, if you don't need to build
+	#  anything for this package.
+	#/usr/bin/docbook-to-man debian/$(package).sgml > $(package).1
+
+	touch build-indep-stamp
+
+build: build-arch build-indep
+
+clean:
+	dh_testdir
+	dh_testroot
+
+	# clean up *-stamps
+	rm -f build-stamp configure-stamp
+	rm -f build-arch-stamp build-indep-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) clean
+
+	dh_clean
+
+install: DH_OPTIONS=
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	## Create $(psource)
+	# Create the directories to install the source into
+	dh_installdirs -p$(psource)  usr/src/modules/$(package)
+	dh_installdirs -p$(psource)  usr/src/modules/$(package)/debian
+
+	# Copy only the driver source to the proper location
+	cp -a driver/*  debian/$(psource)/usr/src/modules/$(package)
+	# Copy the needed debian/ pieces to the proper location
+	cp debian/*-modules.* \
+		debian/$(psource)/usr/src/modules/$(package)/debian
+	cp debian/control.modules.in \
+		debian/$(psource)/usr/src/modules/$(package)/debian/control.in
+	cp debian/rules \
+		debian/$(psource)/usr/src/modules/$(package)/debian
+	cp debian/changelog \
+		debian/$(psource)/usr/src/modules/$(package)/debian
+	cp debian/copyright \
+		debian/$(psource)/usr/src/modules/$(package)/debian
+
+	## Create $(package)
+	# Install
+	$(MAKE) -C daemon install DESTDIR=$(CURDIR)/debian/$(package)
+	# Move the init script so dh_installinit can find it
+	mv debian/$(package)/etc/init.d/$(package) debian/$(package).init
+
+	# we do everything by hand so we don't need dh_movefiles
+	#dh_movefiles
+
+# Build architecture-independent files here.
+# Pass -i to all debhelper commands in this target to reduce clutter.
+binary-indep: build install
+	dh_testdir -i
+	dh_testroot -i
+#	dh_installdebconf -i
+	dh_installdocs -i
+	dh_installexamples -i
+	dh_installmenu -i
+#	dh_installlogrotate -i
+#	dh_installemacsen -i
+#	dh_installpam -i
+#	dh_installmime -i
+#	dh_installinit -i
+	dh_installcron -i
+#	dh_installman -i
+	dh_installinfo -i
+#	dh_undocumented -i
+	dh_installchangelogs  -i
+	dh_link -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+#	dh_perl -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir -a
+	dh_testroot -a
+#	dh_installdebconf -a
+	dh_installdocs -a
+	dh_installexamples -a
+	dh_installmenu -a
+#	dh_installlogrotate -a
+#	dh_installemacsen -a
+#	dh_installpam -a
+#	dh_installmime -a
+	dh_installinit -a
+	dh_installcron -a
+#	dh_installman -a
+	dh_installinfo -a
+	dh_undocumented -a cpcieject.8
+	dh_installchangelogs  -a
+	dh_strip -a
+	dh_link -a
+	dh_compress -a
+	dh_fixperms -a
+#	dh_makeshlibs -a
+	dh_installdeb -a
+#	dh_perl -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure binary-modules kdist kdist_config kdist_image kdist_clean
--- cpcieject-0.2.4.orig/debian/cpcieject-modules.postinst
+++ cpcieject-0.2.4/debian/cpcieject-modules.postinst
@@ -0,0 +1,48 @@
+#! /bin/sh
+# postinst script for cpcieject
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+    configure)
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cpcieject-0.2.4.orig/debian/copyright
+++ cpcieject-0.2.4/debian/copyright
@@ -0,0 +1,33 @@
+This package was debianized by Matt Taggart <taggart@debian.org> on
+Fri, 15 Mar 2002 16:08:58 -0700.
+
+This package currently serves as the upstream source until a suitable upstream
+location can be found.
+
+Upstream Author(s): Hewlett-Packard
+
+Copyright: GPL
+
+Copyright (C) 2001 MontaVista Software Inc. <jpeters@mvista.com>
+                                            <source@mvista.com>
+Copyright (C) 2002 Hewlett-Packard Co. (Matthew Wilcox, Dann Frazier)
+
+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.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 
+THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--- cpcieject-0.2.4.orig/debian/cpcieject-source.preinst
+++ cpcieject-0.2.4/debian/cpcieject-source.preinst
@@ -0,0 +1,44 @@
+#! /bin/sh
+# preinst script for cpcieject
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+#        if [ "$1" = "upgrade" ]
+#        then
+#            start-stop-daemon --stop --quiet --oknodo  \
+#                --pidfile /var/run/cpcieject.pid  \
+#                --exec /usr/sbin/cpcieject 2>/dev/null || true
+#        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cpcieject-0.2.4.orig/debian/control.modules.in
+++ cpcieject-0.2.4/debian/control.modules.in
@@ -0,0 +1,20 @@
+Source: cpcieject
+Section: admin
+Priority: extra
+Maintainer: Matt Taggart <taggart@debian.org>
+Build-Depends: debhelper (>> 3.0.0)
+Standards-Version: 3.5.2
+
+Package: cpcieject-modules-${kpkg:Kernel-Version}
+Architecture: i386
+Provides: cpcieject-modules
+Description: cpcieject modules for Linux (kernel ${kpkg:Kernel-Version}).
+ This package contains the set of loadable kernel modules for the
+ cPCI Shutdown Driver.
+ .
+ This package contains the compiled kernel modules for ${kpkg:Kernel-Version}
+ .
+ If you have compiled your own kernel, you will most likely need to build
+ your own cpcieject-modules.  The cpcieject-source package has been provided
+ for use with the Debian kernel-package utility to produce a version of
+ cpcieject-module for your kernel.
--- cpcieject-0.2.4.orig/debian/cpcieject-modules.postrm
+++ cpcieject-0.2.4/debian/cpcieject-modules.postrm
@@ -0,0 +1,38 @@
+#! /bin/sh
+# postrm script for cpcieject
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+       purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- cpcieject-0.2.4.orig/debian/cpcieject-source.postrm
+++ cpcieject-0.2.4/debian/cpcieject-source.postrm
@@ -0,0 +1,38 @@
+#! /bin/sh
+# postrm script for cpcieject
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+       purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- cpcieject-0.2.4.orig/debian/cpcieject-source.postinst
+++ cpcieject-0.2.4/debian/cpcieject-source.postinst
@@ -0,0 +1,48 @@
+#! /bin/sh
+# postinst script for cpcieject
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+    configure)
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cpcieject-0.2.4.orig/debian/cpcieject.init
+++ cpcieject-0.2.4/debian/cpcieject.init
@@ -0,0 +1,60 @@
+#!/bin/sh
+#
+# cpcieject	Bring the shutdown daemon up/down
+#
+
+DAEMON=/usr/sbin/cpcieject
+
+case "$1" in
+  start)
+	echo -n "Starting cpcieject daemon: "
+	modprobe cpcieject
+	MAJOR=`cat /proc/devices | grep cpcieject | cut -d' ' -f1`
+
+	if [ "$MAJOR" == "" ]; then
+	    echo "device not found, exiting"
+	    exit 0
+	fi
+
+	if [ -c "/dev/cpcieject" ]
+	then
+		rm -f /dev/cpcieject
+	fi
+
+	mknod /dev/cpcieject c $MAJOR 0
+
+	$DAEMON
+	RETVAL=$?
+
+	echo
+	;;
+  stop)
+	echo -n "Stopping cpcieject daemon: "
+
+	PID=`ps ax | grep $DAEMON | grep -v "grep" | cut -c1-6`
+
+	if [ "$PID" == "" ]; then
+	    exit 0
+	fi
+
+	kill -s 1 $PID
+
+	echo
+	RETVAL=0
+	;;
+  force-reload)	
+	$0 stop
+	$0 start
+	RETVAL=$?
+	;;
+  restart)
+	$0 stop
+	$0 start
+	RETVAL=$?
+	;;
+  *)
+	echo "Usage: cpcieject {start|stop|restart|force-reload}"
+	exit 1
+esac
+
+exit $RETVAL
--- cpcieject-0.2.4.orig/debian/cpcieject-modules.prerm
+++ cpcieject-0.2.4/debian/cpcieject-modules.prerm
@@ -0,0 +1,39 @@
+#! /bin/sh
+# prerm script for cpcieject
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+#       install-info --quiet --remove /usr/info/cpcieject.info.gz
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cpcieject-0.2.4.orig/debian/cpcieject-modules.preinst
+++ cpcieject-0.2.4/debian/cpcieject-modules.preinst
@@ -0,0 +1,44 @@
+#! /bin/sh
+# preinst script for cpcieject
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+#        if [ "$1" = "upgrade" ]
+#        then
+#            start-stop-daemon --stop --quiet --oknodo  \
+#                --pidfile /var/run/cpcieject.pid  \
+#                --exec /usr/sbin/cpcieject 2>/dev/null || true
+#        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
