Subject: Bug#3532: Problems encountered while building "indent" on m68k arch

From: [email-masked] (Yambo)
Date: Fri, 5 Jul 96 23:48 CDT

Package: indent
Version: 1.9.1-14

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/indent-1.9.1/debian.control	Sat Nov 18 19:19:00 1995
+++ indent-1.9.1/debian.control	Thu Jul  4 22:00:19 1996
@@ -1,6 +1,6 @@
 PACKAGE: indent
-VERSION: =V
-PACKAGE_REVISION: =D
+VERSION: =V-=D
+ARCHITECTURE: =A
 MAINTAINER: [email-masked] (Bill Mitchell)
 SECTION:  devel
 DEPENDS:  libc5
--- orig/indent-1.9.1/debian.rules	Fri Nov 17 22:27:51 1995
+++ indent-1.9.1/debian.rules	Thu Jul  4 22:02:01 1996
@@ -25,6 +25,8 @@
 v = 1.9.1
 # The Debian revision of the package (for example, `2').
 d = 14
+# The target architecture.
+a = $(shell dpkg --print-architecture)
 
 build:
 # Builds the binary package.
@@ -74,15 +76,14 @@
 		debian-tmp/usr/doc/copyright/indent
 	#
 	install -d -g root -m 755 -o root debian-tmp/DEBIAN
-	sed -e 's/VERSION:.*=V/VERSION: $(v)/' \
-            -e 's/PACKAGE_REVISION:.*=D/PACKAGE_REVISION: $(d)/' \
+	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
 	install -g root -m 755 -o root debian.postrm debian-tmp/DEBIAN/postrm
 	#
-	dpkg --build debian-tmp
-	mv debian-tmp.deb ../$(p)-$(v)-$(d).deb
+	dpkg --build debian-tmp && dpkg-name -o -s .. debian-tmp.deb
 
 source: clean
 # Makes a source package.