diff -Nurb orig/README.unix mpack-1.6/README.unix
--- orig/README.unix	2003-07-21 21:35:14.000000000 +0000
+++ mpack-1.6/README.unix	2004-11-12 11:35:38.210257832 +0000
@@ -188,7 +188,7 @@
 
      TMPDIR
           Root of directory to store partial messages awaiting 
-          reassembly.  Default is "/usr/tmp".   Partial messages
+          reassembly.  Default is "/var/tmp".   Partial messages
 	  are stored in subdirectories of $TMPDIR/m-prts-$USER/
 
 
diff -Nurb orig/changelog mpack-1.6/changelog
--- orig/changelog	1970-01-01 00:00:00.000000000 +0000
+++ mpack-1.6/changelog	2004-11-12 11:35:38.211257680 +0000
@@ -0,0 +1,243 @@
+mpack (1.6-1) unstable; urgency=low
+
+  * New upstream version, incorporating a number of Debian patches.
+  * Forward ported Debian patches:
+      - /usr/tmp to /var/tmp
+      - unixpk.c: Don't declare extern int errno
+  * munpack: Mention -t in usage info.  Closes: #182825, reported by
+    Dan Jacobson.
+  * Minor changes to function prototypes to fix the more alarming warnings.
+  * Invoke configure instead of just make, now that upstream uses autoconf.
+  * debian/rules: clean now deletes some autoconf junk.
+  * debian/rules: update DEB_BUILD_OPTIONS support to noopt and nostrip.
+  * debian/control: Recommend uudeview instead.
+  * Dropped postinst and prerm, since /usr/doc symlinks are no longer needed.
+  * debian/control: Update to standards version 3.6.0.
+
+ -- Richard Braakman <dark@xs4all.nl>  Fri, 25 Jul 2003 19:35:28 +0300
+
+mpack (1.5-9) unstable; urgency=low
+
+  * Handle empty parameter lists without crashing, such as in
+    "Content-Type: text/plain;".  Thanks to Henry Grebler for
+    finding this bug.
+  * [SECURITY] Do not accept disposition filenames like "../a".
+    Security impact is limited because only a single leading "../"
+    was accepted.  (closes #134210, reported by Herbert Xu)
+
+ -- Richard Braakman <dark@xs4all.nl>  Wed, 17 Jul 2002 12:01:31 +0300
+
+mpack (1.5-8) unstable; urgency=high
+
+  * [SECURITY] Fix buffer overflows in parsing of MIME headers.
+  * Removed emacs variables from the end of this changelog file.
+
+ -- Richard Braakman <dark@xs4all.nl>  Tue, 16 Jul 2002 01:50:55 +0300
+
+mpack (1.5-7) unstable; urgency=low
+
+  * Only declare "extern int errno" if errno is not a macro.
+
+ -- Richard Braakman <dark@xs4all.nl>  Sun, 20 May 2001 19:30:45 +0300
+
+mpack (1.5-6) unstable; urgency=low
+
+  * Made /var/tmp the default temp directory for mpack, just like
+    it is for munpack.  It used to be /tmp.  Also fixed the mpack
+    manpage, which used to say /usr/tmp.  Spotted by Alex King.
+    (closes #81997)
+  * Moved manpages to /usr/share.
+  * Made debian/rules sensitive to DEB_BUILD_OPTIONS environment variable.
+  * Moved documentation to /usr/share/doc/mpack.
+  * debian/postinst, prerm: Handle compatibility symlink /usr/doc/mpack.
+  * Set Standards-Version to 3.2.1.
+
+ -- Richard Braakman <dark@xs4all.nl>  Sun, 28 Jan 2001 12:31:17 +0200
+
+mpack (1.5-5) unstable; urgency=low
+
+  * Removed README.Debian and moved some bits of it to the copyright file.
+  * Standards-Version 2.4.0.0.
+
+ -- Richard Braakman <dark@xs4all.nl>  Sat,  7 Feb 1998 12:39:11 +0100
+
+mpack (1.5-4) unstable; urgency=low
+
+  * Changed TMPDIR default from /usr/tmp to /var/tmp for FSSTND compliance.
+  * Upgraded to policy version 2.3.0.1.
+  * Renamed README.debian to README.Debian.
+  * Don't use debmake.
+  
+ -- Richard Braakman <dark@xs4all.nl>  Sun, 18 Jan 1998 02:03:47 +0100
+
+mpack (1.5-3) unstable; urgency=low
+
+  * Only Suggest rather than Recommend (#5628, #6616, #6881)
+  * Don't stall on non-printable characters in Subject: header (#11148)
+  * Upgraded to policy version 2.1.2.2
+  * Changed to new source format (#9450)
+  * New maintainer
+
+ -- Richard Braakman <dark@xs4all.nl>  Mon, 14 Jul 1997 21:52:05 +0200
+mpack (1.6-1) unstable; urgency=low
+
+  * New upstream version, incorporating a number of Debian patches.
+  * Forward ported Debian patches:
+      - /usr/tmp to /var/tmp
+      - unixpk.c: Don't declare extern int errno
+  * munpack: Mention -t in usage info.  Closes: #182825, reported by
+    Dan Jacobson.
+  * Minor changes to function prototypes to fix the more alarming warnings.
+  * Invoke configure instead of just make, now that upstream uses autoconf.
+  * debian/rules: clean now deletes some autoconf junk.
+  * debian/rules: update DEB_BUILD_OPTIONS support to noopt and nostrip.
+  * debian/control: Recommend uudeview instead.
+  * Dropped postinst and prerm, since /usr/doc symlinks are no longer needed.
+  * debian/control: Update to standards version 3.6.0.
+
+ -- Richard Braakman <dark@xs4all.nl>  Fri, 25 Jul 2003 19:35:28 +0300
+
+mpack (1.5-9) unstable; urgency=low
+
+  * Handle empty parameter lists without crashing, such as in
+    "Content-Type: text/plain;".  Thanks to Henry Grebler for
+    finding this bug.
+  * [SECURITY] Do not accept disposition filenames like "../a".
+    Security impact is limited because only a single leading "../"
+    was accepted.  (closes #134210, reported by Herbert Xu)
+
+ -- Richard Braakman <dark@xs4all.nl>  Wed, 17 Jul 2002 12:01:31 +0300
+
+mpack (1.5-8) unstable; urgency=high
+
+  * [SECURITY] Fix buffer overflows in parsing of MIME headers.
+  * Removed emacs variables from the end of this changelog file.
+
+ -- Richard Braakman <dark@xs4all.nl>  Tue, 16 Jul 2002 01:50:55 +0300
+
+mpack (1.5-7) unstable; urgency=low
+
+  * Only declare "extern int errno" if errno is not a macro.
+
+ -- Richard Braakman <dark@xs4all.nl>  Sun, 20 May 2001 19:30:45 +0300
+
+mpack (1.5-6) unstable; urgency=low
+
+  * Made /var/tmp the default temp directory for mpack, just like
+    it is for munpack.  It used to be /tmp.  Also fixed the mpack
+    manpage, which used to say /usr/tmp.  Spotted by Alex King.
+    (closes #81997)
+  * Moved manpages to /usr/share.
+  * Made debian/rules sensitive to DEB_BUILD_OPTIONS environment variable.
+  * Moved documentation to /usr/share/doc/mpack.
+  * debian/postinst, prerm: Handle compatibility symlink /usr/doc/mpack.
+  * Set Standards-Version to 3.2.1.
+
+ -- Richard Braakman <dark@xs4all.nl>  Sun, 28 Jan 2001 12:31:17 +0200
+
+mpack (1.5-5) unstable; urgency=low
+
+  * Removed README.Debian and moved some bits of it to the copyright file.
+  * Standards-Version 2.4.0.0.
+
+ -- Richard Braakman <dark@xs4all.nl>  Sat,  7 Feb 1998 12:39:11 +0100
+
+mpack (1.5-4) unstable; urgency=low
+
+  * Changed TMPDIR default from /usr/tmp to /var/tmp for FSSTND compliance.
+  * Upgraded to policy version 2.3.0.1.
+  * Renamed README.debian to README.Debian.
+  * Don't use debmake.
+  
+ -- Richard Braakman <dark@xs4all.nl>  Sun, 18 Jan 1998 02:03:47 +0100
+
+mpack (1.5-3) unstable; urgency=low
+
+  * Only Suggest rather than Recommend (#5628, #6616, #6881)
+  * Don't stall on non-printable characters in Subject: header (#11148)
+  * Upgraded to policy version 2.1.2.2
+  * Changed to new source format (#9450)
+  * New maintainer
+
+ -- Richard Braakman <dark@xs4all.nl>  Mon, 14 Jul 1997 21:52:05 +0200
+mpack (1.6-1) unstable; urgency=low
+
+  * New upstream version, incorporating a number of Debian patches.
+  * Forward ported Debian patches:
+      - /usr/tmp to /var/tmp
+      - unixpk.c: Don't declare extern int errno
+  * munpack: Mention -t in usage info.  Closes: #182825, reported by
+    Dan Jacobson.
+  * Minor changes to function prototypes to fix the more alarming warnings.
+  * Invoke configure instead of just make, now that upstream uses autoconf.
+  * debian/rules: clean now deletes some autoconf junk.
+  * debian/rules: update DEB_BUILD_OPTIONS support to noopt and nostrip.
+  * debian/control: Recommend uudeview instead.
+  * Dropped postinst and prerm, since /usr/doc symlinks are no longer needed.
+  * debian/control: Update to standards version 3.6.0.
+
+ -- Richard Braakman <dark@xs4all.nl>  Fri, 25 Jul 2003 19:35:28 +0300
+
+mpack (1.5-9) unstable; urgency=low
+
+  * Handle empty parameter lists without crashing, such as in
+    "Content-Type: text/plain;".  Thanks to Henry Grebler for
+    finding this bug.
+  * [SECURITY] Do not accept disposition filenames like "../a".
+    Security impact is limited because only a single leading "../"
+    was accepted.  (closes #134210, reported by Herbert Xu)
+
+ -- Richard Braakman <dark@xs4all.nl>  Wed, 17 Jul 2002 12:01:31 +0300
+
+mpack (1.5-8) unstable; urgency=high
+
+  * [SECURITY] Fix buffer overflows in parsing of MIME headers.
+  * Removed emacs variables from the end of this changelog file.
+
+ -- Richard Braakman <dark@xs4all.nl>  Tue, 16 Jul 2002 01:50:55 +0300
+
+mpack (1.5-7) unstable; urgency=low
+
+  * Only declare "extern int errno" if errno is not a macro.
+
+ -- Richard Braakman <dark@xs4all.nl>  Sun, 20 May 2001 19:30:45 +0300
+
+mpack (1.5-6) unstable; urgency=low
+
+  * Made /var/tmp the default temp directory for mpack, just like
+    it is for munpack.  It used to be /tmp.  Also fixed the mpack
+    manpage, which used to say /usr/tmp.  Spotted by Alex King.
+    (closes #81997)
+  * Moved manpages to /usr/share.
+  * Made debian/rules sensitive to DEB_BUILD_OPTIONS environment variable.
+  * Moved documentation to /usr/share/doc/mpack.
+  * debian/postinst, prerm: Handle compatibility symlink /usr/doc/mpack.
+  * Set Standards-Version to 3.2.1.
+
+ -- Richard Braakman <dark@xs4all.nl>  Sun, 28 Jan 2001 12:31:17 +0200
+
+mpack (1.5-5) unstable; urgency=low
+
+  * Removed README.Debian and moved some bits of it to the copyright file.
+  * Standards-Version 2.4.0.0.
+
+ -- Richard Braakman <dark@xs4all.nl>  Sat,  7 Feb 1998 12:39:11 +0100
+
+mpack (1.5-4) unstable; urgency=low
+
+  * Changed TMPDIR default from /usr/tmp to /var/tmp for FSSTND compliance.
+  * Upgraded to policy version 2.3.0.1.
+  * Renamed README.debian to README.Debian.
+  * Don't use debmake.
+  
+ -- Richard Braakman <dark@xs4all.nl>  Sun, 18 Jan 1998 02:03:47 +0100
+
+mpack (1.5-3) unstable; urgency=low
+
+  * Only Suggest rather than Recommend (#5628, #6616, #6881)
+  * Don't stall on non-printable characters in Subject: header (#11148)
+  * Upgraded to policy version 2.1.2.2
+  * Changed to new source format (#9450)
+  * New maintainer
+
+ -- Richard Braakman <dark@xs4all.nl>  Mon, 14 Jul 1997 21:52:05 +0200
diff -Nurb orig/control mpack-1.6/control
--- orig/control	1970-01-01 00:00:00.000000000 +0000
+++ mpack-1.6/control	2004-11-12 11:35:38.212257528 +0000
@@ -0,0 +1,57 @@
+Source: mpack
+Section: mail
+Priority: standard
+Maintainer: Richard Braakman <dark@xs4all.nl>
+Standards-Version: 3.6.0
+
+Package: mpack
+Architecture: any
+Depends: ${shlibs:Depends}
+Suggests: mail-transport-agent, inewsinn | inews
+Description: tools for encoding/decoding MIME messages
+ Mpack and munpack are utilities for encoding and decoding
+ (respectively) binary files in MIME (Multipurpose Internet
+ Mail Extensions) format mail messages. For compatibility
+ with older forms of transferring binary files, the munpack
+ program can also decode messages in split-uuencoded format.
+ .
+ Instead of munpack, the package maintainer recommends the
+ more versatile package uudeview.
+Source: mpack
+Section: mail
+Priority: standard
+Maintainer: Richard Braakman <dark@xs4all.nl>
+Standards-Version: 3.6.0
+
+Package: mpack
+Architecture: any
+Depends: ${shlibs:Depends}
+Suggests: mail-transport-agent, inewsinn | inews
+Description: tools for encoding/decoding MIME messages
+ Mpack and munpack are utilities for encoding and decoding
+ (respectively) binary files in MIME (Multipurpose Internet
+ Mail Extensions) format mail messages. For compatibility
+ with older forms of transferring binary files, the munpack
+ program can also decode messages in split-uuencoded format.
+ .
+ Instead of munpack, the package maintainer recommends the
+ more versatile package uudeview.
+Source: mpack
+Section: mail
+Priority: standard
+Maintainer: Richard Braakman <dark@xs4all.nl>
+Standards-Version: 3.6.0
+
+Package: mpack
+Architecture: any
+Depends: ${shlibs:Depends}
+Suggests: mail-transport-agent, inewsinn | inews
+Description: tools for encoding/decoding MIME messages
+ Mpack and munpack are utilities for encoding and decoding
+ (respectively) binary files in MIME (Multipurpose Internet
+ Mail Extensions) format mail messages. For compatibility
+ with older forms of transferring binary files, the munpack
+ program can also decode messages in split-uuencoded format.
+ .
+ Instead of munpack, the package maintainer recommends the
+ more versatile package uudeview.
diff -Nurb orig/copyright mpack-1.6/copyright
--- orig/copyright	1970-01-01 00:00:00.000000000 +0000
+++ mpack-1.6/copyright	2004-11-12 11:35:38.212257528 +0000
@@ -0,0 +1,120 @@
+This is the Debian GNU/Linux prepackaged version of mpack and munpack,
+utilities for encoding and decoding binary files in MIME format
+messages.
+
+This version of the package was made by Richard Braakman
+<dark@xs4all.nl>, from the source archive
+
+    ftp://ftp.andrew.cmu.edu/pub/mpack/mpack-1.6.tar.gz
+
+Earlier versions were maintained by Robert Leslie <rob@mars.org>.
+
+Mpack is distributed under the following license:
+
+  (C) Copyright 1993,1994 by Carnegie Mellon University
+  All Rights Reserved.
+
+  Permission to use, copy, modify, distribute, and sell this software
+  and its documentation for any purpose is hereby granted without fee,
+  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 Carnegie Mellon
+  University not be used in advertising or publicity pertaining to
+  distribution of the software without specific, written prior
+  permission.  Carnegie Mellon University makes no representations about
+  the suitability of this software for any purpose.  It is provided "as
+  is" without express or implied warranty.
+
+  CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+  AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY 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.
+
+  Portions of this software are derived from code written by Bell
+  Communications Research, Inc. (Bellcore) and by RSA Data Security,
+  Inc. and bear similar copyrights and disclaimers of warranty.
+
+This is the Debian GNU/Linux prepackaged version of mpack and munpack,
+utilities for encoding and decoding binary files in MIME format
+messages.
+
+This version of the package was made by Richard Braakman
+<dark@xs4all.nl>, from the source archive
+
+    ftp://ftp.andrew.cmu.edu/pub/mpack/mpack-1.6.tar.gz
+
+Earlier versions were maintained by Robert Leslie <rob@mars.org>.
+
+Mpack is distributed under the following license:
+
+  (C) Copyright 1993,1994 by Carnegie Mellon University
+  All Rights Reserved.
+
+  Permission to use, copy, modify, distribute, and sell this software
+  and its documentation for any purpose is hereby granted without fee,
+  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 Carnegie Mellon
+  University not be used in advertising or publicity pertaining to
+  distribution of the software without specific, written prior
+  permission.  Carnegie Mellon University makes no representations about
+  the suitability of this software for any purpose.  It is provided "as
+  is" without express or implied warranty.
+
+  CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+  AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY 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.
+
+  Portions of this software are derived from code written by Bell
+  Communications Research, Inc. (Bellcore) and by RSA Data Security,
+  Inc. and bear similar copyrights and disclaimers of warranty.
+
+This is the Debian GNU/Linux prepackaged version of mpack and munpack,
+utilities for encoding and decoding binary files in MIME format
+messages.
+
+This version of the package was made by Richard Braakman
+<dark@xs4all.nl>, from the source archive
+
+    ftp://ftp.andrew.cmu.edu/pub/mpack/mpack-1.6.tar.gz
+
+Earlier versions were maintained by Robert Leslie <rob@mars.org>.
+
+Mpack is distributed under the following license:
+
+  (C) Copyright 1993,1994 by Carnegie Mellon University
+  All Rights Reserved.
+
+  Permission to use, copy, modify, distribute, and sell this software
+  and its documentation for any purpose is hereby granted without fee,
+  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 Carnegie Mellon
+  University not be used in advertising or publicity pertaining to
+  distribution of the software without specific, written prior
+  permission.  Carnegie Mellon University makes no representations about
+  the suitability of this software for any purpose.  It is provided "as
+  is" without express or implied warranty.
+
+  CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+  AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY 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.
+
+  Portions of this software are derived from code written by Bell
+  Communications Research, Inc. (Bellcore) and by RSA Data Security,
+  Inc. and bear similar copyrights and disclaimers of warranty.
+
diff -Nurb orig/mkreadme.pl mpack-1.6/mkreadme.pl
--- orig/mkreadme.pl	2003-07-21 21:34:12.000000000 +0000
+++ mpack-1.6/mkreadme.pl	2004-11-12 11:35:38.210257832 +0000
@@ -413,7 +413,7 @@
 =unix
      TMPDIR
           Root of directory to store partial messages awaiting 
-          reassembly.  Default is "/usr/tmp".   Partial messages
+          reassembly.  Default is "/var/tmp".   Partial messages
 	  are stored in subdirectories of $TMPDIR/m-prts-$USER/
 
 =pc os2
diff -Nurb orig/part.c mpack-1.6/part.c
--- orig/part.c	2003-07-21 20:35:31.000000000 +0000
+++ mpack-1.6/part.c	2004-11-12 11:35:38.210257832 +0000
@@ -58,7 +58,7 @@
 /*
  * Close and free 'part'.
  */
-int part_close(struct part *part)
+void part_close(struct part *part)
 {
     fclose(part->infile);
     if (part->buf) free(part->buf);
@@ -77,8 +77,7 @@
 /*
  * Add to 'part' the multipart boundary 'boundary'.
  */
-int
-part_addboundary(struct part *part, char *boundary)
+void part_addboundary(struct part *part, char *boundary)
 {
     /* Grow boundary array if necessary */
     if (part->boundary_num == part->boundary_alloc) {
@@ -165,8 +164,7 @@
  * Leaves room in the input buffer to push back an additional single
  * character using the prot_ungetc() macro.
  */
-int
-part_ungets(char *s, struct part *part)
+void part_ungets(char *s, struct part *part)
 {
     int len = strlen(s);
     int i;
diff -Nurb orig/rules mpack-1.6/rules
--- orig/rules	1970-01-01 00:00:00.000000000 +0000
+++ mpack-1.6/rules	2004-11-12 11:35:38.212257528 +0000
@@ -0,0 +1,186 @@
+#!/usr/bin/make -f
+
+DEBDIR = debian/tmp/DEBIAN
+BINDIR = debian/tmp/usr/bin
+MANDIR = debian/tmp/usr/share/man
+DOCDIR = debian/tmp/usr/share/doc/mpack
+
+ifeq (,$(findstring noopt,${DEB_BUILD_OPTIONS}))
+	OPT = -O2
+endif
+ifeq (,$(findstring nostrip,${DEB_BUILD_OPTIONS}))
+	STRIP = -s
+endif
+
+export DEB_HOST  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+build:
+	test -f debian/rules
+	./configure --prefix=/usr --build ${DEB_BUILD} --host ${DEB_BUILD}
+	make CFLAGS="${OPT} -g -Wall"
+	touch build
+
+clean:
+	test -f debian/rules
+	-rm -f build
+	-make clean
+	-rm -f debian/*~ core
+	-rm -f config.log config.cache config.status Makefile
+	-rm -f mpack.1 munpack.1
+	-rm -rf debian/tmp debian/files* debian/substvars
+
+binary-indep:
+
+binary-arch: build
+	test root = "`whoami`"
+	test -f debian/rules
+	-rm -rf debian/tmp
+# programs
+	install -d ${BINDIR}
+	install ${STRIP} -m 755 mpack ${BINDIR}
+	install ${STRIP} -m 755 munpack ${BINDIR}
+# manpages
+	install -d ${MANDIR}/man1
+	install -p -m 644 unixpk.man ${MANDIR}/man1/mpack.1
+	install -p -m 644 unixunpk.man ${MANDIR}/man1/munpack.1
+	gzip -9 ${MANDIR}/man1/*.1
+# documentation
+	install -d ${DOCDIR}
+	install -p -m 644 README.unix ${DOCDIR}
+	install -p -m 644 debian/changelog ${DOCDIR}/changelog.Debian
+	gzip -9 ${DOCDIR}/*
+	install -p -m 644 debian/copyright ${DOCDIR}
+# control files
+	install -d ${DEBDIR}
+	dpkg-shlibdeps ${BINDIR}/*
+	dpkg-gencontrol -isp
+	dpkg --build debian/tmp ..
+
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean
+#!/usr/bin/make -f
+
+DEBDIR = debian/tmp/DEBIAN
+BINDIR = debian/tmp/usr/bin
+MANDIR = debian/tmp/usr/share/man
+DOCDIR = debian/tmp/usr/share/doc/mpack
+
+ifeq (,$(findstring noopt,${DEB_BUILD_OPTIONS}))
+	OPT = -O2
+endif
+ifeq (,$(findstring nostrip,${DEB_BUILD_OPTIONS}))
+	STRIP = -s
+endif
+
+export DEB_HOST  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+build:
+	test -f debian/rules
+	./configure --prefix=/usr --build ${DEB_BUILD} --host ${DEB_BUILD}
+	make CFLAGS="${OPT} -g -Wall"
+	touch build
+
+clean:
+	test -f debian/rules
+	-rm -f build
+	-make clean
+	-rm -f debian/*~ core
+	-rm -f config.log config.cache config.status Makefile
+	-rm -f mpack.1 munpack.1
+	-rm -rf debian/tmp debian/files* debian/substvars
+
+binary-indep:
+
+binary-arch: build
+	test root = "`whoami`"
+	test -f debian/rules
+	-rm -rf debian/tmp
+# programs
+	install -d ${BINDIR}
+	install ${STRIP} -m 755 mpack ${BINDIR}
+	install ${STRIP} -m 755 munpack ${BINDIR}
+# manpages
+	install -d ${MANDIR}/man1
+	install -p -m 644 unixpk.man ${MANDIR}/man1/mpack.1
+	install -p -m 644 unixunpk.man ${MANDIR}/man1/munpack.1
+	gzip -9 ${MANDIR}/man1/*.1
+# documentation
+	install -d ${DOCDIR}
+	install -p -m 644 README.unix ${DOCDIR}
+	install -p -m 644 debian/changelog ${DOCDIR}/changelog.Debian
+	gzip -9 ${DOCDIR}/*
+	install -p -m 644 debian/copyright ${DOCDIR}
+# control files
+	install -d ${DEBDIR}
+	dpkg-shlibdeps ${BINDIR}/*
+	dpkg-gencontrol -isp
+	dpkg --build debian/tmp ..
+
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean
+#!/usr/bin/make -f
+
+DEBDIR = debian/tmp/DEBIAN
+BINDIR = debian/tmp/usr/bin
+MANDIR = debian/tmp/usr/share/man
+DOCDIR = debian/tmp/usr/share/doc/mpack
+
+ifeq (,$(findstring noopt,${DEB_BUILD_OPTIONS}))
+	OPT = -O2
+endif
+ifeq (,$(findstring nostrip,${DEB_BUILD_OPTIONS}))
+	STRIP = -s
+endif
+
+export DEB_HOST  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+build:
+	test -f debian/rules
+	./configure --prefix=/usr --build ${DEB_BUILD} --host ${DEB_BUILD}
+	make CFLAGS="${OPT} -g -Wall"
+	touch build
+
+clean:
+	test -f debian/rules
+	-rm -f build
+	-make clean
+	-rm -f debian/*~ core
+	-rm -f config.log config.cache config.status Makefile
+	-rm -f mpack.1 munpack.1
+	-rm -rf debian/tmp debian/files* debian/substvars
+
+binary-indep:
+
+binary-arch: build
+	test root = "`whoami`"
+	test -f debian/rules
+	-rm -rf debian/tmp
+# programs
+	install -d ${BINDIR}
+	install ${STRIP} -m 755 mpack ${BINDIR}
+	install ${STRIP} -m 755 munpack ${BINDIR}
+# manpages
+	install -d ${MANDIR}/man1
+	install -p -m 644 unixpk.man ${MANDIR}/man1/mpack.1
+	install -p -m 644 unixunpk.man ${MANDIR}/man1/munpack.1
+	gzip -9 ${MANDIR}/man1/*.1
+# documentation
+	install -d ${DOCDIR}
+	install -p -m 644 README.unix ${DOCDIR}
+	install -p -m 644 debian/changelog ${DOCDIR}/changelog.Debian
+	gzip -9 ${DOCDIR}/*
+	install -p -m 644 debian/copyright ${DOCDIR}
+# control files
+	install -d ${DEBDIR}
+	dpkg-shlibdeps ${BINDIR}/*
+	dpkg-gencontrol -isp
+	dpkg --build debian/tmp ..
+
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean
diff -Nurb orig/unixos.c mpack-1.6/unixos.c
--- orig/unixos.c	2003-07-21 20:54:05.000000000 +0000
+++ mpack-1.6/unixos.c	2004-11-12 11:35:38.208258136 +0000
@@ -38,7 +38,9 @@
 #define MAXHOSTNAMELEN 64
 #endif
 
+#ifndef errno
 extern int errno;
+#endif
 extern char *malloc();
 extern char *getenv();
 
@@ -90,7 +92,7 @@
 	strcpy(buf, getenv("TMPDIR"));
     }
     else {
-	strcpy(buf, "/usr/tmp");
+	strcpy(buf, "/var/tmp");
     }
     strcat(buf, "/m-prts-");
     p = getenv("USER");
diff -Nurb orig/unixpk.c mpack-1.6/unixpk.c
--- orig/unixpk.c	2003-07-21 20:50:41.000000000 +0000
+++ mpack-1.6/unixpk.c	2004-11-12 11:35:38.208258136 +0000
@@ -33,7 +33,6 @@
 
 extern char *getenv();
 
-extern int errno;
 extern int optind;
 extern char *optarg;
 
@@ -164,7 +163,7 @@
 	    strcpy(fnamebuf, getenv("TMPDIR"));
 	}
 	else {
-	    strcpy(fnamebuf, "/usr/tmp");
+	    strcpy(fnamebuf, "/var/tmp");
 	}
 	strcat(fnamebuf, "/mpackXXXXXX");
 	mktemp(fnamebuf);
diff -Nurb orig/unixpk.man mpack-1.6/unixpk.man
--- orig/unixpk.man	1995-02-16 21:39:50.000000000 +0000
+++ mpack-1.6/unixpk.man	2004-11-12 11:35:38.211257680 +0000
@@ -136,7 +136,7 @@
 .SH ENVIRONMENT
 .TP
 .B TMPDIR
-Directory to store temporary files.  Default is /usr/tmp.
+Directory to store temporary files.  Default is /var/tmp.
 .TP
 .B SPLITSIZE
 Default value of the -m switch.
diff -Nurb orig/unixunpk.c mpack-1.6/unixunpk.c
--- orig/unixunpk.c	2003-07-21 20:51:55.000000000 +0000
+++ mpack-1.6/unixunpk.c	2004-11-12 11:35:38.209257984 +0000
@@ -100,7 +100,7 @@
 
 void usage(void) {
     fprintf(stderr, "munpack version %s\n", MPACK_VERSION);
-    fprintf(stderr, "usage: munpack [-f] [-q] [-C directory] [files...]\n");
+    fprintf(stderr, "usage: munpack [-f] [-q] [-t] [-C directory] [files...]\n");
     exit(1);
 }
 
diff -Nurb orig/unixunpk.man mpack-1.6/unixunpk.man
--- orig/unixunpk.man	1995-02-16 21:39:50.000000000 +0000
+++ mpack-1.6/unixunpk.man	2004-11-12 11:35:38.211257680 +0000
@@ -107,7 +107,7 @@
 .SH ENVIRONMENT
 .TP
 .B TMPDIR
-Directory to store temporary files.  Default is /usr/tmp.
+Directory to store temporary files.  Default is /var/tmp.
 .SH FILES
 .TP
 .B $TMPDIR/m-prts-$USER/
diff -Nurb orig/uudecode.c mpack-1.6/uudecode.c
--- orig/uudecode.c	2003-07-21 20:46:37.000000000 +0000
+++ mpack-1.6/uudecode.c	2004-11-12 11:35:38.209257984 +0000
@@ -34,6 +34,7 @@
 extern FILE *os_createnewfile(char *fname);
 
 static FILE *startDescFile(char *fname);
+static void uudecodeline(char *line, FILE *outfile);
 
 
 /* Length of a normal uuencoded line, including newline */
@@ -826,7 +827,7 @@
 /*
  * Decode a uuencoded line to 'outfile'
  */
-int uudecodeline(char *line, FILE *outfile)
+static void uudecodeline(char *line, FILE *outfile)
 {
     int c, len;
 
@@ -845,7 +846,6 @@
 	}
 	line += 4;
     }
-    return;
 }
 
     
