--- xmonad-0.8.orig/XMonad/Config.hs
+++ xmonad-0.8/XMonad/Config.hs
@@ -154,7 +154,7 @@
 -- | The preferred terminal program, which is used in a binding below and by
 -- certain contrib modules.
 terminal :: String
-terminal = "xterm"
+terminal = "x-terminal-emulator"
 
 -- | Whether focus follows the mouse pointer.
 focusFollowsMouse :: Bool
--- xmonad-0.8.orig/debian/xmonad.png.uuencode
+++ xmonad-0.8/debian/xmonad.png.uuencode
@@ -0,0 +1,64 @@
+begin 644 xmonad.png
+MB5!.1PT*&@H````-24A$4@```"\```!)"`8```"MBG_K````!'-"250("`@(
+M?`ADB`````EP2%ES```-UP``#=<!0BB;>````!ET15AT4V]F='=A<F4`=W=W
+M+FEN:W-C87!E+F]R9YON/!H```HL241!5&B!Q9M[3%39'<>_,PPSP^""B(B.
+M"`1YB(@87S$UV8=LW&0WV]0TBK)6'JO5EG5]5I=46A_U418?D39FM=9.TQJM
+M(FJZ*1;Q435&U)T.KDH175\5'&"&89CWS/WUC^D@(_?<>7!QO\GY@_N[O]_Y
+MW'._]]R3N0<)$1$`Z'0ZY.?GP^UV@T\S9\[$N7/G()%(>.-BJK6U%<W-S<QX
+M9F8F,C,S(?4=R,O+P]*E2V$RF7A;?7T]JJNKAQS<;#;CWKU[<+E<O$VE4B$]
+M/1T`(/&-/``X'`Y,FS8-=^_>Y2VL4JF@T^GZDL46$>'RY<LP&HV\<:E4BG??
+M?1>QL;'>O_L'%0H%-!H-9#(9;[+5:D5Q<3$XCA,9VZN6EA8F.`!D967U@0.O
+MP0/`M&G34%Y>SBQP[=HU[-NW;Y"8`V4RF01]/GSX<&1E9?D=\[.-3RZ7"S-F
+MS(!.I^,M%!45!:U6.Z!8N.(X#I<N78+)9.*-2Z52O/?>>XB)B?$_SG=R9&0D
+M-!H-(B,C>8O9;#:4E)2(9I_FYF8F.`!D9V</``<8\(!W]JFHJ&`6O'[].G;O
+MWATBYD`9C4:TM+0PXR-&C$!&1@9OC-<V/KG=;LR:-0NW;]_FC2L4"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wm
+++ xmonad-0.8/debian/wm
@@ -0,0 +1 @@
+/usr/bin/xmonad
--- xmonad-0.8.orig/debian/libghc6-xmonad-doc.docs
+++ xmonad-0.8/debian/libghc6-xmonad-doc.docs
@@ -0,0 +1,2 @@
+CONFIG
+TODO
--- xmonad-0.8.orig/debian/xmonad.desktop
+++ xmonad-0.8/debian/xmonad.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=XMonad
+Comment=Leightweight tiling window manager
+Exec=xmonad
+Icon=xmonad.png
+Type=XSession
+
--- xmonad-0.8.orig/debian/changelog
+++ xmonad-0.8/debian/changelog
@@ -0,0 +1,147 @@
+xmonad (0.8-1~bpo50+1) lenny-backports; urgency=low
+
+  * Rebuild for lenny-backports.
+  * Add myself as an uploader.
+
+ -- Andres Salomon <dilinger@debian.org>  Tue, 30 Jun 2009 01:35:17 +0000
+
+xmonad (0.8-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Joachim Breitner <nomeata@debian.org>  Sat, 06 Sep 2008 11:50:18 +0200
+
+xmonad (0.7-2) unstable; urgency=low
+
+  * Rebuild against new haskell-x11 (Closes: #486610, xinerama support)
+  * Update standards version (no change)
+  * Add Homepage: field
+
+ -- Joachim Breitner <nomeata@debian.org>  Thu, 03 Jul 2008 17:23:14 +0200
+
+xmonad (0.7-1) unstable; urgency=low
+
+  * xmonad needs to depend on x11-utils, for xmessage dialog
+    boxes (Closes: #470114)
+  * New upstream release
+  * Remove VCS headers, darcs was to unreliable for me.
+
+ -- Joachim Breitner <nomeata@debian.org>  Sun, 30 Mar 2008 23:14:13 +0200
+
+xmonad (0.6-3) unstable; urgency=low
+
+  * Update build-dependencies
+
+ -- Joachim Breitner <nomeata@debian.org>  Thu, 06 Mar 2008 19:33:06 +0100
+
+xmonad (0.6-2) unstable; urgency=low
+
+  * Start to use update-haskell-control for tighter dependencies 
+
+ -- Joachim Breitner <nomeata@debian.org>  Wed, 05 Mar 2008 14:13:09 +0100
+
+xmonad (0.6-1) unstable; urgency=low
+
+  * Upload to debian (closes: 460727)
+  * This makes xmonad-rebuild obsolete, as that functionality is provided by
+    upstream now.
+  * Depends on the haskell-x11 version that was NMU’ed and uploaded to 7-days
+    delayed, if anyone is wondering.
+
+ -- Joachim Breitner <nomeata@debian.org>  Mon, 04 Feb 2008 18:15:05 +0100
+
+xmonad (0.6-0.nomeata1) UNRELEASED; urgency=low
+
+  * New upstream version
+
+ -- Joachim Breitner <nomeata@debian.org>  Mon, 28 Jan 2008 18:06:13 +0100
+
+xmonad (0.5-0.nomeata4) UNRELEASED; urgency=low
+
+  * Build against ghc6.8
+
+ -- Joachim Breitner <nomeata@debian.org>  Thu, 17 Jan 2008 00:13:09 +0100
+
+xmonad (0.5-0.nomeata3) UNRELEASED; urgency=low
+
+  * Explicitly depend on X11 >= 1.4.1
+
+ -- Joachim Breitner <nomeata@debian.org>  Sun, 30 Dec 2007 14:28:29 +0100
+
+xmonad (0.5-0.nomeata2) UNRELEASED; urgency=low
+
+  * Install desktop file and register as a window manager
+
+ -- Joachim Breitner <nomeata@debian.org>  Tue, 25 Dec 2007 16:15:14 +0100
+
+xmonad (0.5-0.nomeata1) UNRELEASED; urgency=low
+
+  * New upstream version, test release
+    See README.Debian for information on the various packages.
+
+ -- Joachim Breitner <nomeata@debian.org>  Tue, 11 Dec 2007 12:42:34 +0100
+
+xmonad (0.4-6) unstable; urgency=low
+
+  * xmonad-rebuild needs to depend on libxinerama-dev (Closes: #451990)
+    sorry for forgetting about that
+
+ -- Joachim Breitner <nomeata@debian.org>  Mon, 19 Nov 2007 19:28:11 +0100
+
+xmonad (0.4-5) unstable; urgency=low
+
+  * FTBFS: /usr/bin/ld: cannot find -lXinerama (Closes: #450449)
+    Thanks to Lucas Nussbaum for doing good QA work.
+
+ -- Joachim Breitner <nomeata@debian.org>  Thu, 08 Nov 2007 16:15:01 +0100
+
+xmonad (0.4-4) unstable; urgency=low
+
+  * Add upstream url to copyright file
+
+ -- Joachim Breitner <nomeata@debian.org>  Mon, 29 Oct 2007 18:37:30 +0100
+
+xmonad (0.4-3) unstable; urgency=low
+
+  * Support for extensions in /usr/share/xmonad/extensions/
+
+ -- Joachim Breitner <nomeata@debian.org>  Sun, 28 Oct 2007 12:58:24 +0100
+
+xmonad (0.4-2) unstable; urgency=low
+
+  * Add Vcs-Darcs headers
+  * change terminal name to x-terminal-emulator
+  * and mplayer float app (Closes: #447966)
+
+ -- Joachim Breitner <nomeata@debian.org>  Thu, 25 Oct 2007 12:21:08 +0200
+
+xmonad (0.4-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Joachim Breitner <nomeata@debian.org>  Thu, 18 Oct 2007 15:43:57 +0200
+
+xmonad (0.3-0.4) UNRELEASED; urgency=low
+
+  * Use Config.hs instead of config.hs for xmonad-rebuild
+
+ -- Joachim Breitner <nomeata@debian.org>  Sun, 07 Oct 2007 20:44:09 +0200
+
+xmonad (0.3-0.3) UNRELEASED; urgency=low
+
+  * Register as a proper window manager (desktop file for gdm,
+    alternatives handling)
+
+ -- Joachim Breitner <nomeata@debian.org>  Sun, 07 Oct 2007 16:37:34 +0200
+
+xmonad (0.3-0.2) UNRELEASED; urgency=low
+
+  * Support for user-compiled xmonad binary in /home/jojo/.xmonad/xmonad
+
+ -- Joachim Breitner <nomeata@debian.org>  Sun, 07 Oct 2007 14:55:22 +0200
+
+xmonad (0.3-0.1) UNRELEASED; urgency=low
+
+  * Initial release. (Closes: #429226)
+
+ -- Joachim Breitner <nomeata@debian.org>  Sun, 07 Oct 2007 13:55:30 +0200
--- xmonad-0.8.orig/debian/libghc6-xmonad-doc.examples
+++ xmonad-0.8/debian/libghc6-xmonad-doc.examples
@@ -0,0 +1 @@
+man/xmonad.hs
--- xmonad-0.8.orig/debian/README.Debian
+++ xmonad-0.8/debian/README.Debian
@@ -0,0 +1,40 @@
+xmonad packages for debian
+==========================
+
+The packages for debian are split as follows:
+
+* xmonad
+  This package contains only the xmonad binary (with it’s man page) in the
+  default configuration. You do not have to install the haskell compiler to
+  use this package, but you also cannot reconfigure it to your needs. To do
+  that, you need the libghc6-xmonad-dev package. If that is installed, xmonad
+  will detect your configuration when you start it and compile a custom 
+  executable in ~/.xmonad transparently.
+
+* libghc6-xmonad-dev
+  This package contains the actual xmonad library, which you need to compile
+  your custom configuration.
+
+* libghc6-xmonad-contrib-dev
+  A lot of features are distributed in the xmonad extension library. To use them,
+  you need this package.
+
+* libghc6-xmonad-doc
+  This package contains the documentation for xmonad, including an example
+  configuration file.
+
+* libghc6-xmonad-configuration-doc
+  The documentation for the extensions, and more information on developing
+  xmonad extensions.
+
+* libghc6-xmonad-prof and libghc6-xmonad-contrib-prof
+  Profiling information. You’ll know when you need it.
+
+The most interesting pieces of documentation are probably:
+ - /usr/share/doc/ghc6-doc/libraries/xmonad-contrib/XMonad-Doc-Configuring.html
+ - /usr/share/doc/ghc6-doc/libraries/xmonad-contrib/XMonad-Doc-Extending.html
+in the package libghc6-xmonad-contrib-dev.
+
+
+Joachim Breitner <nomeata@debian.org>
+
--- xmonad-0.8.orig/debian/libghc6-xmonad-dev.prerm
+++ xmonad-0.8/debian/libghc6-xmonad-dev.prerm
@@ -0,0 +1,33 @@
+#! /bin/sh
+# Generic prerm.in script for Haskell cabal libraries v8 by Ian Lynagh.
+#
+
+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 /usr/doc/packaging-manual/
+
+case "$1" in
+    remove|upgrade|deconfigure|failed-upgrade)
+        /usr/lib/libghc6-xmonad-dev/unregister.sh
+    ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
--- xmonad-0.8.orig/debian/xmonad.dirs
+++ xmonad-0.8/debian/xmonad.dirs
@@ -0,0 +1,2 @@
+/usr/bin
+usr/share/icons
--- xmonad-0.8.orig/debian/libghc6-xmonad-dev.postinst
+++ xmonad-0.8/debian/libghc6-xmonad-dev.postinst
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Generic postinst script for Haskell cabal libraries v8 by Ian Lynagh.
+
+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 /usr/doc/packaging-manual/
+#
+# 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)
+        /usr/lib/libghc6-xmonad-dev/register.sh
+    ;;
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
--- xmonad-0.8.orig/debian/xmonad-wrapper
+++ xmonad-0.8/debian/xmonad-wrapper
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+if [ -e ~/.xmonad/xmonad ]
+then
+	exec ~/.xmonad/xmonad "$@"
+else
+	exec /usr/lib/xmonad/xmonad "$@"
+fi
--- xmonad-0.8.orig/debian/rules
+++ xmonad-0.8/debian/rules
@@ -0,0 +1,124 @@
+#!/usr/bin/make -f
+# Generic Haskell cabal library debian/rules v8 by Ian Lynagh,
+# based on the example by Joey Hess.
+# This file is public domain software.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# Get the Cabal package name. Assumes that the Debian package name is standard.
+CABAL_PACKAGE = xmonad
+
+GHC6_PACKAGE      = libghc6-$(CABAL_PACKAGE)-dev
+GHC6_PROF_PACKAGE = libghc6-$(CABAL_PACKAGE)-prof
+GHC6_DOC_PACKAGE  = libghc6-$(CABAL_PACKAGE)-doc
+
+# Find ghc. The ghc in the path might point to some other version of
+# GHC, so use ghc6 if it exists (which it ought to when building for
+# Debian)
+GHC := $(firstword $(shell bash -c "type -p ghc6 ghc"))
+
+CONFIGURE_OPTS  = --enable-library-vanilla \
+                  --enable-library-profiling \
+                  --enable-library-for-ghci
+ifneq '$(findstring $(shell dpkg-architecture -qDEB_HOST_ARCH), i386 amd64)' ''
+CONFIGURE_OPTS += --enable-split-objs
+endif
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+
+	update-haskell-control --check
+	$(GHC) --make Setup.*hs -o setup-ghc
+	./setup-ghc configure --ghc --with-compiler=$(GHC) --prefix=/usr --docdir=/usr/share/doc/ghc6-doc/libraries/$(CABAL_PACKAGE) --htmldir=/usr/share/doc/ghc6-doc/libraries/$(CABAL_PACKAGE)  $(CONFIGURE_OPTS)
+	./setup-ghc build
+	./setup-ghc haddock --hyperlink-source
+
+	touch $@
+
+FILES = -type f
+PROF_FILE = \( -name "*.p_*" -o -name "lib*_p.a" \)
+
+install: install-stamp
+install-stamp: build-stamp
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	./setup-ghc copy --destdir=debian/tmp/
+	rm debian/tmp/usr/share/doc/ghc6-doc/libraries/$(CABAL_PACKAGE)/LICENSE
+	find debian/tmp/usr/bin -type f \
+	                                 > debian/xmonad.install
+	find debian/tmp/usr/lib -type f ! $(PROF_FILE) \
+	                                 > debian/$(GHC6_PACKAGE).install
+	find debian/tmp -type d -empty  >> debian/$(GHC6_PACKAGE).install
+	find debian/tmp/usr/lib -type f   $(PROF_FILE) \
+	                                 > debian/$(GHC6_PROF_PACKAGE).install
+	echo "debian/tmp/usr/share/doc"  > debian/$(GHC6_DOC_PACKAGE).install
+
+	./setup-ghc register --gen-script
+	./setup-ghc unregister --gen-script
+	mkdir -p         debian/$(GHC6_PACKAGE)/usr/lib/$(GHC6_PACKAGE)
+	mv register.sh   debian/$(GHC6_PACKAGE)/usr/lib/$(GHC6_PACKAGE)
+	mv unregister.sh debian/$(GHC6_PACKAGE)/usr/lib/$(GHC6_PACKAGE)
+
+	touch $@
+
+update-generated-files:
+#	update-debian-haskell-files
+	update-haskell-control
+#	sed "s/@PACKAGE@/$(GHC6_PACKAGE)/g" debian/$(GHC6_PACKAGE).prerm.in \
+#	                                  > debian/$(GHC6_PACKAGE).prerm
+#	sed "s/@PACKAGE@/$(GHC6_PACKAGE)/g" debian/$(GHC6_PACKAGE).postinst.in \
+#	                                  > debian/$(GHC6_PACKAGE).postinst
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp install-stamp binary-common-stamp
+
+	-./setup-ghc clean
+	rm -f Setup.o Setup.hi setup-ghc
+	rm -f debian/*.install
+	-rmdir dist/
+
+	dh_clean
+
+# Build architecture-dependent files here.
+binary-common: binary-common-stamp
+binary-common-stamp: install-stamp
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installexamples
+	dh_install --fail-missing
+
+	uudecode debian/xmonad.png.uuencode -o debian/xmonad/usr/share/icons/xmonad.png
+	install -D -m 0644 debian/xmonad.desktop debian/xmonad/usr/share/xsessions/xmonad.desktop
+	dh_installwm
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress -X.haddock
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# binary-indep and binary-arch both build everything, as otherwise
+# # "dh_install --fail-missing" falls over
+
+# Build architecture-independent files here.
+binary-indep: binary-common-stamp
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: binary-common-stamp
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary-common binary install
--- xmonad-0.8.orig/debian/control.in
+++ xmonad-0.8/debian/control.in
@@ -0,0 +1,109 @@
+Source: xmonad
+Section: libdevel
+Priority: optional
+Maintainer: Joachim Breitner <nomeata@debian.org>
+Uploaders: Andres Salomon <dilinger@debian.org>
+Standards-Version: 3.8.0
+Build-Depends: &{canonicalise-comma-list:debhelper (>= 5), haddock (>= 0.8-2), hscolour, haskell-utils (>= 1.10), ${impl:ghc6:lib:build_deps}, ${cabal:deps:ghc6:dev}, ${cabal:deps:ghc6:prof}, ${cabal:deps:ghc6:doc}, ${c_dev_libs}, ${extra_build_deps}}
+Homepage: http://xmonad.org/
+
+Package: xmonad
+Section: x11
+Architecture: any
+Depends: \${shlibs:Depends}, \${misc:Depends}, x11-utils
+Recommends: libghc6-xmonad-dev, libghc6-xmonad-doc
+Conflicts: xmonad-rebuild
+Replaces: xmonad-rebuild
+Description: A lightweight X11 window manager
+ This package provides a library for the Haskell programming language.
+ See http://www.haskell.org/ for more information on Haskell.
+ .
+ Xmonad is a minimalist tiling window manager for X, written in
+ Haskell.  Windows are managed using automatic layout algorithms,
+ which can be dynamically reconfigured. At any time windows are
+ arranged so as to maximise the use of screen real estate. All
+ features of the window manager are accessible purely from the
+ keyboard: a mouse is entirely optional.  Xmonad is configured in
+ Haskell, and custom layout algorithms may be implemented by the user
+ in config files. A principle of Xmonad is predictability: the user
+ should know in advance precisely the window arrangement that will
+ result from any action. 
+ . 
+ This package comes pre-configured with the default configuration. If
+ you want to build your custom-configured version, make sure that
+ libghc6-xmonad-dev is installed and put your configuration in
+ ~/.xmonad/xmonad.hs
+
+Package: libghc6-xmonad-dev
+Section: libdevel
+Architecture: any
+Depends:  &{canonicalise-comma-list:${impl:ghc6:lib:dev_deps}, \${shlibs:Depends}, \${misc:Depends}, ${cabal:deps:ghc6:dev}, ${c_dev_libs}}
+Recommends: libghc6-xmonad-contrib-dev
+Suggests: libghc6-xmonad-prof, libghc6-xmonad-doc
+Description: A lightweight X11 window manager
+ This package provides a library for the Haskell programming language.
+ See http://www.haskell.org/ for more information on Haskell.
+ .
+ Xmonad is a minimalist tiling window manager for X, written in
+ Haskell.  Windows are managed using automatic layout algorithms,
+ which can be dynamically reconfigured. At any time windows are
+ arranged so as to maximise the use of screen real estate. All
+ features of the window manager are accessible purely from the
+ keyboard: a mouse is entirely optional.  Xmonad is configured in
+ Haskell, and custom layout algorithms may be implemented by the user
+ in config files. A principle of Xmonad is predictability: the user
+ should know in advance precisely the window arrangement that will
+ result from any action. 
+ . 
+ This package is what you need to build your custom configured xmonad
+ binary.
+
+Package: libghc6-xmonad-prof
+Section: libdevel
+Architecture: any
+Depends: &{canonicalise-comma-list:\${shlibs:Depends}, \${misc:Depends}, ${this:ghc6:dev}, ${impl:ghc6:lib:prof_deps}, ${cabal:deps:ghc6:prof}, ${c_dev_libs}}
+Suggests: libghc6-xmonad-doc
+Description: A lightweight X11 window manager; profiling libraries
+ This package provides a library for the Haskell programming language,
+ compiled for profiling.
+ See http://www.haskell.org/ for more information on Haskell.
+ .
+ Xmonad is a minimalist tiling window manager for X, written in
+ Haskell.  Windows are managed using automatic layout algorithms,
+ which can be dynamically reconfigured. At any time windows are
+ arranged so as to maximise the use of screen real estate. All
+ features of the window manager are accessible purely from the
+ keyboard: a mouse is entirely optional.  Xmonad is configured in
+ Haskell, and custom layout algorithms may be implemented by the user
+ in config files. A principle of Xmonad is predictability: the user
+ should know in advance precisely the window arrangement that will
+ result from any action. 
+ . 
+ This package is what you need to profile your custom configured xmonad
+ binary.
+
+Package: libghc6-xmonad-doc
+Recommends: libghc6-xmonad-contrib-doc
+Section: doc
+Architecture: all
+Depends: &{canonicalise-comma-list:\${shlibs:Depends}, \${misc:Depends}, ${impl:ghc6:lib:doc_deps}, ${cabal:deps:ghc6:doc}}
+Suggests: libghc6-xmonad-dev, libghc6-xmonad-prof
+Description: A lightweight X11 window manager; documentation
+ This package provides the documentation for a library for the Haskell
+ programming language.
+ See http://www.haskell.org/ for more information on Haskell.
+ .
+ Xmonad is a minimalist tiling window manager for X, written in
+ Haskell.  Windows are managed using automatic layout algorithms,
+ which can be dynamically reconfigured. At any time windows are
+ arranged so as to maximise the use of screen real estate. All
+ features of the window manager are accessible purely from the
+ keyboard: a mouse is entirely optional.  Xmonad is configured in
+ Haskell, and custom layout algorithms may be implemented by the user
+ in config files. A principle of Xmonad is predictability: the user
+ should know in advance precisely the window arrangement that will
+ result from any action. 
+ . 
+ This package contains the documentation for building your custom
+ configured xmonad binary as well as example configuration files.
+
--- xmonad-0.8.orig/debian/copyright
+++ xmonad-0.8/debian/copyright
@@ -0,0 +1,17 @@
+This package was debianised by Joachim Breitner <nomeata@debian.org>
+10 Oct 2007. All of the Debian packaging scripts are released
+into the public domain.
+
+Upstream Author: Spencer Janssen
+
+Copyright: Spencer Janssen 2007
+           Don Stewart 2007
+
+BSD licenced. Copies can be found in /usr/share/common-licenses/BSD on
+Debian systems.
+
+xmonad can be found on http://xmonad.org/ and
+http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmonad
+
+
+
--- xmonad-0.8.orig/debian/libghc6-xmonad-doc.postrm
+++ xmonad-0.8/debian/libghc6-xmonad-doc.postrm
@@ -0,0 +1,21 @@
+#! /bin/sh
+# Generic doc postrm script for Haskell cabal libraries v9 by Ian Lynagh.
+
+set -e
+
+DIR=/usr/share/doc/ghc6-doc/libraries
+GEN=/usr/lib/ghc6-doc/gen_contents_index
+
+case "$1" in
+    *)
+        [ -d $DIR ] && [ -e $GEN ] && cd $DIR && $GEN
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
--- xmonad-0.8.orig/debian/control
+++ xmonad-0.8/debian/control
@@ -0,0 +1,109 @@
+Source: xmonad
+Section: libdevel
+Priority: optional
+Maintainer: Joachim Breitner <nomeata@debian.org>
+Uploaders: Andres Salomon <dilinger@debian.org>
+Standards-Version: 3.8.0
+Build-Depends: debhelper (>= 5), haddock (>= 0.8-2), hscolour, haskell-utils (>= 1.10), ghc6 (>= 6.8.2), ghc6 (<< 6.8.2+), ghc6-prof (>= 6.8.2), ghc6-prof (<< 6.8.2+), ghc6-doc (>= 6.8.2), ghc6-doc (<< 6.8.2+), libghc6-x11-dev (= 1.4.2-1), libghc6-mtl-dev (= 1.1.0.0-2), libghc6-quickcheck-dev (= 1.1.0.0-2), libghc6-x11-prof (= 1.4.2-1), libghc6-mtl-prof (= 1.1.0.0-2), libghc6-quickcheck-prof (= 1.1.0.0-2), libghc6-x11-doc (= 1.4.2-1), libghc6-mtl-doc (= 1.1.0.0-2), libghc6-quickcheck-doc (= 1.1.0.0-2), libx11-dev, libxinerama1, sharutils
+Homepage: http://xmonad.org/
+
+Package: xmonad
+Section: x11
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, x11-utils
+Recommends: libghc6-xmonad-dev, libghc6-xmonad-doc
+Conflicts: xmonad-rebuild
+Replaces: xmonad-rebuild
+Description: A lightweight X11 window manager
+ This package provides a library for the Haskell programming language.
+ See http://www.haskell.org/ for more information on Haskell.
+ .
+ Xmonad is a minimalist tiling window manager for X, written in
+ Haskell.  Windows are managed using automatic layout algorithms,
+ which can be dynamically reconfigured. At any time windows are
+ arranged so as to maximise the use of screen real estate. All
+ features of the window manager are accessible purely from the
+ keyboard: a mouse is entirely optional.  Xmonad is configured in
+ Haskell, and custom layout algorithms may be implemented by the user
+ in config files. A principle of Xmonad is predictability: the user
+ should know in advance precisely the window arrangement that will
+ result from any action. 
+ . 
+ This package comes pre-configured with the default configuration. If
+ you want to build your custom-configured version, make sure that
+ libghc6-xmonad-dev is installed and put your configuration in
+ ~/.xmonad/xmonad.hs
+
+Package: libghc6-xmonad-dev
+Section: libdevel
+Architecture: any
+Depends:  ghc6 (>= 6.8.2), ghc6 (<< 6.8.2+), ${shlibs:Depends}, ${misc:Depends}, libghc6-x11-dev (= 1.4.2-1), libghc6-mtl-dev (= 1.1.0.0-2), libghc6-quickcheck-dev (= 1.1.0.0-2), libx11-dev, libxinerama1
+Recommends: libghc6-xmonad-contrib-dev
+Suggests: libghc6-xmonad-prof, libghc6-xmonad-doc
+Description: A lightweight X11 window manager
+ This package provides a library for the Haskell programming language.
+ See http://www.haskell.org/ for more information on Haskell.
+ .
+ Xmonad is a minimalist tiling window manager for X, written in
+ Haskell.  Windows are managed using automatic layout algorithms,
+ which can be dynamically reconfigured. At any time windows are
+ arranged so as to maximise the use of screen real estate. All
+ features of the window manager are accessible purely from the
+ keyboard: a mouse is entirely optional.  Xmonad is configured in
+ Haskell, and custom layout algorithms may be implemented by the user
+ in config files. A principle of Xmonad is predictability: the user
+ should know in advance precisely the window arrangement that will
+ result from any action. 
+ . 
+ This package is what you need to build your custom configured xmonad
+ binary.
+
+Package: libghc6-xmonad-prof
+Section: libdevel
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libghc6-xmonad-dev, ghc6-prof (>= 6.8.2), ghc6-prof (<< 6.8.2+), libghc6-x11-prof (= 1.4.2-1), libghc6-mtl-prof (= 1.1.0.0-2), libghc6-quickcheck-prof (= 1.1.0.0-2), libx11-dev, libxinerama1
+Suggests: libghc6-xmonad-doc
+Description: A lightweight X11 window manager; profiling libraries
+ This package provides a library for the Haskell programming language,
+ compiled for profiling.
+ See http://www.haskell.org/ for more information on Haskell.
+ .
+ Xmonad is a minimalist tiling window manager for X, written in
+ Haskell.  Windows are managed using automatic layout algorithms,
+ which can be dynamically reconfigured. At any time windows are
+ arranged so as to maximise the use of screen real estate. All
+ features of the window manager are accessible purely from the
+ keyboard: a mouse is entirely optional.  Xmonad is configured in
+ Haskell, and custom layout algorithms may be implemented by the user
+ in config files. A principle of Xmonad is predictability: the user
+ should know in advance precisely the window arrangement that will
+ result from any action. 
+ . 
+ This package is what you need to profile your custom configured xmonad
+ binary.
+
+Package: libghc6-xmonad-doc
+Recommends: libghc6-xmonad-contrib-doc
+Section: doc
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, ghc6-doc (>= 6.8.2), ghc6-doc (<< 6.8.2+), libghc6-x11-doc (= 1.4.2-1), libghc6-mtl-doc (= 1.1.0.0-2), libghc6-quickcheck-doc (= 1.1.0.0-2)
+Suggests: libghc6-xmonad-dev, libghc6-xmonad-prof
+Description: A lightweight X11 window manager; documentation
+ This package provides the documentation for a library for the Haskell
+ programming language.
+ See http://www.haskell.org/ for more information on Haskell.
+ .
+ Xmonad is a minimalist tiling window manager for X, written in
+ Haskell.  Windows are managed using automatic layout algorithms,
+ which can be dynamically reconfigured. At any time windows are
+ arranged so as to maximise the use of screen real estate. All
+ features of the window manager are accessible purely from the
+ keyboard: a mouse is entirely optional.  Xmonad is configured in
+ Haskell, and custom layout algorithms may be implemented by the user
+ in config files. A principle of Xmonad is predictability: the user
+ should know in advance precisely the window arrangement that will
+ result from any action. 
+ . 
+ This package contains the documentation for building your custom
+ configured xmonad binary as well as example configuration files.
+
--- xmonad-0.8.orig/debian/libghc6-xmonad-doc.postinst
+++ xmonad-0.8/debian/libghc6-xmonad-doc.postinst
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Generic doc postinst script for Haskell cabal libraries v9 by Ian Lynagh.
+#
+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 /usr/doc/packaging-manual/
+#
+# 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)
+        cd /usr/share/doc/ghc6-doc/libraries
+        /usr/lib/ghc6-doc/gen_contents_index
+    ;;
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- xmonad-0.8.orig/debian/xmonad.manpages
+++ xmonad-0.8/debian/xmonad.manpages
@@ -0,0 +1 @@
+man/xmonad.1
--- xmonad-0.8.orig/debian/varfiles/varfile
+++ xmonad-0.8/debian/varfiles/varfile
@@ -0,0 +1,2 @@
+c_dev_libs="libx11-dev, libxinerama1"
+extra_build_deps="sharutils"
