--- vbetool-1.1.orig/debian/copyright
+++ vbetool-1.1/debian/copyright
@@ -0,0 +1,57 @@
+Author: Matthew Garrett <mjg59@srcf.ucam.org>
+Download: http://www.codon.org.uk/~mjg59/vbetool/
+
+Files: *
+Copyright:
+ Matthew Garrett <mjg59@srcf.ucam.org>, heavily based on vbetest.c from the
+ lrmi package and read-edid.c by John Fremlin
+License: GPL-2
+ 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; version 2 of the License.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+Files:
+ x86-common.h
+ x86-common.c
+Copyright:
+ (C) 1998 by Josh Vanderhoof
+ (C) 2005 by Jonathan McDowell <noodles@earth.li>
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ JOSH VANDERHOOF BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+Files: debian/*
+Copyright: (C) 2008 Bradley Smith <brad@brad-smith.co.uk>
+License: GPL-2+.
+ 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 program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in `/usr/share/common-licenses/GPL-2'.
--- vbetool-1.1.orig/debian/watch
+++ vbetool-1.1/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://www.codon.org.uk/~mjg59/vbetool/download/vbetool-([\d\.]+).tar.gz
--- vbetool-1.1.orig/debian/rules
+++ vbetool-1.1/debian/rules
@@ -0,0 +1,73 @@
+#!/usr/bin/make -f
+
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+include /usr/share/quilt/quilt.make
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+ifeq ($(DEB_HOST_ARCH), $(findstring $(DEB_HOST_ARCH),i386 lpia))
+	EMU =
+else
+	EMU = --with-x86emu
+endif
+
+configure: configure-stamp
+configure-stamp: $(QUILT_STAMPFN)
+	dh_testdir
+	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
+		--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
+		--mandir=\$${prefix}/share/man \
+		--infodir=\$${prefix}/share/info $(EMU)
+	touch $@
+
+
+build: build-stamp
+build-stamp: configure
+	dh_testdir
+	$(MAKE)
+	touch $@
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	[ ! -f Makefile ] || $(MAKE) clean
+	[ ! -f Makefile ] || $(MAKE) distclean
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/vbetool
+
+binary-indep: build install
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installexamples
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- vbetool-1.1.orig/debian/changelog
+++ vbetool-1.1/debian/changelog
@@ -0,0 +1,125 @@
+vbetool (1.1-2) unstable; urgency=low
+
+  * Add lpia to architectures. Closes: #511241.
+
+ -- Bradley Smith <bradsmith@debian.org>  Thu, 08 Jan 2009 19:48:23 +0000
+
+vbetool (1.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/control
+    - New maintainer. Closes: #460059.
+    - Update Standards-Version to 3.8.0.
+    - Update compat version to 7 and upgrade debhelper Build-Depends.
+    - Correct Homepage field. Closes: #502167.
+    - Add Vcs-* fields.
+    - Restrict Architecture field to i386/amd64 arches. Closes: #341549.
+  * Tidy up debian/rules
+  * Fix watch file.
+  * Convert copyright to machine readable format.
+  * Add quilt patch system.
+    - 00_misc_fixes.diff - Move top srcdir changes to patch.
+
+ -- Bradley Smith <bradsmith@debian.org>  Wed, 31 Dec 2008 11:28:34 +0000
+
+vbetool (1.0-3) unstable; urgency=low
+
+  * QA upload
+  * Don't build depend on zlib1g-dev
+  * Build depend on libx86-dev [amd64 i386]
+  * Fix FTBFS on kfreebsd-amd64. Closes: #424887
+    Patch by Petr Salinger
+
+ -- Anibal Monsalve Salazar <anibal@debian.org>  Sun, 04 May 2008 18:42:39 +1000
+
+vbetool (1.0-2) unstable; urgency=low
+
+  * QA upload
+    Set maintainer to Debian QA Group <packages@qa.debian.org>
+  * Build depends on libpci-dev. Closes: #478397
+  * Don't build with static libpci.a
+  * Non-native build
+  * Bumped debian/compat to 6
+  * Add homepage control header
+  * Add debian/watch
+  * Fix the following lintian issues:
+    W: vbetool source: ancient-standards-version 3.6.1 (current is 3.7.3)
+
+ -- Anibal Monsalve Salazar <anibal@debian.org>  Sat, 03 May 2008 09:19:00 +1000
+
+vbetool (1.0-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * New release taken from Ubuntu (Closes: #443568)
+
+ -- Philipp Kern <pkern@debian.org>  Sat, 01 Dec 2007 09:29:36 +0100
+
+vbetool (1.0-0ubuntu1) feisty; urgency=low
+
+  * Move to using libx86 (Closes: #420279)
+
+ -- Matthew Garrett <mjg59@srcf.ucam.org>  Fri,  2 Mar 2007 13:10:22 +0000
+
+vbetool (0.7-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add zlib1g-dev to Build-Depends and -lz to LDFLAGS, as needed by newer
+    pciutils (closes: #396844).
+
+ -- Julien Cristau <julien.cristau@ens-lyon.org>  Mon, 27 Nov 2006 03:43:37 +0100
+
+vbetool (0.7-1) unstable; urgency=low
+
+  * Add copyright information. Closes: #375159
+  * Apply splitup patches to allow vbetool to be linked into S2ram 
+    binary (from Pavel Machek)
+  * Fix build for systems that don't use /usr/lib (from Stefan Seyfried)
+  * Increase size of mapped real-mode memory (from Bart Oldeman)
+
+ -- Matthew Garrett <mjg59@srcf.ucam.org>  Wed, 26 Jul 2006 02:19:49 +0100
+
+vbetool (0.6-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Build with static libpci.a since the dynamic one is deprecated. Closes: #374730
+
+ -- Raphael Hertzog <hertzog@debian.org>  Fri, 30 Jun 2006 22:05:31 +0200
+
+vbetool (0.6-1) unstable; urgency=low
+
+  * Add support for parts of the VESA flat panel extension
+
+ -- Paul Sladen <debian@paul.sladen.org>  Wed, 15 Mar 2006 21:32:35 +0000
+
+vbetool (0.5-1) unstable; urgency=low
+
+  * Fix non-i386 build issues
+
+ -- Matthew Garrett <mjg59@srcf.ucam.org>  Wed, 30 Nov 2005 00:05:06 +0000
+
+vbetool (0.4-1) unstable; urgency=low
+
+  * New upstream version. Adds x86emu support for non-x86 support
+  * Compatibility with Linux 2.6.15 - may result in random breakage
+    since it now has the ability to write to RAM the kernel may be using
+
+ -- Matthew Garrett <mjg59@srcf.ucam.org>  Wed, 23 Nov 2005 02:56:04 +0000
+
+vbetool (0.3-1) unstable; urgency=low
+
+  * New upstream version. Adds legacy VGA enabling/disabling
+
+ -- Matthew Garrett <mjg59@srcf.ucam.org>  Wed,  2 Mar 2005 01:47:01 +0000
+
+vbetool (0.2-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthew Garrett <mjg59@srcf.ucam.org>  Fri, 31 Dec 2004 15:27:35 +0000
+
+vbetool (0.1-1) unstable; urgency=low
+
+  * Initial Release. Closes: #284909
+
+ -- Matthew Garrett <mjg59@srcf.ucam.org>  Thu, 30 Dec 2004 15:16:39 +0000
+
--- vbetool-1.1.orig/debian/control
+++ vbetool-1.1/debian/control
@@ -0,0 +1,17 @@
+Source: vbetool
+Section: utils
+Priority: optional
+Maintainer: Bradley Smith <bradsmith@debian.org>
+Build-Depends: debhelper (>= 7), libx86-dev, libpci-dev, quilt
+Standards-Version: 3.8.0
+Homepage: http://www.codon.org.uk/~mjg59/vbetool/
+Vcs-Git: http://git.brad-smith.co.uk/git/debian/pkg-vbetool.git
+Vcs-Browser: http://git.brad-smith.co.uk/?p=debian/pkg-vbetool.git
+
+Package: vbetool
+Architecture: i386 amd64 lpia kfreebsd-i386 kfreebsd-amd64
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: run real-mode video BIOS code to alter hardware state
+ vbetool uses lrmi in order to run code from the video BIOS. Currently, it
+ is able to alter DPMS states, save/restore video card state and attempt to
+ initialize the video card from scratch.
--- vbetool-1.1.orig/debian/compat
+++ vbetool-1.1/debian/compat
@@ -0,0 +1 @@
+7
--- vbetool-1.1.orig/debian/patches/00_misc_fixes.diff
+++ vbetool-1.1/debian/patches/00_misc_fixes.diff
@@ -0,0 +1,48 @@
+Index: vbetool/Makefile.am
+===================================================================
+--- vbetool.orig/Makefile.am	2008-05-16 13:52:33.000000000 +0100
++++ vbetool/Makefile.am	2008-12-31 11:36:08.000000000 +0000
+@@ -2,7 +2,7 @@
+ 
+ sbin_PROGRAMS = vbetool
+ 
+-vbetool_LDADD = $(libdir)/libpci.a
++vbetool_LDADD =
+ 
+ man_MANS = vbetool.1
+ vbetool_SOURCES = vbetool.c $(x86)
+@@ -14,4 +14,4 @@
+ 	$(RM) Makefile.in aclocal.m4 config.h.in stamp-h.in configure
+ 
+ AM_CFLAGS = -g -Wall -pedantic -std=gnu99
+-AM_LDFLAGS = -lz -lx86
++AM_LDFLAGS = -lz -lx86 -lpci
+Index: vbetool/Makefile.in
+===================================================================
+--- vbetool.orig/Makefile.in	2008-12-31 11:26:55.000000000 +0000
++++ vbetool/Makefile.in	2008-12-31 11:36:08.000000000 +0000
+@@ -50,7 +50,7 @@
+ PROGRAMS = $(sbin_PROGRAMS)
+ am_vbetool_OBJECTS = vbetool.$(OBJEXT)
+ vbetool_OBJECTS = $(am_vbetool_OBJECTS)
+-vbetool_DEPENDENCIES = $(libdir)/libpci.a
++vbetool_DEPENDENCIES =
+ DEFAULT_INCLUDES = -I.@am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+@@ -159,13 +159,13 @@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ AUTOMAKE_OPTIONS = foreign
+-vbetool_LDADD = $(libdir)/libpci.a
++vbetool_LDADD =
+ man_MANS = vbetool.1
+ vbetool_SOURCES = vbetool.c $(x86)
+ noinst_HEADERS = vbetool.h
+ EXTRA_DIST = vbetool.1 LRMI
+ AM_CFLAGS = -g -Wall -pedantic -std=gnu99
+-AM_LDFLAGS = -lz -lx86
++AM_LDFLAGS = -lz -lx86 -lpci
+ all: all-am
+ 
+ .SUFFIXES:
--- vbetool-1.1.orig/debian/patches/series
+++ vbetool-1.1/debian/patches/series
@@ -0,0 +1 @@
+00_misc_fixes.diff
