Subject: Bug#3718: Problems encountered while compiling "ash" on m68k arch.

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

Package: ash
Version: 0.2-0

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.rules" clean target did not function.
4)  "debian.rules" defined CFLAGS with -m486 option.
5)  "debian.control" did not contain architecture field.
6)  "debian.control" contained outdated "PACKAGE_REVISION" field.
7)  Though not really a critter, the package should probably not contain all
    the object (.o) files.  (No patch B-))

The following patches correct these problems:

--- orig/ash-0.2/debian.control	Tue Dec  5 23:32:17 1995
+++ ash-0.2/debian.control	Sun Jul  7 21:45:34 1996
@@ -1,6 +1,6 @@
 Package: ash
 Version: =
-Package_Revision: =
+Architecture: =
 Maintainer: Bruce Perens <[email-masked]>
 Description: A Bourne-shell work-alike, smaller than "bash"
  Don't install this program, you already have "bash", which is a better
--- orig/ash-0.2/debian.rules	Tue Dec  5 23:26:20 1995
+++ ash-0.2/debian.rules	Sun Jul  7 21:50:17 1996
@@ -12,8 +12,9 @@
 package=ash
 version=0.2
 debian=0
+arch=$(shell dpkg --print-architecture)
 
-CFLAGS=-O2 -fomit-frame-pointer -m486
+CFLAGS=-O2 -fomit-frame-pointer
 LDFLAGS= -s
 D=debian-tmp
 DIRECTORIES= $D $D/bin $D/usr/man/man1 $D/DEBIAN $D/usr/doc/copyright
@@ -29,11 +30,11 @@
 clean:
 	$(checkdir)
 	-rm -f build
-	-$(MAKE) -i distclean
+	-$(MAKE) -i clean
 	-rm -rf $D *~
 
 binary:		checkroot build clear $(DIRECTORIES)
-	sed -e '2s/=/$(version)/; 3s/=/$(debian)/' \
+	sed -e '2s/=/$(version)-$(debian)/; 3s/=/$(arch)/' \
 		debian.control > $D/DEBIAN/control
 #	cp debian.postinst $D/DEBIAN/postinst
 #	cp debian.prerm $D/DEBIAN/prerm
@@ -45,7 +46,7 @@
 	chown -R root.root $D
 	chmod -R g-ws $D
 	dpkg --build $D
-	mv $D.deb ../$(package)-$(version)-$(debian).deb
+	dpkg-name -o -s .. $D.deb
 
 define checkdir
 # test -f $(package).c