Subject: Bug#3729: Problems while compiling "nvi" for m68k arch.

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

Package: nvi
Version: 1.34-13

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 contained hardcoded architecture.

The following patches correct these problems:

--- orig/nvi-1.34/debian.control	Sat Jun  8 17:15:24 1996
+++ nvi-1.34/debian.control	Sun Jul  7 12:20:29 1996
@@ -2,5 +2,5 @@
 DESCRIPTION: 4.4BSD re-implementation of vi.
 MAINTAINER: Steve Greenland <[email-masked]>
 VERSION: =V-=D
-ARCHITECTURE: i386
+ARCHITECTURE: =A
 DEPENDS: libc5, ncurses3.0
--- orig/nvi-1.34/debian.rules	Sat Jun  8 16:57:12 1996
+++ nvi-1.34/debian.rules	Sun Jul  7 12:21:17 1996
@@ -26,6 +26,8 @@
 v = 1.34
 # The Debian revision of the package (for example, `2').
 d = 13
+# The target architecture.
+a = $(shell dpkg --print-architecture)
 
 build:
 # Builds the binary package.
@@ -60,7 +62,7 @@
 	install -d -g root -m 755 -o root debian-tmp/usr/doc/copyright
 	install -g root -m 644 -o root debian.README \
 	  debian-tmp/usr/doc/copyright/$(p)
-	sed -e '4s/=V/$(v)/' -e '4s/=D/$(d)/' debian.control \
+	sed -e '4s/=V-=D/$(v)-$(d)/' -e '5s/=A/$(a)/' debian.control \
 	  > debian-tmp/DEBIAN/control
 	chmod 644 debian-tmp/DEBIAN/control
 	install -g root -m 644 -o root debian.conffiles \
@@ -70,7 +72,7 @@
 	install -g root -m 755 -o root debian.prerm \
 	  debian-tmp/DEBIAN/prerm
 	dpkg --build debian-tmp
-	mv debian-tmp.deb ../$(p)-$(v)-$(d).deb
+	dpkg-name -o -s .. debian-tmp.deb
 
 source:
 # Makes a source package.