Subject: Bug#3713: Problems encountered while compiling "p2c" on m68k arch.

From: llucius <[email-masked]>
Date: Mon, 8 Jul 1996 13:38:37 -0500 (CDT)

Package: p2c
Version: 1.20-2

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 outdated "PACKAGE_REVISION" field.
4)  "debian.rules" contained architecture dependent CFLAGS.

The following patches correct these problems:

--- orig/p2c-1.20/debian.control	Thu Nov 23 08:11:44 1995
+++ p2c-1.20/debian.control	Mon Jul  8 13:08:47 1996
@@ -1,7 +1,7 @@
 PACKAGE: p2c
 MAINTAINER: Andrew Howell <[email-masked]>
-VERSION: =V
-PACKAGE_REVISION: =D
+VERSION: =V-=D
+ARCHITECTURE: =A
 DEPENDS: libc5
 RECOMMENDS: gcc
 DESCRIPTION: Pascal to C translator
--- orig/p2c-1.20/debian.rules	Thu Nov 23 08:11:30 1995
+++ p2c-1.20/debian.rules	Mon Jul  8 13:15:19 1996
@@ -17,7 +17,7 @@
 # in the parent directory.
 
 CC = gcc
-CFLAGS = -O3 -m486 -fomit-frame-pointer
+CFLAGS = -O3 -fomit-frame-pointer
 LDFLAGS = -s
 
 # The name of the package (for example, `emacs').
@@ -26,6 +26,8 @@
 v = 1.20
 # The Debian revision of the package (for example, `2').
 d = 2
+# The target architecture
+a = $(shell dpkg --print-architecture)
 
 build:
 # Builds the binary package.
@@ -54,11 +56,11 @@
 	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 '3s/=V/$(v)/' -e '4s/=D/$(d)/' debian.control \
+	sed -e '3s/=V-=D/$(v)-$(d)/' -e '4s/=A/$(a)/' debian.control \
 	  > debian-tmp/DEBIAN/control
 	chmod 644 debian-tmp/DEBIAN/control
 	dpkg --build debian-tmp
-	mv debian-tmp.deb ../$(p)-$(v)-$(d).deb
+	dpkg-name -o -s .. debian-tmp.deb
 
 source:
 # Makes a source package.