Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 pcal (4.11.0-2) unstable; urgency=low
 .
   * lintian fixes
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- pcal-4.11.0.orig/Makefile
+++ pcal-4.11.0/Makefile
@@ -118,7 +118,7 @@ else   # Unix
 	D_BUILD_ENV	= -DBUILD_ENV_UNIX
 	PCAL		= pcal
 	CC		= /usr/bin/gcc
-	PACK		= compress
+	PACK		= gzip -9
 	# PACK		= pack
 	# PACK		= gzip
 endif
@@ -147,9 +147,9 @@ ifeq ($(OS),DJGPP)   # DOS+DJGPP
 	MANDIR = $(DJDIR)/man/man1
 	CATDIR = $(DJDIR)/man/cat1
 else   # Unix
-	BINDIR = /usr/local/bin
-	MANDIR = /usr/man/man1
-	CATDIR = /usr/man/cat1
+	BINDIR = usr/bin
+	MANDIR = usr/share/man/man1
+	CATDIR = usr/man/cat1
 endif
 
 OBJECTS = $(OBJDIR)/pcal.o \
@@ -279,11 +279,11 @@ COPTS = $(D_MAPFONTS) $(D_TITLEFONT) $(D
 ifeq ($(OS),DJGPP)   # DOS+DJGPP
 	CFLAGS = -Wall -W
 else   # Unix
-	CFLAGS = -O2 -Wall -W
+	CFLAGS = -g -O2 -Wall -W
 endif
 
 $(EXECDIR)/$(PCAL):	$(OBJECTS)
-	$(CC) $(LDFLAGS) -o $(EXECDIR)/$(PCAL) $(OBJECTS) -lm
+	$(CC) $(LDFLAGS) -o $(EXECDIR)/$(PCAL) $(OBJECTS) -lm -lpaper
 	@ echo Build of $(PCAL) for $(OS_NAME) completed.
 
 $(OBJDIR)/encvec.o:	$(SRCDIR)/encvec.c
@@ -350,9 +350,9 @@ man:	$(DOCDIR)/pcal.man
 install:	$(EXECDIR)/$(PCAL) man
 	mkdir -p $(DESTDIR)/$(BINDIR)
 	mkdir -p $(DESTDIR)/$(MANDIR)
-	mkdir -p $(DESTDIR)/$(CATDIR)
+#	mkdir -p $(DESTDIR)/$(CATDIR)
 	cp $(EXECDIR)/$(PCAL) $(DESTDIR)/$(BINDIR)
 	cp $(DOCDIR)/pcal.man $(DESTDIR)/$(MANDIR)/pcal.1
 	$(PACK) $(DESTDIR)/$(MANDIR)/pcal.1
-	cp $(DOCDIR)/pcal.cat $(DESTDIR)/$(CATDIR)/pcal.1
-	$(PACK) $(DESTDIR)/$(CATDIR)/pcal.1
+#	cp $(DOCDIR)/pcal.cat $(DESTDIR)/$(CATDIR)/pcal.1
+#	$(PACK) $(DESTDIR)/$(CATDIR)/pcal.1
--- pcal-4.11.0.orig/doc/pcal.man
+++ pcal-4.11.0/doc/pcal.man
@@ -373,7 +373,9 @@ the `SEARCH_PCAL_DIR' flag) when
 .I pcal
 was built, the directory where the
 .I pcal
-executable resides will be checked.  If no date file is found, an empty
+executable resides will be checked.  (This final search of the
+executable directory has been disabled in the version shipped with
+Debian.)  If no date file is found, an empty
 calendar is printed; no error is generated.
 .PP
 Alternatively, the name of the date file (and, optionally, the path where it
@@ -2238,6 +2240,6 @@ Angelo Haritsis.  Additional languages w
 (Esperanto), Lars Wirzenius (Finnish), Pedro Zorzenon Neto (Portuguese), Joel
 Fredrikson (Swedish), Volodymyr M. Lisivka (Ukrainian), Neeme Praks (Estonian,
 Russian, Latvian, Lithuanian), Peter Cernoch (Czech), Ferenc Kruzslicz
-(Hungarian), Carles Sadurní Anguita (Catalan), Dominik 'Chiron' Derlatka
+(Hungarian), Carles Sadurni Anguita (Catalan), Dominik 'Chiron' Derlatka
 (Polish), Ewald Beekman (Dutch), Claudiu Costin (Romanian), Kenneth Geisshirt
 (Danish), Zdenko Podobny (Slovak), and Eric Nichols (Hawaiian).
--- pcal-4.11.0.orig/src/pcal.c
+++ pcal-4.11.0/src/pcal.c
@@ -749,6 +749,31 @@ DEBUG_INFO debug_info[] = {
 /* to be filled in by display_usage() */
 static char Xtval[VALSIZ], Ytval[VALSIZ], Xsval[VALSIZ], Ysval[VALSIZ], Ncopy[VALSIZ];
 
+#include <paper.h>
+static int
+init_paper_size() {
+
+  const char *s;
+  unsigned i;
+
+  paperinit();
+
+  if (!(s=systempapername())) {
+    fprintf(stderr,"Cannot find system paper name\n");
+    paperdone();
+    exit(1);
+  }
+
+  paperdone();
+
+  for (i=0;i<NUM_PAPER_SIZES && strcasecmp(s,paper_info[i].name);i++);
+  paper_size = i<NUM_PAPER_SIZES ? i : PAPERSIZE_DEFAULT;
+
+  return 0;
+
+}
+
+
 /*
  * Message strings to be printed by usage() - translate as necessary
  */
@@ -2159,6 +2184,9 @@ int main (int argc GCC_UNUSED, char **ar
 
    mk_path(progpath, find_executable(*argv));
 
+   /* libpaper support*/
+   init_paper_size();
+ 
    /*
     * Get the arguments from a) the command line (pre-pass to pick up debug
     * and usage flags), b) the environment variable PCAL_OPTS, c) the first
--- pcal-4.11.0.orig/src/readfile.c
+++ pcal-4.11.0/src/readfile.c
@@ -805,7 +805,8 @@ int do_include (char *path, char *name,
 
    /* copy name, stripping "" or <> */
    strcpy(tmpnam, name + (*name == '"' || *name == '<'));
-   if ((p = P_LASTCHAR(tmpnam)) && (*p == '"' || *p == '>')) *p = '\0';
+   p = tmpnam;
+   if ((p = P_LASTCHAR(p)) && (*p == '"' || *p == '>')) *p = '\0';
 
    /* save year and unmunged file name */
    sv_curr_year = curr_year;
