--- tapecalc-20070214.orig/debian/copyright
+++ tapecalc-20070214/debian/copyright
@@ -0,0 +1,28 @@
+This package was debianized by Carl Fürstenberg <azatoth@gmail.com> on
+Sat, 21 Jul 2007 23:46:04 +0200.
+
+It was downloaded from http://invisible-island.net/add/add.html
+
+Upstream Author: Thomas E. Dickey
+
+Copyright: 1995,2007 by Thomas E. Dickey
+
+License:
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of the above listed copyright holder(s)
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE
+FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+The Debian packaging is (C) 2007, Carl Fürstenberg <azatoth@gmail.com> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
--- tapecalc-20070214.orig/debian/changelog
+++ tapecalc-20070214/debian/changelog
@@ -0,0 +1,15 @@
+tapecalc (20070214-2) unstable; urgency=low
+
+  * Adding libncurses5-dev to Build-Depends (closes: #435221)
+  * Removed duplicated depends that will be defined per shlibs:Depends.
+
+ -- Carl Fürstenberg <azatoth@gmail.com>  Mon, 30 Jul 2007 13:27:46 +0200
+
+tapecalc (20070214-1) unstable; urgency=low
+
+  * Initial release (Closes: #411039)
+  * Added patch to relocate add.hlp to datadir
+  * Added patch to rename from add to tapecalc
+
+ -- Carl Fürstenberg <azatoth@gmail.com>  Wed, 25 Jul 2007 22:48:12 +0200
+
--- tapecalc-20070214.orig/debian/control
+++ tapecalc-20070214/debian/control
@@ -0,0 +1,19 @@
+Source: tapecalc
+Section: math
+Priority: optional
+Maintainer: Carl Fürstenberg <azatoth@gmail.com>
+Build-Depends: cdbs, debhelper (>= 5), autotools-dev, dpatch, libncurses5-dev
+Standards-Version: 3.7.2
+
+Package: tapecalc
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: a full-screen tape editor that lets the user edit a calculation
+ tapecalc is a fixed-point calculator that operates as a full-screen editor. It
+ is designed for use as a checkbook or expense-account balancing tool.
+ .
+ tapecalc maintains a running result for each operation. You may scroll to any
+ position in the expression list and modify the list. Enter data by typing
+ numbers (with optional decimal point), separated by operators.
+ .
+ An output transcript may be saved and reloaded for further editing. 
--- tapecalc-20070214.orig/debian/docs
+++ tapecalc-20070214/debian/docs
@@ -0,0 +1 @@
+README
--- tapecalc-20070214.orig/debian/README.Debian
+++ tapecalc-20070214/debian/README.Debian
@@ -0,0 +1 @@
+Upstream name is "add", but as that is a bit ambigious, it's renamed to tapecalc instead.
--- tapecalc-20070214.orig/debian/compat
+++ tapecalc-20070214/debian/compat
@@ -0,0 +1 @@
+5
--- tapecalc-20070214.orig/debian/rules
+++ tapecalc-20070214/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+  
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/dpatch.mk
+
+# Add here any variable or target overrides you need.
--- tapecalc-20070214.orig/debian/patches/00list
+++ tapecalc-20070214/debian/patches/00list
@@ -0,0 +1 @@
+00rel-path.dpatch 01name-change.dpatch
--- tapecalc-20070214.orig/debian/patches/01name-change.dpatch
+++ tapecalc-20070214/debian/patches/01name-change.dpatch
@@ -0,0 +1,211 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## name-change.dpatch by Carl Fürstenberg <azatoth@gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: As "add" is a bit ambigious, a namechange to tapecalc is in order.
+
+@DPATCH@
+diff -urNad tapecalc-20070214~/add.1 tapecalc-20070214/add.1
+--- tapecalc-20070214~/add.1	2007-02-15 00:34:33.000000000 +0100
++++ tapecalc-20070214/add.1	2007-07-25 23:03:51.000000000 +0200
+@@ -32,23 +32,23 @@
+ .fam T	\" groff: Times-Roman (default)
+ ..
+ .
+-.TH ADD 1
++.TH TAPECALC 1
+ .hy 0
+ .
+ .SH NAME
+-\fBadd\fR \- full-screen editing calculator
++\fBtapecalc\fR \- full-screen editing calculator
+ .
+ .SH USAGE
+-\fBadd\fP\fI [options] [file-specifications]\fP
++\fBtapecalc\fP\fI [options] [file-specifications]\fP
+ .
+ .SH SYNOPSIS
+-\fBAdd\fR is a fixed-point calculator that operates as a full-screen editor.
++\fBTapecalc\fR is a fixed-point calculator that operates as a full-screen editor.
+ .
+ .SH DESCRIPTION
+-\fBAdd\fR performs fixed-point computation.
++\fBTapecalc\fR performs fixed-point computation.
+ It is designed for use as a checkbook or expense-account balancing tool.
+ .PP
+-\fBAdd\fR maintains a running result for each operation.
++\fBTapecalc\fR maintains a running result for each operation.
+ You may scroll to any position in the expression list and modify the list.
+ Enter data by typing numbers (with optional decimal point),
+ separated by operators.
+@@ -57,7 +57,7 @@
+ Scripts are loaded from left to right (with the "output" processed first).
+ .
+ .SH OPTIONS
+-Command line options of \fBadd\fR are:
++Command line options of \fBtapecalc\fR are:
+ .
+ .TP
+ .BI \-h
+@@ -239,7 +239,7 @@
+ .
+ .PP
+ Like \fBvi\fR,
+-\fBadd\fR allows you to jump to a particular line with a ":" command
++\fBtapecalc\fR allows you to jump to a particular line with a ":" command
+ .
+ .TP
+ .B :$
+@@ -256,14 +256,14 @@
+ <operator><value><tab><ignored><tab># comment
+ .EE
+ .PP
+-The transcripts saved by \fBadd\fR contain the running result in the
++The transcripts saved by \fBtapecalc\fR contain the running result in the
+ "ignored" part.
+ To exit without saving a transcript, type 'Q'.
+ A
+ normal exit, by typing 'q', saves the list of operators, data (and
+ running result) in the specified file.
+ .PP
+-You can read and write scripts without leaving \fBadd\fR.
++You can read and write scripts without leaving \fBtapecalc\fR.
+ .
+ reads a script at the current entry
+ .TP
+@@ -279,10 +279,10 @@
+ writes a script to the specified file.
+ .
+ .SH ENVIRONMENT
+-\fBAdd\fR runs in a portable UNIX\*R environment.
++\fBTapecalc\fR runs in a portable UNIX\*R environment.
+ .
+ .SH FILES
+-\fBAdd\fR is a single binary module, with a help file \fBadd.hlp\fR
++\fBTapecalc\fR is a single binary module, with a help file \fBtapecalc.hlp\fR
+ installed in the same directory.
+ .
+ .SH FUTURE WORK
+diff -urNad tapecalc-20070214~/add.c tapecalc-20070214/add.c
+--- tapecalc-20070214~/add.c	2007-07-25 23:02:09.000000000 +0200
++++ tapecalc-20070214/add.c	2007-07-25 23:02:10.000000000 +0200
+@@ -1935,7 +1935,7 @@
+ 	}
+     }
+ # endif				/* VMS/UNIX/MSDOS */
+-    (void) strcpy(s, DATADIR "add.hlp");
++    (void) strcpy(s, "/add.hlp");
+     helpfile = AllocString(temp);
+ #endif /* ADD_HELPFILE */
+ }
+diff -urNad tapecalc-20070214~/add.hlp tapecalc-20070214/add.hlp
+--- tapecalc-20070214~/add.hlp	2007-02-15 01:47:18.000000000 +0100
++++ tapecalc-20070214/add.hlp	2007-07-25 23:04:23.000000000 +0200
+@@ -1,9 +1,9 @@
+-ADD: full-screen editing calculator
++TAPECALC: full-screen editing calculator
+ ---
+ 
+ Usage:
+ 
+-	add [-p num] [-i interval] [-o script] scripts
++	tapecalc [-p num] [-i interval] [-o script] scripts
+ 
+ Options:
+ 
+@@ -20,10 +20,10 @@
+ 
+ Computations:
+ 
+-	ADD performs fixed-point computation.  It is designed for use as a
++	TAPECALC performs fixed-point computation.  It is designed for use as a
+ 	checkbook balancing tool.
+ 
+-	ADD maintains a running result for each operation.  You may scroll to
++	TAPECALC maintains a running result for each operation.  You may scroll to
+ 	any position in the expression list and modify the list.  Enter data by
+ 	typing numbers (with optional decimal point), separated by operators. 
+ 
+@@ -102,7 +102,7 @@
+ 	z.	move the current line to the middle of the screen.
+ 	z-	move the current line to the bottom of the screen.
+ 
+-	Like VI, ADD allows you to jump to a particular line with a ":" command
++	Like VI, TAPECALC allows you to jump to a particular line with a ":" command
+ 
+ 	:$	jumps to the last entry
+ 	:1	jumps to the first entry.
+@@ -113,12 +113,12 @@
+ 
+ 		<operator><value><tab><ignored>
+ 
+-	The transcripts saved by ADD contain the running result in the
++	The transcripts saved by TAPECALC contain the running result in the
+ 	"ignored" part.  To exit without saving a transcript, type 'Q'.  A
+ 	normal exit, by typing 'q', saves the list of operators, data (and
+ 	running result) in the specified file.
+ 
+-	You can read and write scripts without leaving ADD.
++	You can read and write scripts without leaving TAPECALC.
+ 
+ 	:e file	clears the current script and reads a script from the file.
+ 	:f	shows the current script-name (also CTL/G)
+diff -urNad tapecalc-20070214~/makefile.in tapecalc-20070214/makefile.in
+--- tapecalc-20070214~/makefile.in	2007-07-25 23:02:09.000000000 +0200
++++ tapecalc-20070214/makefile.in	2007-07-25 23:02:10.000000000 +0200
+@@ -2,13 +2,14 @@
+ # Makefile-template for 'add'
+ 
+ THIS = add
++TARGET = tapecalc
+ RELEASE = t20070214
+ SCREEN = curses
+ 
+ #### Start of system configuration section. ####
+ 
+ srcdir = @srcdir@
+-datadir	= $(DESTDIR)@datadir@/$(THIS)
++datadir	= $(DESTDIR)@datadir@/$(TARGET)
+ VPATH  = @srcdir@
+ 
+ CC		= @CC@
+@@ -18,7 +19,7 @@
+ INSTALL_DATA	= @INSTALL_DATA@
+ 
+ LIBS		= @LIBS@
+-CPPFLAGS	= @CPPFLAGS@ -DHAVE_CONFIG_H -DRELEASE=\"$(RELEASE)\" -DDATADIR=\"$(datadir)/\" -I. -I$(srcdir)
++CPPFLAGS	= @CPPFLAGS@ -DHAVE_CONFIG_H -DRELEASE=\"$(RELEASE)\" -DADD_HELPFILE=\"$(datadir)/$(TARGET).hlp\" -I. -I$(srcdir)
+ CFLAGS		= @CFLAGS@ @EXTRA_CFLAGS@
+ LDFLAGS		= @LDFLAGS@
+ 
+@@ -41,7 +42,7 @@
+ 
+ OBJ = $(THIS).o $(SCREEN).o
+ 
+-PROG	= $(THIS)$x
++PROG	= $(TARGET)$x
+ 
+ all:	$(PROG)
+ 
+@@ -53,17 +54,17 @@
+ install: all installdirs
+ 	$(INSTALL_PROGRAM) $(PROG) $(bindir)/$(PROG)
+ 	mkdir -p $(datadir)
+-	$(INSTALL_DATA) $(srcdir)/$(THIS).hlp $(datadir)/$(THIS).hlp
+-	$(INSTALL_DATA) $(srcdir)/$(THIS).1 $(mandir)/$(THIS).$(manext)
++	$(INSTALL_DATA) $(srcdir)/$(THIS).hlp $(datadir)/$(TARGET).hlp
++	$(INSTALL_DATA) $(srcdir)/$(THIS).1 $(mandir)/$(TARGET).$(manext)
+ 
+ installdirs:
+ 	$(SHELL) ${srcdir}/mkdirs.sh $(bindir) $(mandir)
+ 
+ uninstall:
+ 	rm -f $(bindir)/$(PROG)
+-	rm -f $(datadir)/$(THIS).hlp
++	rm -f $(datadir)/$(TARGET).hlp
+ 	rmdir $(datadir)
+-	rm -f $(mandir)/$(THIS).$(manext)
++	rm -f $(mandir)/$(TARGET).$(manext)
+ 
+ mostlyclean:
+ 	rm -f *.o core *~ *.BAK *.trace *.atac
--- tapecalc-20070214.orig/debian/patches/00rel-path.dpatch
+++ tapecalc-20070214/debian/patches/00rel-path.dpatch
@@ -0,0 +1,67 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## rel-path.dpatch by Carl Fürstenberg <azatoth@gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch to relocate add.hlp to datadir instead of bindir.
+
+@DPATCH@
+diff -urNad add-20070214~/add.c add-20070214/add.c
+--- add-20070214~/add.c	2007-07-25 22:37:49.000000000 +0200
++++ add-20070214/add.c	2007-07-25 22:38:29.000000000 +0200
+@@ -1935,7 +1935,7 @@
+ 	}
+     }
+ # endif				/* VMS/UNIX/MSDOS */
+-    (void) strcpy(s, "add.hlp");
++    (void) strcpy(s, DATADIR "add.hlp");
+     helpfile = AllocString(temp);
+ #endif /* ADD_HELPFILE */
+ }
+diff -urNad add-20070214~/makefile.in add-20070214/makefile.in
+--- add-20070214~/makefile.in	2007-07-25 22:37:49.000000000 +0200
++++ add-20070214/makefile.in	2007-07-25 22:38:29.000000000 +0200
+@@ -8,6 +8,7 @@
+ #### Start of system configuration section. ####
+ 
+ srcdir = @srcdir@
++datadir	= $(DESTDIR)@datadir@/$(THIS)
+ VPATH  = @srcdir@
+ 
+ CC		= @CC@
+@@ -17,7 +18,7 @@
+ INSTALL_DATA	= @INSTALL_DATA@
+ 
+ LIBS		= @LIBS@
+-CPPFLAGS	= @CPPFLAGS@ -DHAVE_CONFIG_H -DRELEASE=\"$(RELEASE)\" -I. -I$(srcdir)
++CPPFLAGS	= @CPPFLAGS@ -DHAVE_CONFIG_H -DRELEASE=\"$(RELEASE)\" -DDATADIR=\"$(datadir)/\" -I. -I$(srcdir)
+ CFLAGS		= @CFLAGS@ @EXTRA_CFLAGS@
+ LDFLAGS		= @LDFLAGS@
+ 
+@@ -26,6 +27,7 @@
+ 
+ bindir		= $(DESTDIR)@bindir@
+ mandir		= $(DESTDIR)@mandir@/man1
++
+ manext		= 1
+ 
+ x		= @PROG_EXT@
+@@ -50,7 +52,8 @@
+ 
+ install: all installdirs
+ 	$(INSTALL_PROGRAM) $(PROG) $(bindir)/$(PROG)
+-	$(INSTALL_PROGRAM) $(THIS).hlp $(bindir)/$(THIS).hlp
++	mkdir -p $(datadir)
++	$(INSTALL_DATA) $(srcdir)/$(THIS).hlp $(datadir)/$(THIS).hlp
+ 	$(INSTALL_DATA) $(srcdir)/$(THIS).1 $(mandir)/$(THIS).$(manext)
+ 
+ installdirs:
+@@ -58,7 +61,8 @@
+ 
+ uninstall:
+ 	rm -f $(bindir)/$(PROG)
+-	rm -f $(bindir)/$(THIS).hlp
++	rm -f $(datadir)/$(THIS).hlp
++	rmdir $(datadir)
+ 	rm -f $(mandir)/$(THIS).$(manext)
+ 
+ mostlyclean:
