Subject: Bug#3544: Problems encountered while compiling "mawk" on m68k arch

From: llucius <[email-masked]>
Date: Sat, 6 Jul 1996 20:12:57 -0500 (CDT)

Package: mawk
Version: 1.2.2-1

The following problems were encountered while building on m68k arch:

1)  "debian.rules" did not support different architectures.
2)  "debian.rules" created improperly named .deb binaries (new standard).
3)  "debian.control" did not contain architecture field.
4)  "debian.control" contained obsolete "PACKAGE_REVISION" field.

The following patches correct these problems:

--- orig/mawk-1.2.2/debian.control	Sun Jan 28 22:00:53 1996
+++ mawk-1.2.2/debian.control	Sat Jul  6 11:17:36 1996
@@ -1,6 +1,6 @@
 Package: mawk
 Version: =
-Package_Revision: =
+Architecture: =
 Maintainer: Chris Fearnley <[email-masked]>
 Depends: libc5
 Description:  a pattern scanning and text processing language
--- orig/mawk-1.2.2/debian.rules	Sun Jan 28 21:45:04 1996
+++ mawk-1.2.2/debian.rules	Sat Jul  6 14:57:37 1996
@@ -28,6 +28,8 @@
 version=1.2.2
 # The Debian revision of the package (for example, `2').
 debian=1
+# The target architecture.
+arch=$(shell dpkg --print-architecture)
 
 # The next section may have to be extensively modified
 
@@ -52,7 +54,7 @@
 	$(make_directory) debian-tmp/usr/man/man1
 	$(make_directory) debian-tmp/usr/doc/examples/mawk
 	$(make_directory) debian-tmp/usr/doc/copyright
-	sed -e '2s/=/$(version)/; 3s/=/$(debian)/' \
+	sed -e '2s/=/$(version)-$(debian)/; 3s/=/$(arch)/' \
 		debian.control > debian-tmp/DEBIAN/control
 	$(install_binary) debian.postinst debian-tmp/DEBIAN/postinst
 	$(install_binary) debian.prerm debian-tmp/DEBIAN/prerm
@@ -62,8 +64,7 @@
 	$(install_files) examples/* debian-tmp/usr/doc/examples/mawk
 	chown -R root.root debian-tmp
 	gzip -9 debian-tmp/usr/doc/examples/mawk/*
-	dpkg --build debian-tmp
-	mv debian-tmp.deb ../$(package)-$(version)-$(debian).deb
+	dpkg --build debian-tmp && dpkg-name -o -s .. debian-tmp.deb
 
 # Below here is fairly generic really.