--- amiga-fdisk-0.04.orig/fdisk.c
+++ amiga-fdisk-0.04/fdisk.c
@@ -25,11 +25,33 @@
 #include <malloc.h>
 #include <string.h>
 #include <getopt.h>
+#include <ctype.h>
 
+#ifdef DONT_USE_READLINE
+char *readline (const char *prompt)
+{
+       char buffer[1024];
+       char *s;
+       int size;
+       printf ("%s",prompt);
+       fflush (stdout);
+       fgets (buffer, sizeof(buffer), stdin);
+       size = strlen (buffer);
+       s = malloc ((size+1)*sizeof(char));
+       s = strcpy (s, buffer);
+       fflush (stdin);
+       return s;
+}
+#else
 #include <readline/readline.h>
 #include <readline/history.h>     
+#endif
 
+#if 0
 #include <asm/byteorder.h>
+#else
+#include <netinet/in.h>
+#endif
 
 #include <amiga/types.h>
 #include <amigastuff.h>
@@ -48,6 +70,10 @@
 
 int atonum(char *s)
 {
+#ifdef FIX_NO_READLINE
+#warning FIX_NO_READLINE enabled in atonum
+        return atoi(s);
+#else
 	char *d=s;
 	int n;
 
@@ -69,6 +95,7 @@
 		sscanf(s, "%d", &n);
 	}
 	return n;
+#endif
 }
 
 int partition(void)
