--- aewm++-1.1.2.orig/aewm.hh
+++ aewm++-1.1.2/aewm.hh
@@ -47,7 +47,7 @@
 #define FOCUSED_WINDOW_TITLE_COLOR "#FFFFFF"
 
 
-#define DEF_NEW1	"xterm -ls -sb -bg black -fg white"
+#define DEF_NEW1	"x-terminal-emulator -ls -sb -bg black -fg white"
 #define DEF_BW		1
 #define SPACE		3
 #define MINSIZE		15
--- aewm++-1.1.2.orig/client.cc
+++ aewm++-1.1.2/client.cc
@@ -6,6 +6,8 @@
  */
 #include "aewm.hh"
 
+#include <string.h>
+
 Client::Client(Display *d, Window new_client)
 {
 	initialize(d);
--- aewm++-1.1.2.orig/Makefile
+++ aewm++-1.1.2/Makefile
@@ -2,8 +2,8 @@
 ADDITIONAL_CFLAGS   = -g -O2 -march=i686 -Wall
 
 prefix   = /usr
-INCLUDES = -I$/usr/X11R6
-LDPATH   = -L/usr/X11R6/lib
+INCLUDES = -I/usr/include/X11
+LDPATH   = -L/usr/lib/X11
 LIBS     = -lXext -lX11
 
 # SHAPE = Shape Extension
@@ -35,8 +35,7 @@
 
 install: all
 	mkdir -p $(DESTDIR)$(prefix)/bin
-	mkdir -p $(DESTDIR)$(prefix)/man/man1
-	install -s aewm++ $(DESTDIR)$(prefix)/bin
+	install aewm++ $(DESTDIR)$(prefix)/bin
 	
 clean:
 	rm -f aewm++ $(OBJS) core
--- aewm++-1.1.2.orig/windowmanager.cc
+++ aewm++-1.1.2/windowmanager.cc
@@ -6,6 +6,8 @@
  */
 #include "aewm.hh"
 
+#include <string.h>
+
 WindowManager* wm;
 
 #define AEWM_KEY_ALT_COUNT 4
@@ -540,7 +542,7 @@
  	{
                 if( (unsigned)current_desktop != ks - XK_1 )
 		{
-			(unsigned)current_desktop = ks - XK_1;
+			current_desktop = ks - XK_1;
 			goToDesktop(current_desktop);
 		}
 	}
--- aewm++-1.1.2.orig/main.cc
+++ aewm++-1.1.2/main.cc
@@ -6,6 +6,8 @@
  */
  #include "aewm.hh"
 
+#include <string.h>
+
 // Dunno where I ripped this from. Kudos to the author whoever he is!
 void forkExec(char *cmd)
 {
--- aewm++-1.1.2.orig/debian/aewm++.desktop
+++ aewm++-1.1.2/debian/aewm++.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=aewm++
+Comment=minimal window manager
+Exec=aewm++
+Terminal=False
+TryExec=aewm++
+Type=Application
+
+[Window Manager]
+SessionManaged=false
+
--- aewm++-1.1.2.orig/debian/prerm
+++ aewm++-1.1.2/debian/prerm
@@ -0,0 +1,27 @@
+#! /bin/sh
+# prerm script for aewm++
+
+set -e
+
+case "$1" in
+    remove|upgrade|deconfigure)
+        if [ -x `which update-alternatives` ]; then
+             update-alternatives --remove x-window-manager \
+             /usr/bin/aewm++
+        fi
+        ;;
+    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
+
--- aewm++-1.1.2.orig/debian/postinst
+++ aewm++-1.1.2/debian/postinst
@@ -0,0 +1,33 @@
+#! /bin/sh
+# postinst script for aewm++
+
+set -e
+
+case "$1" in
+    configure)
+        if [ -x `which update-alternatives` ]; then
+            update-alternatives \
+              --install /usr/bin/x-window-manager x-window-manager \
+                        /usr/bin/aewm++ 60 \
+              --slave /usr/share/man/man1/x-window-manager.1.gz \
+                      x-window-manager.1.gz /usr/share/man/man1/aewm++.1x.gz
+        fi
+    ;;
+
+    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
+
--- aewm++-1.1.2.orig/debian/copyright
+++ aewm++-1.1.2/debian/copyright
@@ -0,0 +1,28 @@
+This package was debianized by Chris Boyle <cmb@debian.org> on
+Thu, 31 Jan 2002 00:29:34 +0000.
+
+It was downloaded from ftp://ftp.sourceforge.net/pub/sourceforge/sapphire/
+
+Upstream Author: Frank Hale <frankhale@yahoo.com>
+
+Copyright:
+
+Copyright (C) 2000 Frank Hale
+frankhale@yahoo.com
+http://sapphire.sourceforge.net/
+
+  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.
+
+  You should have received a copy of the GNU General Public License with
+  the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
+  if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth
+  Floor, Boston, MA 02110-1301, USA.
+
--- aewm++-1.1.2.orig/debian/changelog
+++ aewm++-1.1.2/debian/changelog
@@ -0,0 +1,131 @@
+aewm++ (1.1.2-5.5.201403112239) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Tue, 11 Mar 2014 22:39:21 +0100
+
+aewm++ (1.1.2-5) unstable; urgency=low
+
+  * Acknowledge NMU, thanks Luk. (closes: #471197)
+  * Fix build-dep (libext-dev has gone away).
+  * Don't use absolute path for update-alternatives.
+    (closes: #510937)
+  * Add Homepage field (upstream has reappeared, on Google Code).
+  * Fix debian/watch accordingly. (closes: #529095)
+  * Bump debhelper version to 7.
+  * Don't strip in Makefile; leave that to conditional dh_strip.
+    (closes: #436380)
+  * Fix menu section.
+  * Catch errors from make clean.
+  * Bump Standards-Version to 3.8.1.0.
+  * Don't use obsolete X11R6 paths to build.
+  * Use dh_prep instead of dh_clean -k.
+
+ -- Chris Boyle <cmb@debian.org>  Mon, 25 May 2009 01:08:06 +0100
+
+aewm++ (1.1.2-4.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Build depend on libxext-dev (Closes: #464604).
+  * Fix FTBFS with GCC 4.3 (Closes: #454825).
+
+ -- Luk Claes <luk@debian.org>  Sun, 16 Mar 2008 15:41:15 +0000
+
+aewm++ (1.1.2-4) unstable; urgency=low
+
+  * Update Build-Depends for Xorg (closes: #346611, #346621).
+
+ -- Chris Boyle <cmb@debian.org>  Fri, 13 Jan 2006 00:43:29 +0000
+
+aewm++ (1.1.2-3) unstable; urgency=low
+
+  * Add .desktop file (closes: #330042).
+  * Bump Standards-Version to 3.6.2.
+  * Update GPL declaration in copyright file.
+
+ -- Chris Boyle <cmb@debian.org>  Sun, 16 Oct 2005 16:16:19 +0100
+
+aewm++ (1.1.2-2) unstable; urgency=low
+
+  * Add ADDITIONAL_CFLAGS= to rules to remove hardcoded -march in Makefile
+    (closes: #299917).
+  * Bump Standards-Version to 3.6.1.
+
+ -- Chris Boyle <cmb@debian.org>  Thu, 31 Mar 2005 12:48:58 +0100
+
+aewm++ (1.1.2-1) unstable; urgency=low
+
+  * New upstream release (closes: #291714).
+  * This release does not have GNOME EWMH hints, because upstream wants to
+    focus on making the code stable and minimalistic. Warning added to
+    package description.
+  * Reinstated manual page which upstream removed for some reason. Checked
+    it's still accurate.
+  * Changed references to xterm to x-terminal-emulator to use the user's
+    preferred version according to /etc/alternatives.
+  * Updated README.Debian about aewm++-goodies.
+
+ -- Chris Boyle <cmb@debian.org>  Fri, 11 Mar 2005 12:53:43 +0000
+
+aewm++ (1.0.24-3) unstable; urgency=low
+
+  * Fix FTBFS with g++-3.4 (closes: #276731), thanks
+    Daniel Schepler <schepler@math.berkeley.edu>
+  * Several manual page fixes (closes: #270860, #270863, #270864),
+    thanks Jari Aalto <jari.aalto@poboxes.com>
+
+ -- Chris Boyle <cmb@debian.org>  Sat, 27 Nov 2004 20:12:15 +0000
+
+aewm++ (1.0.24-2) unstable; urgency=low
+
+  * Fixed debian/watch file (sourceforge ftp layout).
+
+ -- Chris Boyle <cmb@debian.org>  Sun, 28 Mar 2004 19:20:54 +0100
+
+aewm++ (1.0.24-1) unstable; urgency=low
+
+  * New upstream release (whoah, I have *not* been paying attention...),
+    many bugfixes, many rewritten features, and it's been run through
+    valgrind. Details too numerous to list, see changelog.gz.
+  * Upstream has split the goodies directory into a separate package; 
+    doing the same here.
+  * Suggests: aewm++-goodies. This does not exist at the time of upload, 
+    which is really a bug. However, I expect it will exist very soon, 
+    and I'm about to go away for 2 weeks. (N.B., as mentioned in my 
+    [VAC] message, you can NMU if I've just broken stuff)
+  * Made Makefile install manpage under .../share/man, not .../man.
+  * Seems to comply with the freedesktop.org WM spec, so change score of
+    x-window-manager alternative to 60 (was 20).
+  * Added support for DEB_BUILD_OPTIONS.
+  * Having done the above, bumped standards-version to 3.6.0
+  * Now I'm building with pbuilder. This needs recording here in case it
+    breaks anything. :-p
+
+ -- Chris Boyle <cmb@debian.org>  Thu, 24 Jul 2003 21:23:35 +0100
+
+aewm++ (1.0.16-3) unstable; urgency=medium
+
+  * Doh! Fixed bug where aewm++ binary was not installed, caused, would you believe it,
+    by one extra backslash in debian/rules. (closes: #133507)
+  * Made sure /etc/X11/appbar gets removed on purge.
+
+ -- Chris Boyle <cmb@debian.org>  Tue, 12 Feb 2002 22:16:54 +0000
+
+aewm++ (1.0.16-2) unstable; urgency=medium
+
+  * Fixed g++ 3 build failure. (closes: #133237)
+  * Install in the tmp dir slightly differently (fewer changes to Makefiles)
+
+ -- Chris Boyle <cmb@debian.org>  Sun, 10 Feb 2002 21:18:34 +0000
+
+aewm++ (1.0.16-1) unstable; urgency=low
+
+  * Initial Release. (closes: #127382)
+  * The usual Makefile clean-ups (DESTDIR etc).
+  * Moved config dirs into /etc/X11 and other dirs into /usr/share, for FHS
+    compliance.
+  * Renamed fspanel to aewm++_fspanel, and xsession to aewm++_xsession.
+  * Wrote manpages for appbar, aewm++_fspanel, setrootimage and
+    aewm++_xsession.
+
+ -- Chris Boyle <cmb@debian.org>  Thu,  7 Feb 2002 17:26:04 +0000
--- aewm++-1.1.2.orig/debian/compat
+++ aewm++-1.1.2/debian/compat
@@ -0,0 +1 @@
+7
--- aewm++-1.1.2.orig/debian/aewm++.1x
+++ aewm++-1.1.2/debian/aewm++.1x
@@ -0,0 +1,131 @@
+.\" aewm++ - a minimalistic X11 window manager based on aewm
+.\" by Frank Hale
+.\" Released under the terms of the GNU GPL. www.gnu.org
+.\" Free software! Please see README for details and license. --
+.TH aewm++ 1x
+.SH "NAME"
+aewm++ \- a minimalistic window manager for X11
+.SH "SYNOPSIS"
+.BI aewm++
+-display [display],
+-fn [font],
+-fg|-bg|-bd [color],
+-fm [follow|sloppy|click],
+-bw [width],
+-md [max desktops],
+-tj [left|center|right],
+-es [true|false],
+-wm [true|false],
+-new1|-new2 [cmd],
+-usage,
+-help
+
+.SH DESCRIPTION
+.B aewm++
+is an X11 window manager with a minimal set of features. It provides the most common features found
+a window manager. For instance you can iconify, maximize, shade and close windows. You can separate    
+your windows via virtual desktops. Virtual desktops are separate workspaces in which to perform work. 
+Switching them is as easy as pressing alt+ctrl+page up or alt+ctrl+page down key combinations. By      
+default there are 4 virtual desktops.
+
+aewm++ was written from the aewm source code. The reason behind this is simple. aewm is probably the   
+most popular window manager for hackers to fork and hack on. Many window managers were written from    
+its source. However the source code is in C and there are hackers out there I am sure that would like  
+to hack a small window manager written in C++. Hence aewm++ was born. While aewm has minimal features 
+aewm++ will try to build upon it with more features that the author feels necessary in a good minimal  
+window manager.
+
+The titlebar has a lot of functionality. Double clicking with the 1st button will maximize a window.   
+Double clicking a maximized window returns it to its original size, Double clicking a shaded window    
+unshades the window. Clicking with the first button and dragging will move the window. Using the       
+middle button and clicking the titlebar will shade the window. Do this again on a shaded window and    
+it unshades it. Middle clicking in the box on the right edge of the titlebar will allow you to resize  
+the window. Clicking with the 1st button will iconify the window. Clicking with the 3rd button will    
+delete the window.
+
+If there are windows which are iconified you can press the middle button on the root window and it     
+will pop up an icon menu. Clicking on items in the icon menu will uniconify them.
+
+Virtual Desktops are cycled with the page up and page down keys. If you don't specify the -md [max
+number of desks]  on the command line then you will start with 4 virtual desktops. Currently there     
+is no way to move windows back and forth between desktops. There is also no such thing as sticky       
+windows yet in aewm++.
+
+aewm++ is meant to be used with a 3 button mouse. If you don't have one feel free to hack the code to  
+change the functionality of the buttons.
+
+As of version 1.0.13 there is now an icon menu. If you middle click on the root window you will see    
+the icon menu if you have clients that are iconified. If no clients are iconified you will see nothing. If you middle click on the root window again while the menu is open it will hide. Icons for the current desktop are the only ones that show. Once you switch desktops whatever icons on that desktop will show.
+
+To get the real effect of aewm++ I highly recommend you use it with fspanel. This will give you a nice 
+task bar which will show icons, a clock and buttons to switch virtual desktops.
+
+.SH OPTIONS
+
+.TP
+.B -display \fIdisplay\fP
+Specifies which display to start aewm++ on. This is useful if you want to test aewm++ inside of Xnest. 
+
+.TP
+.B -md \fInumber\fP
+Specifies the number of max virtual desktops to start with. The default number of desktops is 4.
+
+.TP
+.B -tj \fIleft|center|right\fP
+Specifies the text justification for window titles in the titlebar. The options are left, center or    
+right.
+
+.TP
+.B -es \fItrue|false\fP
+Specifies if edge snapping is turned on or not. Edge snapping occurs when a window is dragged within   
+10 pixels of the edge. It is then snapped to the edge. Specify true or false with this option. Default 
+is true.
+
+.TP
+.B -wm \fItrue|false\fP
+Specifies if wire move is on or not. If its off then windows are moved via an opaque move. In other    
+words the entire contents of the window are moved when the window is dragged. You specify true or      
+false with this option. Default is true.
+ 
+.TP
+.B -fn \fIfont-spec\fP
+ Draw window titles with the user defined font.
+
+.TP
+.B -fm \fIfollow|sloppy|click\fP
+Defines what focus model you wish to use. The choices are follow which is focus follows the mouse      
+pointer, sloppy provides focus follows mouse with the exception that the root window doesn't get       
+focus, and last but not least there is click which provides the click to focus model. Clicking on a    
+window will give it focus until another client is clicked then focus is transferred to that client. 
+The default value is "click".
+
+ 
+.TP 
+.B -bw \fIwidth\fP
+Defines how wide window borders will be.
+
+.TP
+.B -new1 \fIcmd\fP, -new2 \fIcmd\fP
+Change the command executed when each mouse button is
+clicked on the root window. Button mouse-3, which is
+modified with option -new2, runs "x-terminal-emulator
+-ls -sb -bg black -fg white" by default.
+
+.TP
+.B -fg \fIcolor\fP, -bg \fIcolor\fP, -bd \fIcolor\fP
+Use
+.I color
+for the foreground, background, and borders of window frames,
+respectively.
+
+.TP
+.B -version
+Print version information to stdout and exit.
+
+.SH "SEE ALSO"
+appbar(1), aewm++_fspanel(1), setrootimage(1), aewm++_xsession(1)
+
+.SH "AUTHOR"
+aewm++ by Frank Hale <frankhale@yahoo.com>
+.SH "WEBSITE"
+http://sapphire.sourceforge.net/
--- aewm++-1.1.2.orig/debian/rules
+++ aewm++-1.1.2/debian/rules
@@ -0,0 +1,76 @@
+#!/usr/bin/make -f
+# Based on 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
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+  COMPILER_FLAGS += CFLAGS="-O0 -g -Wall"
+else
+  COMPILER_FLAGS += CFLAGS="-O2 -g -Wall"
+endif
+
+build: build-stamp
+
+build-stamp:
+	dh_testdir
+
+	# compile the programs
+	$(MAKE) $(COMPILER_FLAGS) ADDITIONAL_CFLAGS=
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	# clean up after the build process
+	[ ! -f Makefile ] || $(MAKE) clean
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs usr/bin
+
+	# install all programs into debian/aewm++
+	$(MAKE) install \
+		prefix=$(CURDIR)/debian/aewm++/usr \
+		XROOT=$(CURDIR)/debian/aewm++/usr \
+		INCLUDES=-I/usr/include/X11 \
+		LDPATH=-L/usr/lib/X11
+
+	mkdir -p $(CURDIR)/debian/aewm++/usr/share/xsessions
+	install -m 644 debian/aewm++.desktop $(CURDIR)/debian/aewm++/usr/share/xsessions/
+
+# Build architecture-independent files here.
+binary-indep: build install
+# nothing to do
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs README
+	dh_installmenu
+	dh_installman debian/aewm++.1x
+	dh_desktop
+	dh_installchangelogs ChangeLog
+	dh_link
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	dh_strip
+endif
+	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
--- aewm++-1.1.2.orig/debian/control
+++ aewm++-1.1.2/debian/control
@@ -0,0 +1,21 @@
+Source: aewm++
+Section: x11
+Priority: optional
+Maintainer: Chris Boyle <cmb@debian.org>
+Build-Depends: debhelper (>= 7), libx11-dev, libxext-dev
+Standards-Version: 3.8.1.0
+Homepage: http://code.google.com/p/aewmpp/
+
+Package: aewm++
+Architecture: any
+Depends: ${shlibs:Depends}
+Suggests: aewm++-goodies
+Provides: x-window-manager
+Description: minimal window manager written in C++
+ aewm++ is a minimal window manager for X11, based on aewm. It keeps aewm's
+ minimalist look and feel but is written in C++, and adds some modern features
+ like virtual desktops. GNOME EWMH hints have been removed in this release,
+ because upstream wants to focus on making the code stable and minimalistic.
+ .
+ This package used to include appbar, aewm++_fspanel, setrootimage and 
+ aewm++_xsession; these can now be found in the aewm++-goodies package.
--- aewm++-1.1.2.orig/debian/README.Debian
+++ aewm++-1.1.2/debian/README.Debian
@@ -0,0 +1,14 @@
+aewm++ for Debian
+-----------------
+
+The four programs that used to be shipped with aewm++
+
+  * appbar
+  * aewm++_fspanel
+  * setrootimage
+  * aewm++_xsession
+
+were removed by upstream some time ago, but they are still available
+in the aewm++-goodies package.
+
+ -- Chris Boyle <cmb@debian.org>, Fri, 11 Mar 2005 12:53:26 +0000
--- aewm++-1.1.2.orig/debian/menu
+++ aewm++-1.1.2/debian/menu
@@ -0,0 +1 @@
+?package(aewm++):needs="wm" section="Window Managers" title="aewm++" command="/usr/bin/aewm++"
--- aewm++-1.1.2.orig/debian/watch
+++ aewm++-1.1.2/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://code.google.com/p/aewmpp/downloads/list (?:.*/)?aewmpp-(.+)\.tar\.gz
