Subject: Bug#3726: Problems encountered while compiling "ed" for m68k arch.

From: llucius <[email-masked]>
Date: Sun, 7 Jul 1996 18:00:16 -0500 (CDT)

Package: ed
Version: 0.2-11

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" file did not contain architecture field.

The following patches correct these problems:

--- orig/ed-0.2/debian.control	Sun Mar 10 00:12:37 1996
+++ ed-0.2/debian.control	Sun Jul  7 12:01:32 1996
@@ -1,5 +1,6 @@
 PACKAGE: ed
 VERSION: =V-=D
+ARCHITECTURE: =A
 PRE-DEPENDS: libc5 (>=5.2.18-1)
 MAINTAINER: [email-masked] (Bill Mitchell)
 SECTION:  base
--- orig/ed-0.2/debian.rules	Sun Mar 10 00:14:00 1996
+++ ed-0.2/debian.rules	Sun Jul  7 12:03:19 1996
@@ -31,6 +31,8 @@
 v = 0.2
 # The Debian revision of the package (for example, `2').
 d = 11
+# The target architecture.
+a = $(shell dpkg --print-architecture)
 
 build:
 # Builds the binary package.
@@ -82,6 +84,7 @@
 	#
 	install -d -g root -m 755 -o root debian-tmp/DEBIAN
 	sed -e 's/VERSION:.*=V-=D/VERSION: $(v)-$(d)/' \
+	    -e 's/ARCHITECTURE:.*=A/ARCHITECTURE: $(a)/' \
             <debian.control >debian-tmp/DEBIAN/control
 	chmod 644 debian-tmp/DEBIAN/control
 	install -g root -m 755 -o root debian.postinst debian-tmp/DEBIAN/postinst
@@ -89,7 +92,7 @@
 	install -g root -m 755 -o root debian.preinst debian-tmp/DEBIAN/preinst
 	#
 	dpkg --build debian-tmp
-	mv debian-tmp.deb ../$(p)-$(v)-$(d).deb
+	dpkg-name -o -s .. debian-tmp.deb
 
 source: clean
 # Makes a source package.