--- /tmp/ncurses-5.4/debian/rules	2005-09-20 11:22:50.315314760 +0300
+++ ncurses-5.4/debian/rules	2005-09-20 11:29:23.983468104 +0300
@@ -180,10 +180,22 @@
 	mv $(tempdir)/usr/lib64/libncurses.so.$(soname) $(tempdir)/lib64/
 endif
 
+	# Build a host tic
+	mkdir $(tempdir)
+	mv $(objdir-debug)/progs/tic $(tempdir)/
+	sed -e 's/$$(LINK)\ $$(DEPS_TIC)\ $$(LDFLAGS_DEFAULT)\ -o\ $$@/cd\ $$(MODEL);$$(LIBTOOL_COMPILE)\ host-gcc\ $$(CFLAGS_NORMAL)\ -c\ $$(srcdir)\/tic.c\n\tcd\ $$(MODEL);$$(LIBTOOL_COMPILE)\ host-gcc\ $$(CFLAGS_NORMAL)\ -c\ $$(srcdir)\/dump_entry.c\n\thost-gcc\ $$(DEPS_TIC)\ $$(LDFLAGS)\ $$(CFLAGS_SHARED)\ -o\ $$@/' -e 's/tic$$x:\ $$(DEPS_TIC)/tic$$x:/' \
+	$(objdir-debug)/progs/Makefile > $(tempdir)/Makefile
+	mv $(tempdir)/Makefile $(objdir-debug)/progs/Makefile
+	$(MAKE) -C $(objdir-debug)/progs tic
+	rm -f $(objdir-debug)/obj_s/dump_entry.o
+
 	# Install into our base directory 
 	GZIP='-9' $(MAKE) -C $(objdir-debug) install
 	$(MAKE) -C $(wobjdir-debug) install.libs
 
+	# Install the proper tic
+	mv $(tempdir)/tic $(tempdir)/usr/bin/
+
 	# Copy libraries to the debug directory
 	test -d $(tempdir)/usr/lib/debug || mkdir $(tempdir)/usr/lib/debug
 	cp -a $(tempdir)/usr/lib/*.so.* $(tempdir)/usr/lib/debug

