Subject: Bug#3721: Problems while compiling "termcap-compat" on m68k arch

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

Package: termcap-compat
Version: 1.0.0-2

The following problems were encountered while building on m68k arch:

1)  ".depend" file existed, causing problems during make since us m68kers
    don't have the "i486-linux' version of gcc.  B-)
2)  "termcap.h" was being included from "/usr/include" which was the
    "ncurses" version.  Adding "-I." to compile options corrected this.

Also changed the make in the build rule to use the CFLAGS definition and
changed the binary rule to use dpkg-name to rename the .deb file.

The following patches corrrect these problems:

diff -ruN orig/termcap-compat-1.0.0/.depend termcap-compat-1.0.0/.depend
--- orig/termcap-compat-1.0.0/.depend	Fri May 10 20:49:25 1996
+++ termcap-compat-1.0.0/.depend	Wed Dec 31 18:00:00 1969
@@ -1,29 +0,0 @@
-termcap.o pic/termcap.o: termcap.c /usr/include/stdio.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/stdlib.h \
- /usr/lib/gcc-lib/i486-linux/2.7.2/include/stddef.h \
- /usr/include/errno.h /usr/include/linux/errno.h \
- /usr/include/asm/errno.h /usr/include/alloca.h /usr/include/unistd.h \
- /usr/include/posix_opt.h /usr/include/gnu/types.h \
- /usr/include/confname.h /usr/include/sys/types.h \
- /usr/include/linux/types.h /usr/include/linux/posix_types.h \
- /usr/include/asm/posix_types.h /usr/include/asm/types.h \
- /usr/include/sys/bitypes.h /usr/include/malloc.h \
- /usr/include/string.h /usr/include/sys/ioctl.h \
- /usr/include/linux/ioctl.h /usr/include/asm/ioctl.h \
- /usr/include/termios.h /usr/include/linux/termios.h \
- /usr/include/asm/termios.h /usr/include/asm/termbits.h \
- /usr/include/asm/ioctls.h /usr/include/sys/socketio.h \
- /usr/include/linux/sockios.h /usr/include/asm/sockios.h \
- /usr/local/include/termcap.h
-tparam.o pic/tparam.o: tparam.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h \
- /usr/lib/gcc-lib/i486-linux/2.7.2/include/stddef.h \
- /usr/include/errno.h /usr/include/linux/errno.h \
- /usr/include/asm/errno.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/unistd.h /usr/include/posix_opt.h \
- /usr/include/gnu/types.h /usr/include/confname.h \
- /usr/include/sys/types.h /usr/include/linux/types.h \
- /usr/include/linux/posix_types.h /usr/include/asm/posix_types.h \
- /usr/include/asm/types.h /usr/include/sys/bitypes.h
-version.o pic/version.o: version.c
diff -ruN orig/termcap-compat-1.0.0/debian.rules termcap-compat-1.0.0/debian.rules
--- orig/termcap-compat-1.0.0/debian.rules	Wed Jun 12 20:24:38 1996
+++ termcap-compat-1.0.0/debian.rules	Mon Jul  8 12:58:08 1996
@@ -8,11 +8,11 @@
 shortname = $(package)-$(version)
 arch = $(shell dpkg --print-architecture)
 
-CFLAGS = "-g -O2"
+CFLAGS = "-g -O2 -I."
 
 build:
 	$(checkdir)
-	$(MAKE) CFLAGS=-O2
+	$(MAKE) CFLAGS=$(CFLAGS)
 	touch stamp-built
 
 clean:
@@ -45,7 +45,7 @@
 	install -m 755 debian.postrm debian-tmp/DEBIAN/postrm
 	# And finally, build the Debian package!
 	dpkg --build debian-tmp
-	mv debian-tmp.deb ../$(longname).$(arch).deb
+	dpkg-name -o -s .. debian-tmp.deb
 
 source: clean
 	chmod ugo+x debian.rules