--- wordgrinder-0.3.3.orig/pmfile
+++ wordgrinder-0.3.3/pmfile
@@ -19,7 +19,8 @@
 -- Where do you want WordGrinder installed? By default, it goes into your
 -- home directory.
 
-PREFIX = HOME
+PREFIX = "/usr"
+IPREFIX = "debian/wordgrinder/usr"
 -- PREFIX = "/usr/local"
 
 -- What build flags do you want to use? (Not including -g or -Os, which are
@@ -35,7 +36,7 @@
 -- work. 
 
 CLIBRARIES = {
-	'm',
+	-- 'm', -- unnecessary on Debian
 }
 
 CDEFINES = {
@@ -369,9 +370,9 @@
 install = simple {
 	outputs = {"dummy"},
 	command = {
-		"install -D -m 755 %in[1]% %PREFIX%/bin/wordgrinder",
-		"install -D -m 644 %in[2]% %PREFIX%/man/man1/wordgrinder.1",
-		"install -D -m 644 %in[3]% %PREFIX%/share/doc/wordgrinder/README.wg"
+		"install -D -m 755 %in[1]% %IPREFIX%/bin/wordgrinder",
+		"install -D -m 644 %in[2]% %IPREFIX%/share/man/man1/wordgrinder.1",
+		"install -D -m 644 %in[3]% %IPREFIX%/share/doc/wordgrinder/README.wg"
 	},
 	
 	wordgrinder_release_exe,
--- wordgrinder-0.3.3.orig/debian/docs
+++ wordgrinder-0.3.3/debian/docs
@@ -0,0 +1 @@
+README.wg
--- wordgrinder-0.3.3.orig/debian/watch
+++ wordgrinder-0.3.3/debian/watch
@@ -0,0 +1,5 @@
+# Check upstream for a new version
+
+# Compulsory line, this is a version 3 file
+version=3
+http://sf.net/wordgrinder/wordgrinder-(.*).tar.bz2
--- wordgrinder-0.3.3.orig/debian/compat
+++ wordgrinder-0.3.3/debian/compat
@@ -0,0 +1 @@
+5
--- wordgrinder-0.3.3.orig/debian/dirs
+++ wordgrinder-0.3.3/debian/dirs
@@ -0,0 +1 @@
+usr/bin
--- wordgrinder-0.3.3.orig/debian/menu
+++ wordgrinder-0.3.3/debian/menu
@@ -0,0 +1,2 @@
+?package(wordgrinder):needs="text" section="Applications/Editors"\
+         title="WordGrinder" command="/usr/bin/wordgrinder"
--- wordgrinder-0.3.3.orig/debian/copyright
+++ wordgrinder-0.3.3/debian/copyright
@@ -0,0 +1,36 @@
+This package was debianized by David Given <dg@cowlark.com> on
+Sun, 19 Jan 2008 17:59:44 +0100.
+
+It was downloaded from http://wordgrinder.sourceforge.net
+
+Upstream Author:  David Given <dg@cowlark.com>
+
+
+Copyright © 2007-2009 David Given
+
+License:
+
+You are free to distribute this software under the terms of
+the MIT license.
+
+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 THE
+AUTHORS OR COPYRIGHT HOLDERS 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.
+
+The Debian packaging is © 2009, David Given <dg@cowlark.com> and
+is also covered by the MIT license; see above.
+
--- wordgrinder-0.3.3.orig/debian/changelog
+++ wordgrinder-0.3.3/debian/changelog
@@ -0,0 +1,38 @@
+wordgrinder (0.3.3-1.4.201403141129) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Fri, 14 Mar 2014 11:29:55 +0100
+
+wordgrinder (0.3.3-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- David Given <dg@cowlark.com>  Mon, 14 Dec 2009 21:42:12 +0000
+
+wordgrinder (0.3.2-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- David Given <dg@cowlark.com>  Thu, 19 Feb 2009 23:54:29 +0000
+
+wordgrinder (0.3.1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- David Given <dg@cowlark.com>  Mon, 15 Sep 2008 23:14:39 +0100
+
+wordgrinder (0.2-2) unstable; urgency=low
+
+  * Fixed incorrect Depends: line (Closes: #464002)
+  * Backported fix from upstream about not being able to rebind keys 
+    that had a default keybinding (Closes: #464007)
+
+ -- David Given <dg@cowlark.com>  Mon, 04 Feb 2008 20:45:50 +0000
+
+wordgrinder (0.2-1) unstable; urgency=low
+
+  * Initial release (Closes: #461515)
+
+ -- David Given <dg@cowlark.com>  Sat, 19 Jan 2008 10:13:06 +0000
+
--- wordgrinder-0.3.3.orig/debian/control
+++ wordgrinder-0.3.3/debian/control
@@ -0,0 +1,17 @@
+Source: wordgrinder
+Section: editors
+Priority: optional
+Maintainer: David Given <dg@cowlark.com>
+Build-Depends: debhelper (>= 5), libncursesw5-dev, liblua5.1-0-dev, liblua5.1-filesystem0, lua5.1
+Standards-Version: 3.8.3
+
+Package: wordgrinder
+Architecture: any
+Depends: ${shlibs:Depends}, liblua5.1-filesystem0
+Homepage: http://wordgrinder.sourceforge.net
+Description: a simple word processor that runs in a terminal
+ WordGrinder is a simple, Unicode-aware word processor that runs in a
+ terminal. It supports basic paragraph styles, character styles, just
+ enough screen markup to be useful, and is driven via an easy to use
+ menu interface.
+
--- wordgrinder-0.3.3.orig/debian/rules
+++ wordgrinder-0.3.3/debian/rules
@@ -0,0 +1,62 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# debian/rules file for wordgrinder.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+CFLAGS = -Wall -g
+
+configure:
+	dh_testdir
+	
+build: build-stamp
+
+build-stamp:
+	dh_testdir
+	./pm wordgrinder_release_exe
+	touch $@
+
+clean:
+	dh_testdir
+	dh_testroot
+	
+	rm -f build-stamp
+	rm -rf .pm-cache
+	rm -f .pm*
+	rm -rf bin
+
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+	./pm install
+
+binary-indep: build install
+	# none
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs README.Unix
+	dh_installchangelogs
+	dh_installmenu
+	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 
