--- bastet-0.41.orig/debian/patches/series
+++ bastet-0.41/debian/patches/series
@@ -0,0 +1,2 @@
+01_Makefile.patch -p1
+02_kFreeBSD_FTBFS_fix.patch -p1
--- bastet-0.41.orig/debian/patches/01_Makefile.patch
+++ bastet-0.41/debian/patches/01_Makefile.patch
@@ -0,0 +1,40 @@
+# 01_Makefile.patch
+# by:
+# David Moreno Garza <damog@damog.net>
+# Nacho Barrientos Arias <chipi@criptonita.com>
+#
+# Desc: Adding destdir and fixing some perms.
+
+Index: bastet-0.41/Makefile
+===================================================================
+--- bastet-0.41.orig/Makefile 2004-10-19 19:54:58.000000000 +0200
++++ bastet-0.41/Makefile 2008-01-27 15:55:35.000000000 +0100
+@@ -1,8 +1,8 @@
+ #makefile for bastet (c) 2004 Federico Poloni
+
+ #default paths
+-BIN_PREFIX=/usr/bin/
+-DATA_PREFIX=/var/games/
++BIN_PREFIX=$(DESTDIR)/usr/games/
++DATA_PREFIX=$(DESTDIR)/var/games/
+ HISCORE=bastet.scores
+
+ #in order to handle highscores properly, bastet must be setuid.
+@@ -11,7 +11,7 @@
+ GAME_USER=games
+
+ CC=gcc
+-CFLAGS=-Wall -DHIGHSCORE_FILE=\"$(DATA_PREFIX)$(HISCORE)\"
++CFLAGS=-Wall -DHIGHSCORE_FILE=\"$(DATA_PREFIX)$(HISCORE)\" $(DEBCFLAGS)
+ LDFLAGS=-lncurses
+ SOURCES=main.c game.c highscore.c bast.c
+ EXNAME=bastet
+@@ -39,8 +39,3 @@
+
+ install: $(EXNAME)
+ cp $(EXNAME) $(BIN_PREFIX)
+- chown $(GAME_USER) $(BIN_PREFIX)$(EXNAME)
+- chmod u+s $(BIN_PREFIX)$(EXNAME)
+- touch $(DATA_PREFIX)$(HISCORE)
+- chown $(GAME_USER) $(DATA_PREFIX)$(HISCORE)
+- chmod 644 $(DATA_PREFIX)$(HISCORE)
--- bastet-0.41.orig/debian/patches/02_kFreeBSD_FTBFS_fix.patch
+++ bastet-0.41/debian/patches/02_kFreeBSD_FTBFS_fix.patch
@@ -0,0 +1,21 @@
+# 02_kFreeBSD_FTBFS_fix.patch
+# by:
+# Robert Millan <rmh@aybabtu.com>
+# David Moreno Garza <damog@damog.net>
+# Nacho Barrientos Arias <chipi@criptonita.com>
+#
+# Desc: Fixes #316921.
+
+Index: bastet-0.41/bast.c
+===================================================================
+--- bastet-0.41.orig/bast.c 2007-07-09 21:13:21.000000000 +0200
++++ bastet-0.41/bast.c 2007-07-09 21:13:33.000000000 +0200
+@@ -1,7 +1,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <ncurses.h>
+-#include <termio.h>
++#include <termios.h>
+ #include <assert.h>
+ #include <unistd.h>
+ #include <string.h>
--- bastet-0.41.orig/debian/control
+++ bastet-0.41/debian/control
@@ -0,0 +1,21 @@
+Source: bastet
+Section: games
+Priority: optional
+Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
+Uploaders: Nacho Barrientos Arias <nacho@debian.org>
+Build-Depends: debhelper (>= 5), libncurses5-dev | libncurses-dev, quilt (>= 0.40)
+Standards-Version: 3.7.3
+Homepage: http://fph.altervista.org/prog/bastet.shtml
+Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/bastet/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/bastet/?op=log
+
+Package: bastet
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Free clone of Tetris, featuring a bastard level
+ Bastet (stands for "bastard Tetris") is a free (GPL'd) clone of Tetris(r)
+ (built on the top of petris by Peter Seidler) which is designed to be
+ "as bastard as possible": it tries to compute how useful blocks are and
+ gives you the worst, the most bastard it can find. Playing bastet can be
+ a painful experience, especially if you usually make "canyons" and wait for
+ the long I-shaped block.
--- bastet-0.41.orig/debian/compat
+++ bastet-0.41/debian/compat
@@ -0,0 +1 @@
+5
--- bastet-0.41.orig/debian/postinst
+++ bastet-0.41/debian/postinst
@@ -0,0 +1,23 @@
+#! /bin/sh
+# postinst script for bastet
+
+set -e
+
+scores=/var/games/bastet.scores
+
+# old version of bastet (< 0.41-6) will remove high score file
+# on upgrade, so rescue it
+if $(dpkg --compare-versions "$2" lt-nl 0.41-6) && [ -e "$scores.tmp" ] ; then
+ mv "$scores.tmp" "$scores"
+fi
+if [ ! -e "$scores" ] ; then
+
+ touch "$scores"
+ chgrp games "$scores"
+ chmod 664 "$scores"
+fi
+
+#DEBHELPER#
+
+exit 0
+
--- bastet-0.41.orig/debian/preinst
+++ bastet-0.41/debian/preinst
@@ -0,0 +1,21 @@
+#! /bin/sh
+# preinst script for bastet
+
+set -e
+
+scores=/var/games/bastet.scores
+
+case "$1" in
+ install|upgrade)
+ # old version of bastet (< 0.41-6) will remove high score file
+ # on upgrade, so rescue it
+ if $(dpkg --compare-versions "$2" lt-nl 0.41-6) && [ -e "$scores" ] ; then
+ cp -p "$scores" "$scores.tmp"
+ fi
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
--- bastet-0.41.orig/debian/postrm
+++ bastet-0.41/debian/postrm
@@ -0,0 +1,13 @@
+#! /bin/sh
+# postrm script for bastet
+
+set -e
+
+if [ "$1" = purge ] ; then
+ rm -f /var/games/bastet.scores
+fi
+
+#DEBHELPER#
+
+exit 0
+
--- bastet-0.41.orig/debian/bastet.desktop
+++ bastet-0.41/debian/bastet.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=Bastard Tetris
+GenericName=bastet
+Comment=Go mad with this Tetris clone
+Exec=bastet
+Icon=bastet
+Terminal=true
+Categories=Game;BlocksGame;
--- bastet-0.41.orig/debian/changelog
+++ bastet-0.41/debian/changelog
@@ -0,0 +1,91 @@
+bastet (0.41-6) unstable; urgency=low
+
+ [ Barry deFreese ]
+ * Fix up desktop file (Encoding is deprecated now)
+ * Add watch file
+ * Add Homepage field in control section
+ * Man page grammar and spelling clean-up. (Closes: #457823).
+
+ [ Ansgar Burchardt ]
+ * Added Vcs-Svn and Vcs-Browser fields in the control file.
+ * Don't distribute score file, create in postinst instead (Closes: #461626).
+ * Update Debian Standards version to 3.7.3
+ * Remove Homepage reference from long description
+ * Remove redundant -Wall from DEPCFLAGS
+
+ [ Nacho Barrientos Arias ]
+ * Changes look OK, uploading.
+
+ -- Nacho Barrientos Arias <nacho@debian.org> Sun, 02 Mar 2008 12:09:40 +0100
+
+bastet (0.41-5) unstable; urgency=low
+
+ * debian/control
+ - New comaintainer email address.
+ - Switching to quilt.
+ * debian/menu
+ - Games::Tetris-Like no longer exists, switching to Games::Blocks
+ according to Debian menu transition.
+ <http://lists.debian.org/debian-devel-announce/2007/07/msg00000.html>
+ - Capitalizing the title.
+ * debian/rules, debian/*.desktop, debian/install
+ - Added a .desktop file.
+
+ -- Nacho Barrientos Arias <nacho@debian.org> Mon, 09 Jul 2007 21:16:13 +0200
+
+bastet (0.41-4) unstable; urgency=low
+
+ * New maintainer (closes: #387203).
+ - See http://lists.debian.org/debian-devel/2006/09/msg00330.html
+ - Adding this game to Debian Games Team.
+ * debian/control
+ - Bumping standards version to 3.7.2.
+ - Promoting Debhelper version to 5.
+ - Adding dpatch as build-dep.
+ - Adding homepage URL.
+ * debian/rules
+ - Using mrproper instead of clean.
+ - Patches are now managed by dpatch.
+ - Minor repairs.
+ * debian/docs
+ - Removed TODO from installation list.
+ * debian/copyright
+ - Rewritten.
+
+ -- Nacho Barrientos Arias <chipi@criptonita.com> Wed, 13 Sep 2006 00:55:27 +0200
+
+bastet (0.41-3) unstable; urgency=low
+
+ * Maintainer address changed.
+
+ -- David Moreno Garza <damog@debian.org> Sat, 20 Aug 2005 18:22:26 -0500
+
+bastet (0.41-2) unstable; urgency=low
+
+ * Changed termio.h to termios.h to fix FTBFS on kFreeBSD (Closes: #316921).
+ * Updated Standards-Version.
+ * Added sponsor as Uploader field on debian/control.
+
+ -- David Moreno Garza <damog@damog.net> Mon, 4 Jul 2005 15:51:17 -0500
+
+bastet (0.41-1) unstable; urgency=low
+
+ * New upstream release.
+ * Uploaded by Gunnar Wolf <gwolf@debian.org>
+
+ -- David Moreno Garza <damog@damog.net> Thu, 21 Oct 2004 12:37:08 -0500
+
+bastet (0.37-2) unstable; urgency=low
+
+ * Missing Build-Depends libncurses-dev, reported by Goswin von Brederlow (closes: #255131).
+
+ -- David Moreno Garza <damog@damog.net> Mon, 21 Jun 2004 01:10:17 -0500
+
+bastet (0.37-1) unstable; urgency=low
+
+ * Initial Release (Closes: #247029).
+ * Modified upstream Makefile to fit Debian needs on setgid cases.
+ * Added the security patch on highscore.c by Debian Audit.
+
+ -- David Moreno Garza <damog@damog.net> Sun, 2 May 2004 13:26:53 -0500
+
--- bastet-0.41.orig/debian/docs
+++ bastet-0.41/debian/docs
@@ -0,0 +1,2 @@
+README
+README-Petris
--- bastet-0.41.orig/debian/manpages/bastet.6
+++ bastet-0.41/debian/manpages/bastet.6
@@ -0,0 +1,32 @@
+.TH BASTET 6 "MAY 2004"
+.SH NAME
+bastet \- GPL'd clone of tetris with a bastard level
+.SH SYNOPSIS
+.B bastet [WIDTHxHEIGHT]
+.SH DESCRIPTION
+.B bastet
+(stands for "bastard tetris") is a free (GPL'd) clone of Tetris(r)
+(built on the top of petris by Peter Seidler) which is designed to be
+"as bastard as possible". It tries to compute how useful blocks are and
+gives you the worst, the most bastard it can find. Playing bastet can be
+a painful experience, especially if you usually make "canyons" and wait for
+the long I-shaped blocks.
+.SH USAGE
+Use up and down arrows to select a level when bastet has been launched. The
+more levels, the more points you will get when playing. Use left and
+right arrows to move the piece from side to side. Use up arrow to rotate,
+and down arrow to speed up the fall.
+
+Some other keybindings will be useful: p for pausing, q for quitting during
+the game, space to drop current block, 0 to rotate the block CCW.
+.SH OPTIONS
+.IP -h
+Display the format for setting width and height of the playing area.
+.SH FILES
+.I /var/games/bastet.scores
+.RS
+The global high scores for bastet.
+.SH BUGS
+None known at the moment. If you find one, report it.
+.SH AUTHOR
+Federico Poloni <fph@ngi.it>
--- bastet-0.41.orig/debian/rules
+++ bastet-0.41/debian/rules
@@ -0,0 +1,65 @@
+#!/usr/bin/make -f
+
+DEBCFLAGS = -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ DEBCFLAGS += -O0
+else
+ DEBCFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ INSTALL_PROGRAM += -s
+endif
+
+include /usr/share/quilt/quilt.make
+
+configure: configure-stamp
+configure-stamp: patch
+ dh_testdir
+ touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+ $(MAKE) DEBCFLAGS="$(DEBCFLAGS)"
+ touch build-stamp
+
+clean: unpatch
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+ -$(MAKE) mrproper
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/bastet
+
+binary-indep: build install
+
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installdirs
+ chown root.games debian/bastet/usr/games/bastet
+ chmod 2755 debian/bastet/usr/games/bastet
+ dh_install
+ dh_installman debian/manpages/bastet.6
+ dh_installmenu
+ dh_strip
+ dh_compress
+ dh_fixperms -Xusr/games/bastet
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- bastet-0.41.orig/debian/watch
+++ bastet-0.41/debian/watch
@@ -0,0 +1,3 @@
+version=3
+
+http://fph.altervista.org/prog/bastet.shtml (?:.*)bastet-(.*)\.tgz
--- bastet-0.41.orig/debian/dirs
+++ bastet-0.41/debian/dirs
@@ -0,0 +1,2 @@
+usr/games
+var/games
\ No newline at end of file
--- bastet-0.41.orig/debian/menu
+++ bastet-0.41/debian/menu
@@ -0,0 +1,5 @@
+?package(bastet):\
+ needs="text"\
+ section="Games/Blocks"\
+ title="Bastet"\
+ command="/usr/games/bastet"
--- bastet-0.41.orig/debian/copyright
+++ bastet-0.41/debian/copyright
@@ -0,0 +1,59 @@
+This package was debianized by David Moreno Garza <damog@damog.net> on
+Sun, 2 May 2004 13:26:53 -0500.
+
+It was downloaded from http://fph.altervista.org/prog/bastet.shtml
+
+Upstream Author: Federico Poloni <fph@ngi.it>
+
+Copyright (C) 2004 Federico Poloni <fph@ngi.it>
+
+License:
+
+ 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 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'
+
+Bastet is built on top of Petris, a public-domain Tetris (R)
+clone by Peter Seidler <seidler@phys.au.dk> released under the
+next license terms:
+
+ You can do whatever you want with the program, it's Public Domain.
+ (however, it would be nice of you to credit me if you found anything
+ of this useful).
+ The above includes the permission to relicence the program under the
+ MIT/X11 licence reproduced below:
+
+---
+ 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, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to
+ do so, provided that the above copyright notice(s) and this permission
+ notice appear in all copies of the Software and that both the above
+ copyright notice(s) and this permission notice appear in supporting
+ documentation.
+
+ 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 OF THIRD PARTY RIGHTS.
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE
+ LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR
+ ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+ IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+---
+
+The Debian packaging is (C)
+ 2004-2006 David Moreno Garza <damog@damog.net>
+ 2006-2007 Nacho Barrientos Arias <nacho@debian.org>
+and is licensed under the GPL, see above.
--- bastet-0.41.orig/debian/install
+++ bastet-0.41/debian/install
@@ -0,0 +1 @@
+debian/*.desktop usr/share/applications/