Subject: Bug#3727: Problems encountered while compiling "bc" for m68k arch.

From: llucius <[email-masked]>
Date: Sun, 7 Jul 1996 17:59:27 -0500 (CDT)

Package: bc
Version: 1.03-10

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.bc" file contained obsolete "PACKAGE_REVISION" field.
4)  "debian.control.bc" file did not contain architecture field.
5)  "debian.control.dc" file contained obsolete "PACKAGE_REVISION" field.
6)  "debian.control.dc" file did not contain architecture field.

The following patches correct these problems:

--- orig/bc-1.03/debian.control.bc	Sat Nov 18 16:51:38 1995
+++ bc-1.03/debian.control.bc	Sun Jul  7 12:17:22 1996
@@ -1,7 +1,7 @@
 PACKAGE: bc
 MAINTAINER:  Bill Mitchell <[email-masked]>
-VERSION: =V
-PACKAGE_REVISION: =D
+VERSION: =V-=D
+ARCHITECTURE: =A
 SECTION:  math
 DEPENDS:  libc5
 DESCRIPTION: An arbitrary precision calculator language.
--- orig/bc-1.03/debian.control.dc	Sat Nov 18 16:53:36 1995
+++ bc-1.03/debian.control.dc	Sun Jul  7 12:17:42 1996
@@ -1,7 +1,7 @@
 PACKAGE: dc
 MAINTAINER: Bill Mitchell <[email-masked]>
-VERSION: =V
-PACKAGE_REVISION: =D
+VERSION: =V-=D
+ARCHITECTURE: =A
 DEPENDS:  libc5
 SECTION:  math
 DESCRIPTION: An arbitrary precision reverse-polish calculator.
--- orig/bc-1.03/debian.rules	Sat Nov 18 16:53:14 1995
+++ bc-1.03/debian.rules	Sun Jul  7 13:02:02 1996
@@ -24,6 +24,8 @@
 v = 1.03
 # The Debian revision of the package (for example, `2').
 d = 10
+# The target architecture.
+a = $(shell dpkg --print-architecture)
 
 build:
 # Builds the binary package.
@@ -65,12 +67,12 @@
 	cp -a Examples debian-tmp/usr/doc/examples/bc
 	chmod -R g-sw debian-tmp/usr/doc/examples/bc
 	chown -R root.root debian-tmp/usr/doc/examples/bc
-	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.bc >debian-tmp/DEBIAN/control
 	chmod 644 debian-tmp/DEBIAN/control
 	dpkg --build debian-tmp
-	mv debian-tmp.deb ../bc-$(v)-$(d).deb
+	dpkg-name -o -s .. debian-tmp.deb
 
 binary-dc:
 	test -f stamp-build || make -f debian.rules build
@@ -95,8 +97,8 @@
 	install -g root -m 644 -o root debian.dc.doc.Makefile \
 		debian-tmp/usr/doc/dc/Makefile
 	gzip -9f debian-tmp/usr/doc/dc/*
-	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.dc >debian-tmp/DEBIAN/control
 	chmod 644 debian-tmp/DEBIAN/control
 	install -g root -m 755 -o root debian.postinst.dc \
@@ -104,7 +106,7 @@
 	install -g root -m 755 -o root debian.postrm.dc \
 	  debian-tmp/DEBIAN/postrm
 	dpkg --build debian-tmp
-	mv debian-tmp.deb ../dc-$(v)-$(d).deb
+	dpkg-name -o -s .. debian-tmp.deb
 
 binary: binary-bc binary-dc
 # Makes a binary package.