typespeed (0.6.5-1.1) debian-dir only changes

Summary

 debian/README.Debian                                      |   27 +
 debian/README.source                                      |    9 
 debian/changelog                                          |  335 ++++++++++++++
 debian/compat                                             |    1 
 debian/control                                            |   18 
 debian/copyright                                          |   33 +
 debian/dirs                                               |    2 
 debian/docs                                               |    3 
 debian/gbp.conf                                           |    8 
 debian/menu                                               |    2 
 debian/patches/0001-fix-typo-in-Italian-translation.patch |   25 +
 debian/patches/0002-set-default-config.patch              |   20 
 debian/patches/series                                     |    1 
 debian/postinst                                           |   60 ++
 debian/postrm                                             |    9 
 debian/rules                                              |   70 ++
 debian/watch                                              |    5 
 17 files changed, 628 insertions(+)

    
download this patch

Patch contents

--- typespeed-0.6.5.orig/debian/control
+++ typespeed-0.6.5/debian/control
@@ -0,0 +1,18 @@
+Source: typespeed
+Build-Depends: debhelper (>= 5), quilt (>= 0.46-7), libncurses5-dev
+Section: games
+Priority: optional
+Maintainer: Dafydd Harries <daf@debian.org>
+Standards-Version: 3.8.4
+Homepage: http://tobias.eyedacor.org/typespeed/
+Vcs-Git: git://git.debian.org/git/collab-maint/typespeed
+Vcs-Browser: http://git.debian.org/?p=collab-maint/typespeed.git
+
+Package: typespeed
+Architecture: any
+Depends: fileutils (>= 4.0-5) | coreutils (>> 5), ${misc:Depends}, ${shlibs:Depends}
+Conflicts: suidmanager (<< 0.50)
+Description: Zap words flying across the screen by typing them correctly
+ Typespeed is a game in which words fly across your screen. Your task is to
+ zap the words by typing them before they cross the screen. If too many words
+ get by you, the game is over.
--- typespeed-0.6.5.orig/debian/README.Debian
+++ typespeed-0.6.5/debian/README.Debian
@@ -0,0 +1,27 @@
+typespeed for Debian
+--------------------
+
+If you use /etc/typespeedrc or ~/.typespeedrc to configure typespeed, take
+note: The directory for wordfiles (and high score files) are currently hard
+coded in the binary, and cannot be changed. This is caused by a little bit of
+hacking done to make typespeed conform to Debian policy, namely forcing the
+word files and the highscore files to be stored in separate directories.
+
+High score files are stored in /var/games/typespeed and word lists are stored
+in /usr/share/games/typespeed.
+
+Currently, /usr/share/games/typespeed/words.* are not registered as conffiles.
+All changes you make there will be lost. If you have ideas on how to allow
+changes but *not* create extra files in /usr/share/games/typespeed, please let
+me know. Extra files cannot be created there or else typespeed will become
+confused.
+
+In typespeed 0.3.5-3, there was a bug in the post-installation setup script
+(postinst) that caused several files high.words.* to be created in the root
+directory. These are harmless and should be removed.
+
+Downgrading from 0.4.1-2 to previous versions is unsupported, as high score
+files will be lost due to the migration to /var/games/typespeed in this
+version.
+
+ -- Dafydd Harries <daf@muse.19inch.net> Wed, 24 Mar 2004 01:16:55 +0000
--- typespeed-0.6.5.orig/debian/docs
+++ typespeed-0.6.5/debian/docs
@@ -0,0 +1,3 @@
+README
+TODO
+BUGS
--- typespeed-0.6.5.orig/debian/dirs
+++ typespeed-0.6.5/debian/dirs
@@ -0,0 +1,2 @@
+usr/games
+usr/lib/typespeed
--- typespeed-0.6.5.orig/debian/copyright
+++ typespeed-0.6.5/debian/copyright
@@ -0,0 +1,33 @@
+
+This package is built from sources obtained from:
+
+  http://tobias.eyedacor.org/typespeed/
+
+This package is maintained by Dafydd Harries <daf@debian.org>. It was
+previously maintained by William Ono <wmono@debian.org>, who originally created
+it on Fri, 16 Jul 1999 23:43:13 -0700.
+
+Copyright:
+
+  Copyright (C) 1999-2004   Jani Ollikainen & Jaakko Manelius
+  Copyright (C) 2006        Tobias Stoeckmann
+
+Contact address: tobias at bugol dot de
+
+Licence:
+
+  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 GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+The packaging is available under the same licence as the original software.
+
--- typespeed-0.6.5.orig/debian/watch
+++ typespeed-0.6.5/debian/watch
@@ -0,0 +1,5 @@
+version=3
+http://tobias.eyedacor.org/typespeed/ \
+	typespeed-(.*)\.tar\.gz \
+	debian \
+	uupdate
--- typespeed-0.6.5.orig/debian/menu
+++ typespeed-0.6.5/debian/menu
@@ -0,0 +1,2 @@
+?package(typespeed):needs="text" section="Games/Action"\
+  title="Typespeed" command="/usr/games/typespeed"
--- typespeed-0.6.5.orig/debian/postrm
+++ typespeed-0.6.5/debian/postrm
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+if test "$1" = "purge"; then
+	rm -rf /var/games/typespeed
+	rm -f /var/games/typespeed.score
+fi
+
+#DEBHELPER#
+
--- typespeed-0.6.5.orig/debian/gbp.conf
+++ typespeed-0.6.5/debian/gbp.conf
@@ -0,0 +1,8 @@
+[DEFAULT]
+debian-branch = master
+upstream-branch = upstream
+pristine-tar = True
+
+[git-buildpackage]
+tarball-dir = ../tarballs/
+export-dir = ../build-area/
--- typespeed-0.6.5.orig/debian/compat
+++ typespeed-0.6.5/debian/compat
@@ -0,0 +1 @@
+5
--- typespeed-0.6.5.orig/debian/README.source
+++ typespeed-0.6.5/debian/README.source
@@ -0,0 +1,9 @@
+Patches are applied using quilt. For information on quilt, see:
+
+  /usr/share/doc/quilt/README.source
+
+However, debian/patches is generated from the 'patches' git branch as follows:
+
+  $ rm debian/patches/*
+  $ git format-patch -o debian/patches ..patches
+  $ ls debian/patches/*.patch > debian/patches/series
--- typespeed-0.6.5.orig/debian/changelog
+++ typespeed-0.6.5/debian/changelog
@@ -0,0 +1,335 @@
+typespeed (0.6.5-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "package purge (after dependencies removal) fails": fix postrm to not
+    fail in case where /var/games/typespeed doesn't exist; patch by Johann
+    Felix Soden (closes: #574192).
+
+ -- gregor herrmann <gregoa@debian.org>  Sat, 17 Apr 2010 16:16:37 +0200
+
+typespeed (0.6.5-1) unstable; urgency=high
+
+  * New upstream version. Closes: #561671.
+  * Import into git.
+  * Use quilt for patches.
+  * Fix typo in Italian translation. Closes: #561672.
+  * Update for standards version 3.8.4:
+    - Add debian/README.source file.
+
+ -- Dafydd Harries <daf@debian.org>  Fri, 12 Feb 2010 23:01:40 -0500
+
+typespeed (0.6.4-2) unstable; urgency=high
+
+  * High priority so that fix for #454527 gets into testing.
+  * Make postinst not fail in case where old /var/games/typespeed directory
+    doesn't exist. Closes: #454963.
+  * Make typespeed executable sgid games so that it can write high score file.
+
+ -- Dafydd Harries <daf@debian.org>  Sat, 08 Dec 2007 14:57:56 +0000
+
+typespeed (0.6.4-1) unstable; urgency=high
+
+  * New upstream release. Closes: #375136.
+    - High priority due to fix for DoS attack. Closes: #454527
+      (CVE-2007-6220).
+    - Fixes segfault when $HOME is unset. Closes: #355887.
+    - Adds Italian and French word lists, Dutch word file merged.
+  * New upstream maintainer.
+    - Update homepage URL, debian/copyright, debian/watch.
+    - This version is not network-compatible with versions prior to 0.5.2.
+    - Stricter network code.
+    - Improved memory management.
+  * High score file format has changed: install score conversion program to
+    /usr/lib/typespeed and run it when package is configured.
+  * postinst:
+    - Remove obsolete score file backup/create/restore code.
+    - Add code to upgrade score files to the new text-based format.
+  * rules:
+    - Update to new autotools build.
+    - Put stamp files in debian/.
+    - Support DEB_BUILD_OPTS=noopt.
+  * Remove unnecessary debian/install.
+  * Update man page installation.
+  * Change menu file to Games/Action section as per new menu policy.
+  * Bump to debhelper compat version 5.
+  * Bump standards version to 3.7.3.
+
+ -- Dafydd Harries <daf@debian.org>  Fri, 07 Dec 2007 05:14:13 +0000
+
+typespeed (0.4.4-10) unstable; urgency=high
+
+  * High urgency due to security fix.
+  * Apply patch from Niko Tyni to fix buffer overflow (CVE-2006-1515).
+
+ -- Dafydd Harries <daf@debian.org>  Fri,  5 May 2006 17:31:42 +0100
+
+typespeed (0.4.4-9) unstable; urgency=low
+
+  * Rebuild with newer debhelper so that menu file gets installed in
+    /usr/share. Also, capitalise "Typespeed" in the menu entry.
+    Closes: #357805.
+  * debian/control: Update email address; bump standards version (no changes).
+
+ -- Dafydd Harries <daf@debian.org>  Sat, 25 Mar 2006 23:23:40 +0000
+
+typespeed (0.4.4-8) unstable; urgency=high
+
+  * Security upload.
+  * Applied patch by Ulf Härnhammar to fix a format string vulnerability in
+    file.c. (CAN-2005-0105) Closes: #295556.
+
+ -- Dafydd Harries <daf@muse.19inch.net>  Wed, 16 Feb 2005 22:15:38 +0200
+
+typespeed (0.4.4-7) unstable; urgency=low
+
+  * Add a watch file.
+  * Update the upstream URL in the copyright fiile.
+  * Add a new description with the package's homepage.
+  * Declare CFLAGS as a variable in debian/rules so that it can be overridden
+    rather than just passing the desired flags to the recursive make
+    invocation.
+
+ -- Dafydd Harries <daf@muse.19inch.net>  Sun,  1 Aug 2004 01:39:38 +0100
+
+typespeed (0.4.4-6) unstable; urgency=low
+
+  * debian/postinst:
+    - Only do configuration things when called with "configure".
+    - Don't fail if there are no high score files to move.
+  * debian/changelog:
+    - Insert entries by security team that went missing.
+
+ -- Dafydd Harries <daf@muse.19inch.net>  Wed, 24 Mar 2004 14:33:11 +0000
+
+typespeed (0.4.4-5) unstable; urgency=low
+
+  * Seems using dpkg-statoverride was the wrong thing to do.
+    - debian/postinst, debian/postrm: Remove calls to dpkg-statoverride.
+    - debian/rules: Call chmod instead for correct permissions.
+
+ -- Dafydd Harries <daf@muse.19inch.net>  Wed, 24 Mar 2004 12:55:44 +0000
+
+typespeed (0.4.4-4) unstable; urgency=low
+
+  * debian/postinst: Rewritten; hopefully saner now:
+    - No longer tries to clean up files mis-installed by 0.3.5.3 - the note in
+      README.Debian about it remains.
+    - Don't try to compare md5sums of high score files - my understanding is
+      that they're arch-specific anhow. Simply back up existing ones, create
+      new ones, and restore the backups - this will create empty high score
+      files for new word lists while preserving old high score files from
+      previous versions.
+  * debian/postrm: Generalise high score file removal.
+  * debian/menu: Add quotes in order to satisfy lintian.
+  * debian/control: Add versioned dependency on debhelper (>> 4).
+  * debian/README.Debian: Tidying up; update name and timestamp.
+  * debian/rules: Remove stamp files earlier on, in accordance with policy,
+    other small tidyings up.
+  * debian/copyright: Fix typo, some tidying up.
+
+ -- Dafydd Harries <daf@muse.19inch.net>  Wed, 24 Mar 2004 01:51:38 +0000
+
+typespeed (0.4.4-3) unstable; urgency=low
+
+  * Clean up debian/rules.
+  * Use dh_install and friends rather than cp, chown and chmod.
+  * Use dpkg-statoverride for special permissions.
+  * Convert debian/changelog to UTF-8.
+
+ -- Dafydd Harries <daf@muse.19inch.net>  Tue, 23 Dec 2003 15:44:45 +0000
+
+typespeed (0.4.4-2) unstable; urgency=low
+
+  * Fix botching of words.dut by myself. Just use upstream version.
+  * Tidy up copyright file.
+  * New email address.
+
+ -- Dafydd Harries <daf@muse.19inch.net>  Thu, 18 Dec 2003 19:11:09 +0000
+
+typespeed (0.4.4-1) unstable; urgency=low
+
+  * New maintainer (closes: #219064).
+  * New upstream release (closes: #198078).
+  * Timing issues on Sparc fixed upstream (closes: #190044).
+  * Problems with long word files fixed upstream (closes: #176136).
+  * Most of words.dut has been added upstream.
+  * Added versioned dependency on coreutils to satisfy lintian.
+  * Amended copyright file to satisty lintian.
+  * Standards version updated to 3.6.1.
+
+ -- Dafydd Harries <daf@parnassus.ath.cx>  Tue, 04 Nov 2003 22:35:16 +0000
+
+typespeed (0.4.2-2) unstable; urgency=low
+
+  * Fixes security hole reported by jaguar <badc0ded@myrealbox.com>
+
+ -- William Ono <wmono@debian.org>  Sat, 21 Dec 2002 19:57:18 -0800
+
+typespeed (0.4.2-1) unstable; urgency=low
+
+  * New upstream release
+  * Updated dependencies to fileutils | coreutils (Closes: #167492)
+  * Includes updated words.dut from Wouter de Vries
+  * Bumped Standards-Version: to 3.5.7
+
+ -- William Ono <wmono@debian.org>  Sat,  2 Nov 2002 13:33:52 -0800
+
+typespeed (0.4.1-3) unstable; urgency=low
+
+  * Fixes crash due to freeing wrong piece of memory
+    (Closes: #147547)  Thanks to Andreas Jonsson <aj@cdt.luth.se>
+
+ -- William Ono <wmono@debian.org>  Mon, 20 May 2002 11:44:13 -0700
+
+typespeed (0.4.1-2.2) stable-security; urgency=high
+
+  * Non-maintainer upload by the Security Team
+  * Fix more buffer overflows in net_swapscore [network.c]
+
+ -- Matt Zimmerman <mdz@debian.org>  Fri, 13 Jun 2003 21:24:17 -0400
+
+typespeed (0.4.1-2.1) stable-security; urgency=high
+
+  * Non-maintainer upload by the Security Team
+  * Applied upstream patch to fix buffer overflows
+  * Added code to remove any trailing newlines from the path
+  * Applied upstream patch to fix a SIGSEGV bug (wrong variable in for loop)
+  * Updated source URL
+
+ -- Martin Schulze <joey@infodrom.org>  Fri, 20 Dec 2002 19:38:52 +0100
+
+typespeed (0.4.1-2) unstable; urgency=low
+
+  * Now includes words.dut from Wouter de Vries <sax@debian.org>
+  * Migration from /var/lib/games/typespeed to /var/games/typespeed
+    for FHS compliance (Closes: #110221)
+
+ -- William Ono <wmono@debian.org>  Fri,  4 Jan 2002 12:29:42 -0800
+
+typespeed (0.4.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Bashisms removed from debian/rules.
+
+ -- William Ono <wmono@debian.org>  Wed, 27 Jun 2001 20:38:35 -0700
+
+typespeed (0.4.0-7) unstable; urgency=low
+
+  * Removed dh_suidregister and added Conflicts: suidmanager (<< 0.50)
+    (Closes: #84672)
+
+ -- William Ono <wmono@debian.org>  Fri, 23 Feb 2001 16:10:23 -0800
+
+typespeed (0.4.0-6) unstable; urgency=low
+
+  * Appologies to everyone involved for not uploading this sooner; it was
+    sitting ready to go in my home directory, but it had slipped my mind.
+  * Did s/char merkk/int merkk/ in file.c and removed now obsolete
+    flag -fsigned-char as per suggestion from C.M. Connelly <c@eskimo.com>
+    in Bug#66316.  This does not close the bug, as typespeed is still
+    unusable on PowerPC and possibly other bigendian architectures.
+  * Set Build-Depends: libncurses5-dev instead of libncurses-dev to force
+    libncurses5 to be used.  (Closes: #79743)
+
+ -- William Ono <wmono@debian.org>  Fri, 29 Dec 2000 15:55:24 -0800
+
+typespeed (0.4.0-5) frozen unstable; urgency=low
+
+  * postinst now uses --makescorefiles to generate appropriate high score
+    files for each architecture.  This allows typespeed to actually function
+    on non-i386 machines.  Nothing else has been touched, so this should be
+    safe to install in frozen(potato).  (Closes: #61890)
+  * bashisms fixed in postinst and postrm (Closes: #63109)
+
+ -- William Ono <wmono@debian.org>  Sun, 18 Jun 2000 11:11:07 -0700
+
+typespeed (0.4.0-4) frozen unstable; urgency=low
+
+  * Now compiled with -fsigned-char to avoid problems on powerpc
+    (Closes: #61891)
+
+ -- William Ono <wmono@debian.org>  Sat,  8 Apr 2000 18:51:31 -0700
+  
+typespeed (0.4.0-3) frozen unstable; urgency=low
+
+  * Added Depends: fileutils (>=4.0-5) so the postrm script
+    doesn't fail miserably in some cases.  (Closes: #61126)
+
+ -- William Ono <wmono@debian.org>  Sun, 26 Mar 2000 12:39:18 -0800
+
+typespeed (0.4.0-2) unstable; urgency=low
+
+  * Set Build-Depends in debian/control
+
+ -- William Ono <wmono@debian.org>  Sun, 19 Mar 2000 20:22:09 -0800
+
+typespeed (0.4.0-1) unstable; urgency=low
+
+  * New upstream version.  Re-added directory kludges. (see 0.3.4-1)
+  * Some descriptions changed to reflect changes in code and gameplay.
+  * Uses manpage provided by authors.  (Section changed from 1 to 6.)
+
+ -- William Ono <wmono@debian.org>  Mon, 10 Jan 2000 18:09:49 -0800
+
+typespeed (0.3.5-7) unstable; urgency=low
+
+  * Changed the package description in debian/control to make more sense
+  * Policy: 3.0.1
+
+ -- William Ono <wmono@debian.org>  Thu, 21 Oct 1999 01:27:36 -0700
+
+typespeed (0.3.5-6) unstable; urgency=low
+
+  * Moved information about modifications to the source back to the
+    copyright file from README.Debian to comply with policy
+  * Added note in README.Debian and warning in postinst about bug in
+    0.3.5-3 (Closes: #45305)
+  * Added Danish translation of Peter Maydell's manpage by Bo Vagner Højer.
+
+ -- William Ono <wmono@debian.org>  Mon, 27 Sep 1999 22:38:04 -0700
+
+typespeed (0.3.5-5) unstable; urgency=low
+
+  * Now includes manpage written by Peter Maydell (Closes: #43276)
+
+ -- William Ono <wmono@debian.org>  Fri, 10 Sep 1999 15:22:58 -0700
+
+typespeed (0.3.5-4) unstable; urgency=low
+
+  * Fixes dumb bug in postinst: now does cd to correct directory
+    (Closes: #44814)
+
+ -- William Ono <wmono@debian.org>  Fri, 10 Sep 1999 14:40:12 -0700
+
+typespeed (0.3.5-3) unstable; urgency=low
+
+  * Now removes /var/lib/games/typespeed on purge.
+  * Reversed the movement of information made in 0.3.5-2
+  * copyright now refers to /usr/share/common-licenses/GPL
+
+ -- William Ono <wmono@debian.org>  Sun,  5 Sep 1999 10:33:25 -0700
+
+typespeed (0.3.5-2) unstable; urgency=low
+
+  * Moved information about modification made in 0.3.4-1 into
+    copyright from README.Debian.
+  * Now creates missing /var/lib/games/typespeed/high.words.* in postinst
+    to avoid making the high score files conffiles.
+
+ -- William Ono <wmono@debian.org>  Fri,  6 Aug 1999 16:18:22 -0700
+
+typespeed (0.3.5-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- William Ono <wmono@debian.org>  Sun,  1 Aug 1999 00:46:59 -0700
+
+typespeed (0.3.4-1) unstable; urgency=low
+
+  * Initial Debian package release.
+  * Directories for high score files and word list files were hard-coded
+    using #ifdef DEBIAN.  This is a nasty kludge that avoids typespeed's
+    need to have all of its files in the same directory.
+
+ -- William Ono <wmono@debian.org>  Fri, 16 Jul 1999 23:43:13 -0700
+
--- typespeed-0.6.5.orig/debian/rules
+++ typespeed-0.6.5/debian/rules
@@ -0,0 +1,70 @@
+#!/usr/bin/make -f
+
+CFLAGS = -Wall -W -pedantic -std=c99 -g -D_GNU_SOURCE
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS += -O0
+else
+CFLAGS += -O2
+endif
+
+patch:
+	dh_quilt_patch
+
+unpatch:
+	dh_quilt_unpatch
+
+config.log: patch
+	./configure --prefix=/usr --bindir=/usr/games --localstatedir=/var \
+		--sysconfdir=/etc
+
+debian/build-stamp: config.log
+	dh_testdir
+	$(MAKE) CFLAGS="$(CFLAGS)"
+	touch debian/build-stamp
+
+build: debian/build-stamp
+
+clean: config.log
+	dh_testdir
+	dh_testroot
+	rm -f debian/build-stamp debian/install-stamp
+	$(MAKE) distclean
+	dh_quilt_unpatch
+	dh_clean
+
+debian/install-stamp: debian/build-stamp
+	dh_testdir
+	dh_testroot
+	dh_installdirs
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/typespeed
+	cp src/convert debian/typespeed/usr/lib/typespeed/convert
+	rm debian/typespeed/var/games/typespeed.score
+	touch debian/install-stamp
+
+install: debian/install-stamp
+
+binary-indep: install
+
+binary-arch: install
+	dh_testdir
+	dh_testroot
+	dh_installdocs
+	dh_installmenu
+	dh_installman man/typespeed.6
+	dh_installchangelogs
+	dh_strip
+	dh_compress
+	dh_fixperms
+	chown root:games debian/typespeed/usr/games/typespeed
+	chmod g+s        debian/typespeed/usr/games/typespeed
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+
+.PHONY: build clean binary-indep binary-arch binary patch unpatch
+
--- typespeed-0.6.5.orig/debian/postinst
+++ typespeed-0.6.5/debian/postinst
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+set -e
+
+# Older (0.4 and earlier) versions of Typespeed used a directory containing a
+# number of binary high score files, one per word list. The Typespeed pacakge
+# used to put them in $OLDDIR, which was later moved to $NEWDIR for FHS
+# compliance. Newer (post-0.6) versions of Typespeed use a single text-based
+# file at $SCOREFILE.
+
+OLDDIR=/var/lib/games/typespeed
+NEWDIR=/var/games/typespeed
+SCOREFILE=/var/games/typespeed.score
+
+if test "$1" = "configure"; then
+	if test -e $OLDDIR; then
+		# Move high score files created by older versions to the new,
+		# FHS-compliant location.
+
+		# If the old high score directory exists, find all high score
+		# files in it and move then to the new high score directory
+		# unless a file with the same name already exists there.
+
+		mkdir -p $NEWDIR
+		find $OLDDIR \
+			-name 'high.words.*' \
+			-exec sh -c 'test ! -e `basename {}`' \
+			-exec mv '{}' $NEWDIR ';'
+
+		# Try and delete the old high score directory if it exists,
+		# but don't worry if deletion fails.
+
+		rmdir --ignore-fail-on-non-empty $OLDDIR
+	fi
+
+	# Ensure new high score file exists and has proper permissions.
+
+	if ! test -e $SCOREFILE; then
+		touch $SCOREFILE
+		chown root:games $SCOREFILE
+		chmod 664 $SCOREFILE
+	fi
+
+	if test -e $NEWDIR; then
+		# Fix permissions.
+
+		find $NEWDIR -name 'high.words.*' \
+			-exec chown root:games '{}' ';' \
+			-exec chmod 664 '{}' ';'
+
+		# If new high score file is empty, convert any old high score
+		# files to the new format.
+
+		test ! -s $SCOREFILE && \
+			/usr/lib/typespeed/convert $NEWDIR $SCOREFILE
+	fi
+fi
+
+#DEBHELPER#
+
--- typespeed-0.6.5.orig/debian/patches/0001-fix-typo-in-Italian-translation.patch
+++ typespeed-0.6.5/debian/patches/0001-fix-typo-in-Italian-translation.patch
@@ -0,0 +1,25 @@
+From acacfd1230cd1a835e6d9ea5d1df0adcf19fccc9 Mon Sep 17 00:00:00 2001
+From: Dafydd Harries <daf@debian.org>
+Date: Fri, 12 Feb 2010 21:18:49 -0500
+Subject: [PATCH 1/2] fix typo in Italian translation
+
+---
+ po/it.po |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/po/it.po b/po/it.po
+index 0373d75..488d0f8 100644
+--- a/po/it.po
++++ b/po/it.po
+@@ -172,7 +172,7 @@ msgstr "1. Colori"
+ 
+ #: src/menu.c:426
+ msgid "2. Cheat"
+-msgstr "3. Cheat"
++msgstr "2. Cheat"
+ 
+ #: src/menu.c:427
+ msgid "3. Return"
+-- 
+1.6.6.1
+
--- typespeed-0.6.5.orig/debian/patches/0002-set-default-config.patch
+++ typespeed-0.6.5/debian/patches/0002-set-default-config.patch
@@ -0,0 +1,20 @@
+From 47330dd37dad8207990f55bc9c4bc96e97fd3b4d Mon Sep 17 00:00:00 2001
+From: Dafydd Harries <daf@debian.org>
+Date: Fri, 12 Feb 2010 22:43:05 -0500
+Subject: [PATCH 2/2] set default config
+
+---
+ etc/typespeedrc |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/etc/typespeedrc b/etc/typespeedrc
+index e69de29..1ab93e9 100644
+--- a/etc/typespeedrc
++++ b/etc/typespeedrc
+@@ -0,0 +1,3 @@
++cheat = no
++ruledir = /usr/share/typespeed/rules
++worddir = /usr/share/typespeed/words
+-- 
+1.6.6.1
+
--- typespeed-0.6.5.orig/debian/patches/series
+++ typespeed-0.6.5/debian/patches/series
@@ -0,0 +1 @@
+0001-fix-typo-in-Italian-translation.patch