@@ -105,18 +132,18 @@
 
 int listknown(void)
 {
-	printf("Known Partition Types\n---------------------\n
- 1.  DOS\\0	Old Filesystem
- 2.  DOS\\1	Original FastFileSystem (FFS)
- 3.  DOS\\2	Old International Filesystem
- 4.  DOS\\3	International FastFileSystem
- 5.  DOS\\4	Old Filesystem with directory cache
- 6.  DOS\\6	FastFileSystem with directory cache
- 7.  UNI\\0	classic AT&T System-V filesystem
- 8.  UNI\\1	UNIX boot \"filesystem\" (dummy entry for Amiga OS's boot menu)
- 9.  UNI\\2	Berkeley filesystem for System V
-10.  RESV	Reserved (e.g. swap space)
-11.  LNX\\0	Linux native
+	printf("Known Partition Types\n---------------------\n\n\
+ 1.  DOS\\0	Old Filesystem\n\
+ 2.  DOS\\1	Original FastFileSystem (FFS)\n\
+ 3.  DOS\\2	Old International Filesystem\n\
+ 4.  DOS\\3	International FastFileSystem\n\
+ 5.  DOS\\4	Old Filesystem with directory cache\n\
+ 6.  DOS\\6	FastFileSystem with directory cache\n\
+ 7.  UNI\\0	classic AT&T System-V filesystem\n\
+ 8.  UNI\\1	UNIX boot \"filesystem\" (dummy entry for Amiga OS's boot menu)\n\
+ 9.  UNI\\2	Berkeley filesystem for System V\n\
+10.  RESV	Reserved (e.g. swap space)\n\
+11.  LNX\\0	Linux native\n\
 12.  SWP\\0	Linux swap\n\n");
 
 	return 0;
@@ -124,19 +151,19 @@
 
 int menu(void)
 {
-	printf ("Command action
-   a   toggle bootable flag
-   b   change number of bootblocks
-   c   change boot priority
-   d   delete a partition
-   e   toggle nomount flag
-   l   list known partition types
-   m   print this menu
-   n   add a new partition
-   p   print the partition table
-   q   quit without saving changes
-   t   change a partition's DosType
-   r   reorganize/move RDB
+	printf ("Command action\n\
+   a   toggle bootable flag\n\
+   b   change number of bootblocks\n\
+   c   change boot priority\n\
+   d   delete a partition\n\
+   e   toggle nomount flag\n\
+   l   list known partition types\n\
+   m   print this menu\n\
+   n   add a new partition\n\
+   p   print the partition table\n\
+   q   quit without saving changes\n\
+   t   change a partition's DosType\n\
+   r   reorganize/move RDB\n\
    w   write table to disk and exit\n\n");
 	return 0;
 }
@@ -155,6 +182,13 @@
 	listknown();
 
 	printf ("\n  Choose a number of the upper list or\n  enter a DosType of the format 0x444f5302\n\n");
+#ifdef FIX_NO_READLINE
+#warning FIX_NO_READLINE enabled in gettype
+	printf(
+	"(NOTE: amiga-fdisk from the boot-floppies package accepts only numbers\n"\
+	" from the list above. Replace amiga-fdisk-bf by amiga-fdisk as soon as\n"\
+	" possible to get the full functionality of amiga-fdisk.)\n\n");
+#endif
 	dtype=readline("Enter DosType: ");
 	if (dtype==NULL) exit (0);
 	hexval=atonum(dtype);
--- amiga-fdisk-0.04.orig/Makefile
+++ amiga-fdisk-0.04/Makefile
@@ -4,14 +4,22 @@
 #
 
 CC=             gcc
+ifeq ($(USE_READLINE),no)
+CFLAGS=         -O2 -fomit-frame-pointer -Wall -I./include -DDONT_USE_READLINE -DFIX_NO_READLINE
+#CFLAGS=         -g -fomit-frame-pointer -Wall -I./include -DDEBUG -DDONT_USE_READLINE
+LDFLAGS=        # -s -N
+else
 CFLAGS=         -O2 -fomit-frame-pointer -Wall -I./include
 #CFLAGS=         -g -fomit-frame-pointer -Wall -I./include -DDEBUG
-LDFLAGS=        # -s -N
 LIBS=		-lreadline
+LDFLAGS=        # -s -N
+endif
 
 # Where to put binaries?
 # See the "install" rule for the links. . .
 
+INSTALL=	install
+INSTALLDIR=	/sbin
 SBIN= 		amiga-fdisk
 
 # Where to put datebase files?
@@ -22,8 +30,7 @@
 	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
 
 install: all
-	$(INSTALLDIR) $(SBINDIR)
-	$(INSTALLBIN) $(SBIN) $(SBINDIR)
+	$(INSTALL) $(SBIN) $(DESTDIR)$(INSTALLDIR)
 
 clean:
 	-rm -f *.o *~ core $(SBIN)
--- amiga-fdisk-0.04.orig/amigastuff.c
+++ amiga-fdisk-0.04/amigastuff.c
@@ -30,8 +30,13 @@
 #include <malloc.h>
 #include <string.h>
 
+# if 0
+these include files are broken, see #252709
 #include <asm/system.h>
 #include <asm/byteorder.h>
+#else
+#include <netinet/in.h>
+#endif
 
 #include <amiga/types.h>
 #include <amiga/filehandler.h>
@@ -57,7 +62,7 @@
 struct PartitionBlock *pa[MAXPARTS];
 int parts, firstblock, lastblock, maxblock, minblock;
 char *initsectors, *listsector;
-char type[32];	/* Needed by DosType() */
+char type[100];	/* Needed by DosType() */
 
 int rigiddisk_new(int first);
 
@@ -698,17 +703,26 @@
 
 			geo.heads=1;
 			geo.sectors=1;
-			geo.cylinders=hdsize/SECTOR_SIZE;
+			// geo.cylinders=hdsize/SECTOR_SIZE;
+			hdsize/=SECTOR_SIZE;
 			geo.start=0;
 
-			while ((((geo.cylinders/2)*2)==geo.cylinders) && (geo.cylinders>1024)) {
+			// while ((((geo.cylinders/2)*2)==geo.cylinders) && (geo.cylinders>1024)) {
+			while ((((hdsize/2)*2)==hdsize) && (hdsize>1024)) {
 				geo.sectors*=2;
-				geo.cylinders/=2;
-				if (((geo.cylinders/2)*2)==geo.cylinders && (geo.cylinders>1024) ) {
+				// geo.cylinders/=2;
+				hdsize/=2;
+				// if (((geo.cylinders/2)*2)==geo.cylinders && (geo.cylinders>1024) ) {
+				if (((hdsize/2)*2)==hdsize && (hdsize>1024) ) {
 					geo.heads*=2;
-					geo.cylinders/=2;
+					// geo.cylinders/=2;
+					hdsize/=2;
 				}
 			}
+			geo.cylinders=hdsize;
+			if (hdsize != geo.cylinders) {
+			  printf("Warning: %lli cylinders can not be stored in 16-bit value!\n", hdsize);
+			}
 
 
 		} else {
@@ -939,7 +953,7 @@
 	dt.dlong = htonl(dostype);
 
 	if (!list_only) {
-		j = sprintf(type, "0x%04x = ",dostype);
+		j = sprintf(type, "0x%04x = ",(unsigned int) dostype);
 
 		for (i = 0; i < 4; i++)
 			if (isprint(dt.dchar[i]))
@@ -970,10 +984,10 @@
 int rigiddisk_show(void)
 {
 	printf ("Disk %s: %ld heads, %ld sectors, %ld cylinders, RDB: %d\n", disk_device,
-		 htonl(rdb->rdb_Heads),htonl(rdb->rdb_Sectors),htonl(rdb->rdb_Cylinders),firstblock);
+		 (long int) htonl(rdb->rdb_Heads), (long int) htonl(rdb->rdb_Sectors), (long int) htonl(rdb->rdb_Cylinders), firstblock);
 
 	printf ("Logical Cylinders from %ld to %ld, %ld  bytes/Cylinder \n\n", 
-		 htonl(rdb->rdb_LoCylinder), htonl(rdb->rdb_HiCylinder), SECTOR_SIZE*htonl(rdb->rdb_Sectors)*htonl(rdb->rdb_Heads));
+		 (long int) htonl(rdb->rdb_LoCylinder), (long int) htonl(rdb->rdb_HiCylinder), (long int) SECTOR_SIZE*htonl(rdb->rdb_Sectors)*htonl(rdb->rdb_Heads));
 
 	return 0;
 }
@@ -996,11 +1010,11 @@
 		printf ("%s%-2d   ",disk_device,(i+1));
 		printf ("%s    ", htonl(curr->pb_Flags)&PBFF_BOOTABLE?"*":" ");
 		printf ("%s    ", htonl(curr->pb_Flags)&PBFF_NOMOUNT?" ":"*");
-		printf ("%6ld   %6ld   ", htonl(de->de_LowCyl),htonl(de->de_HighCyl));
-		printf ("%6ld   ", (htonl(de->de_HighCyl)-htonl(de->de_LowCyl)+1)*
+		printf ("%6ld   %6ld   ", (long int) htonl(de->de_LowCyl), (long int) htonl(de->de_HighCyl));
+		printf ("%6ld   ", (long int) (htonl(de->de_HighCyl)-htonl(de->de_LowCyl)+1)*
 				htonl(de->de_BlocksPerTrack)*htonl(de->de_Surfaces)/2);
-		printf ("%3ld    ",htonl(de->de_BootPri));
-		printf ("%3ld  ",htonl(de->de_BootBlocks));
+		printf ("%3ld    ",(long int) htonl(de->de_BootPri));
+		printf ("%3ld  ",(long int) htonl(de->de_BootBlocks));
 		printf ("%s\n",DosType(htonl(de->de_DosType)));
 	}
 
--- amiga-fdisk-0.04.orig/debian/changelog
+++ amiga-fdisk-0.04/debian/changelog
@@ -0,0 +1,127 @@
+amiga-fdisk (0.04-9) unstable; urgency=low
+
+  * apply patch from David Weinehall to remove XSI:ism (closes: #256298)
+
+ -- Christian T. Steigies <cts@debian.org>  Fri,  2 Jul 2004 23:55:14 +0200
+
+amiga-fdisk (0.04-8) unstable; urgency=low
+
+  * Updated Standards-Version to 3.6.1 (no changes)
+  * create a new package amiga-fdisk-cross for any arch, except m68k and powerpc
+    amiga-fdisk (required) and amiga-fdisk-bf stay m68k+powerpc only (closes: #252339)
+  * do not include "broken" include files in amigastuff.c (closes: #252709)
+    #include <netinet/in.h> instead, also in fdisk.c
+  * get rid of remaining warnings by explicit type conversion
+  * do not call dh_suidregister anymore (again?)
+  * fix Author(s) in copyright
+  * do not ship upstream ChangeLog twice (second copy was uncompressed,
+    removed ChangeLog from amiga-fdisk-bf.docs)
+  * apply patch from Sven Luther (closes: #212840), this code is only executed when
+    the disk does not report the geometry, never happened for me.
+  * print a warning when the calculated number of cylinders does not fit in 16-bit.
+
+ -- Christian T. Steigies <cts@debian.org>  Thu, 17 Jun 2004 23:45:31 +0200
+
+amiga-fdisk (0.04-7) unstable; urgency=low
+
+  * apply patch as supplied by Matt Kraai, which preserves newlines 
+    (closes: #212880).
+
+ -- Christian T. Steigies <cts@debian.org>  Tue, 18 Nov 2003 08:36:09 -0500
+
+amiga-fdisk (0.04-6.1) unstable; urgency=low
+
+  * Non-maintainer upload
+  * Apply patch from Matt Kraai <kraai@ftbfs.org> so it will build with
+    gcc-3.3 (closes: #212880).
+
+ -- Steve Langasek <vorlon@debian.org>  Tue, 18 Nov 2003 05:33:41 +0000
+
+amiga-fdisk (0.04-6) unstable; urgency=low
+
+  * new maintainer, no source changes, closing bugs in the base system
+  * 0.04 has been uploaded in December 1999 (closes: #36258) first half
+    reopen/retitle as a wishlist bug if you have to, fdisk-cross will follow
+  * amiga-fdisk-bf works since May 2000 (closes: #64596)
+  * add Build-Depends (closes: #70077, #70164)
+  * updated Standards-Version
+  * remove dh_suidregister call
+  * make copyright point to LPGL-2 file instead of citing (with old address)
+
+ -- Christian T. Steigies <cts@debian.org>  Sat,  8 Sep 2001 12:41:12 -0400
+
+amiga-fdisk (0.04-5) stable unstable; urgency=low
+
+  * Non-maintainer upload.
+  * build amiga-fdisk and amiga-fdisk-bf from one source package
+  * rearrange section and priority of both packages (closes: #72227)
+  * this package is needed for the 2.2r1 boot-floppies, thus upload for stable
+
+ -- Christian T. Steigies <cts@debian.org>  Thu, 19 Oct 2000 19:11:38 +0200
+
+amiga-fdisk-bf (0.04-4) frozen unstable; urgency=high
+
+  * Non-maintainer upload.
+  * quick hack to make partition type selection work for amiga-fdisk-bf
+
+ -- Christian T. Steigies <cts@debian.org>  Tue, 30 May 2000 15:29:43 +0200
+
+amiga-fdisk-bf (0.04-3) frozen unstable; urgency=high
+
+  * fix a segfault when partitions with long partition type names are used
+  * minimal code change to the previous version:
+  --- amiga-fdisk-0.04/amigastuff.c~      Tue May 16 23:11:45 2000
+  +++ amiga-fdisk-0.04/amigastuff.c       Wed May 17 13:19:26 2000
+  @@ -57,7 +57,7 @@
+   struct PartitionBlock *pa[MAXPARTS];
+   int parts, firstblock, lastblock, maxblock, minblock;
+   char *initsectors, *listsector;
+  -char type[32]; /* Needed by DosType() */
+  +char type[100];        /* Needed by DosType() */
+
+  * NMU, thanks to Roman for the diff
+  
+ -- Christian T. Steigies <cts@debian.org>  Thu, 18 May 2000 10:07:52 +0200
+
+amiga-fdisk-bf (0.04-2) frozen unstable; urgency=low
+
+  * Vital for amiga/m68k and amiga/powerpc boot-floppies.
+  * Non-maintainer upload.
+  * Libreadline build for boot-floppies.
+  * Since i didn't manage to build a multi binary package,
+    i will upload two packages for now. Since the package is very
+    small it should be ok for now.
+
+ -- Sven LUTHER <luther@debian.org>  Thu, 24 Feb 2000 17:24:08 +0100
+
+amiga-fdisk (0.04-1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * New upstream release.
+
+ -- Sven LUTHER <luther@debian.org>  Fri, 17 Dec 1999 17:07:47 +0100
+
+amiga-fdisk (0.03a-1.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * set architecture to m68k powerpc, for the apus boot-floppies.
+
+ -- Sven LUTHER <luther@debian.org>  Mon, 15 Nov 1999 19:21:22 +0100
+
+amiga-fdisk (0.03a-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/control (Maintainer): corrected the address which had been
+    broken by cut'n'waste.
+  * debian/rules (binary-arch): removed call to dh_du.
+
+ -- James Troup <james@nocrew.org>  Tue, 15 Dec 1998 21:11:12 +0000
+
+amiga-fdisk (0.03a-1) unstable; urgency=low
+
+  * Initial Release.
+  * Renamed the binary to "amiga-fdisk" instead of "afdisk" to avoid
+    namespace pollution.
+
+ -- Frank Neumann <Frank.Neumann@Informatik.Uni-Oldenburg.DE>  Thu, 26 Feb 1998 02:58:57 +0100
+
--- amiga-fdisk-0.04.orig/debian/copyright
+++ amiga-fdisk-0.04/debian/copyright
@@ -0,0 +1,19 @@
+This package was debianized by Frank Neumann
+<Frank.Neumann@Informatik.Uni-Oldenburg.DE> on Fri, 16 Jan 1998
+
+It was downloaded from http://www.freiburg.linux.de/~stepan
+
+Upstream Author: Stefan Reinauer <stepan@linux.de>
+
+Copyright:
+
+Copyright (C) '96-'98 by  Stefan Reinauer
+
+   This is an fdisk for Amiga RDB-Type harddisks written by 
+           Stefan Reinauer, <stepan@linux.de>
+
+amiga-fdisk is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE,
+Version 2.
+
+On Debian systems, the complete text of the GNU Library General Public 
+License (Version 2) is found in `/usr/share/common-licenses/LGPL-2'.
--- amiga-fdisk-0.04.orig/debian/postinst
+++ amiga-fdisk-0.04/debian/postinst
@@ -0,0 +1,70 @@
+#! /bin/sh
+# postinst script for amiga-fdisk-bf
+#
+# see: dh_installdeb(1)
+
+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)
+
+# make symlink /sbin/fdisk point to the native fdisk
+#
+# This is also true if /sbin/fdisk is a dangling symlink; in that case we
+# want to update the link, too.
+	if [ ! -e /sbin/fdisk ]; then
+		machine=""
+		case `awk '$1 == "Model:" { print $2 }' /proc/hardware` in
+			Atari)
+				machine=atari
+				;;
+			Amiga)
+				machine=amiga
+				;;
+			Macintosh)
+				machine=mac
+				;;
+			Motorola) # MVME
+				;;
+		esac
+		if [ -n "$machine" ] && [ -f /sbin/$machine-fdisk ]; then
+			ln -sf $machine-fdisk /sbin/fdisk
+		else
+			echo "No native fdisk for this machine type!"
+		fi
+	fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        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
--- amiga-fdisk-0.04.orig/debian/control
+++ amiga-fdisk-0.04/debian/control
@@ -0,0 +1,43 @@
+Source: amiga-fdisk
+Section: base
+Priority: required
+Maintainer: Christian T. Steigies <cts@debian.org>
+Standards-Version: 3.6.1
+Build-Depends: debhelper, libreadline4-dev, 
+
+Package: amiga-fdisk
+Section: admin
+Architecture: m68k powerpc
+Depends: ${shlibs:Depends}
+Conflicts: amiga-fdisk-bf
+Replaces: amiga-fdisk-bf, amiga-fdisk-cross
+Description: Partition editor for Amiga
+ Amiga-fdisk is, similar to fdisk for PCs, a program to partition
+ harddisks. Though it seems to work quite well, it's still got some
+ sort of beta status. It's suggested that you still use the AmigaDOS
+ native tool "HDToolBox" to partition your harddisks and use
+ amiga-fdisk only for querying partition information.
+
+Package: amiga-fdisk-bf
+Priority: extra
+Architecture: m68k powerpc
+Depends: ${shlibs:Depends}
+Conflicts: amiga-fdisk, amiga-fdisk-cross
+Description: Partition editor for Amiga (boot-floppies version)
+ Amiga-fdisk is, similar to fdisk for PCs, a program to partition
+ harddisks. Though it seems to work quite well, it's still got some
+ sort of beta status. It's suggested that you still use the AmigaDOS
+ native tool "HDToolBox" to partition your harddisks and use
+ amiga-fdisk only for querying partition information.
+
+Package: amiga-fdisk-cross
+Priority: extra
+Architecture: alpha amd64 arm hppa i386 ia64 mips mipsel s390 sparc
+Depends: ${shlibs:Depends}
+Conflicts: amiga-fdisk, amiga-fdisk-bf
+Description: Partition editor for Amiga partitions (cross version)
+ Amiga-fdisk is, similar to fdisk for PCs, a program to partition
+ harddisks. Though it seems to work quite well, it's still got some
+ sort of beta status. It's suggested that you still use the AmigaDOS
+ native tool "HDToolBox" to partition your harddisks and use
+ amiga-fdisk only for querying partition information.
--- amiga-fdisk-0.04.orig/debian/dirs
+++ amiga-fdisk-0.04/debian/dirs
@@ -0,0 +1 @@
+/sbin
--- amiga-fdisk-0.04.orig/debian/rules
+++ amiga-fdisk-0.04/debian/rules
@@ -0,0 +1,134 @@
+#!/usr/bin/make -f
+# 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
+
+# This is the debhelper compatability version to use.
+export DH_COMPAT=1
+
+# Only build packages ment for this architecture
+export DH_OPTIONS=-s
+
+ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
+
+INSTALL_TARGETS = install-cross
+
+ifeq ($(ARCH),m68k)
+INSTALL_TARGETS = install-non-bf install-bf
+endif
+ifeq ($(ARCH),powerpc)
+INSTALL_TARGETS = install-non-bf install-bf
+endif
+
+# This has to be exported to make some magic below work.
+export INSTALL_TARGETS
+
+build-non-bf: build-non-bf-stamp
+build-non-bf-stamp:
+	dh_testdir
+	# Add here commands to compile the non-bf package.
+	$(MAKE) clean	
+	$(MAKE) USE_READLINE=yes
+
+	touch build-non-bf-stamp
+
+build-bf: build-bf-stamp
+build-bf-stamp:
+	dh_testdir
+	# Add here commands to compile the bf package.
+	$(MAKE) clean	
+	$(MAKE) USE_READLINE=no
+
+	touch build-bf-stamp
+
+build-cross: build-cross-stamp
+build-cross-stamp:
+	dh_testdir
+	# Add here commands to compile the cross package.
+	$(MAKE) clean	
+	$(MAKE) USE_READLINE=yes
+
+	touch build-cross-stamp
+
+build:
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-non-bf-stamp build-bf-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) clean
+
+	dh_clean
+
+install-non-bf: build-non-bf
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp.
+	$(MAKE) install DESTDIR=`pwd`/debian/tmp
+
+install-bf: build-bf
+	dh_testdir
+	dh_testroot
+	rm -rf debian/amiga-fdisk-bf
+	dh_installdirs
+
+	# Add here commands to install the package into debian/amiga-fdisk-bf.
+	$(MAKE) install DESTDIR=`pwd`/debian/amiga-fdisk-bf
+
+install-cross: build-cross
+	dh_testdir
+	dh_testroot
+	rm -rf debian/amiga-fdisk-cross
+	dh_installdirs
+
+	# Add here commands to install the package into debian/amiga-fdisk-cross.
+	$(MAKE) install DESTDIR=`pwd`/debian/amiga-fdisk-cross
+
+install: $(INSTALL_TARGETS)
+	echo $(INSTALL_TARGETS)
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+#	dh_testversion
+	dh_testdir
+	dh_testroot
+#	dh_installdebconf	
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installinit
+	dh_installcron
+	dh_installmanpages
+	dh_installinfo
+#	dh_undocumented
+#	dh_installchangelogs -a ChangeLog
+	dh_installchangelogs ChangeLog
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	# You may want to make some executables suid here.
+#	dh_suidregister
+#	dh_makeshlibs
+	dh_installdeb
+#	dh_perl
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- amiga-fdisk-0.04.orig/debian/docs
+++ amiga-fdisk-0.04/debian/docs
@@ -0,0 +1,2 @@
+README
+ToDo
--- amiga-fdisk-0.04.orig/debian/amiga-fdisk-cross.dirs
+++ amiga-fdisk-0.04/debian/amiga-fdisk-cross.dirs
@@ -0,0 +1 @@
+/sbin
--- amiga-fdisk-0.04.orig/debian/amiga-fdisk-bf.docs
+++ amiga-fdisk-0.04/debian/amiga-fdisk-bf.docs
@@ -0,0 +1,2 @@
+README
+ToDo
--- amiga-fdisk-0.04.orig/debian/amiga-fdisk-bf.dirs
+++ amiga-fdisk-0.04/debian/amiga-fdisk-bf.dirs
@@ -0,0 +1 @@
+/sbin
--- amiga-fdisk-0.04.orig/debian/amiga-fdisk-cross.docs
+++ amiga-fdisk-0.04/debian/amiga-fdisk-cross.docs
@@ -0,0 +1,2 @@
+README
+ToDo
