--- empty-expect-0.6.18b.orig/debian/examples
+++ empty-expect-0.6.18b/debian/examples
@@ -0,0 +1 @@
+examples/*
--- empty-expect-0.6.18b.orig/debian/compat
+++ empty-expect-0.6.18b/debian/compat
@@ -0,0 +1 @@
+5
--- empty-expect-0.6.18b.orig/debian/changelog
+++ empty-expect-0.6.18b/debian/changelog
@@ -0,0 +1,63 @@
+empty-expect (0.6.18b-2) unstable; urgency=low
+
+  * debian/patches/01_logfile.diff: Moved existing change to a patch file.
+  * debian/patches/02_typos.diff: Added.  Fixes typos.  Closes: #521656.
+
+ -- Bart Martens <bartm@debian.org>  Thu, 29 Oct 2009 17:29:34 +0100
+
+empty-expect (0.6.18b-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Bart Martens <bartm@debian.org>  Thu, 06 Aug 2009 21:37:34 +0200
+
+empty-expect (0.6.17b-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Bart Martens <bartm@debian.org>  Sat, 02 May 2009 17:41:07 +0200
+
+empty-expect (0.6.16b-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Bart Martens <bartm@debian.org>  Wed, 31 Dec 2008 20:26:47 +0100
+
+empty-expect (0.6.15b-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Bart Martens <bartm@debian.org>  Sat, 02 Feb 2008 08:34:02 +0100
+
+empty-expect (0.6.14b-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Bart Martens <bartm@debian.org>  Wed, 05 Dec 2007 22:35:28 +0100
+
+empty-expect (0.6.12b-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Bart Martens <bartm@debian.org>  Sun, 04 Nov 2007 18:47:14 +0100
+
+empty-expect (0.6.11b-3) unstable; urgency=low
+
+  * empty.1, empty.c: Changed default mode of the log file from 0700 to 0600,
+    and added option "--logfile-mode=mode".  Closes: #443448.
+
+ -- Bart Martens <bartm@knars.be>  Sun, 23 Sep 2007 08:54:08 +0200
+
+empty-expect (0.6.11b-2) unstable; urgency=low
+
+  * debian/changelog, debian/control: Source and binary package renamed as
+    requested by ftpmaster.
+
+ -- Bart Martens <bartm@knars.be>  Thu, 02 Aug 2007 19:11:25 +0200
+
+empty (0.6.11b-1) unstable; urgency=low
+
+  * Initial release.  Closes: #433844.
+
+ -- Bart Martens <bartm@knars.be>  Thu, 19 Jul 2007 20:49:02 +0200
+
--- empty-expect-0.6.18b.orig/debian/control
+++ empty-expect-0.6.18b/debian/control
@@ -0,0 +1,19 @@
+Source: empty-expect
+Section: interpreters
+Priority: optional
+Maintainer: Bart Martens <bartm@debian.org>
+Build-Depends: cdbs, debhelper (>= 5)
+Standards-Version: 3.8.3
+Homepage: http://empty.sourceforge.net/
+
+Package: empty-expect
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Run processes and applications under pseudo-terminal
+ empty is a utility that provides an interface to execute and/or interact with
+ processes under pseudo-terminal sessions (PTYs). This tool is useful in
+ programming of shell scripts designed to communicate with interactive programs
+ like telnet, ssh, ftp, etc. In some cases empty can be the simplest
+ replacement for Tcl/expect or other similar programming tools because empty
+ can be easily invoked directly from shell prompt or script, and does not use
+ Tcl, Perl, PHP, Python or anything else as an underlying language.
--- empty-expect-0.6.18b.orig/debian/watch
+++ empty-expect-0.6.18b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts="uversionmangle=s/(\d)[\-_]?(rc\d+|pre-rc\d+|pre\d+a?)$/$1~$2/;s/[\-\.](source|Source|src|orig|unix)$//;s/-(bin|osx)$/~$1/;s/^v(\d)/$1/;" \
+http://sf.net/empty/empty[\-_](v?[\d\.]+(?:rc|rc\d+|pre-rc\d+|-unix|-source|-Source|-src|\.src|\.orig|[a-z]|b\d+|beta\d+-src|beta\d+)?)\.(?:tar\.gz|tgz|tar\.bz2|zip|pm\.gz|jar|shar\.gz|shar\.Z)
--- empty-expect-0.6.18b.orig/debian/copyright
+++ empty-expect-0.6.18b/debian/copyright
@@ -0,0 +1,43 @@
+This package was debianized by Bart Martens <bartm@knars.be> on
+Thu, 19 Jul 2007 20:49:02 +0200.
+
+It was downloaded from http://empty.sourceforge.net/
+
+Copyright and license:
+
+/* empty - run processes under pseudo-terminal sessions
+ * 
+ * Copyright (C) 2005-2009 Mikhail E. Zakharov
+ * empty was written by Mikhail E. Zakharov. This software was based on the 
+ * basic idea of pty version 4.0 Copyright (c) 1992, Daniel J. Bernstein, but
+ * no code was ported from pty4.
+ * 
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions 
+ *  are met:
+ *  
+ *  1. Redistributions of source code must retain the above copyright
+ *     notice immediately at the beginning of the file, without modification,
+ *     this list of conditions, and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *  3. The name of the author may not be used to endorse or promote products
+ *     derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+ * SUCH DAMAGE.
+ */
+
+The Debian packaging is
+Copyright (C) 2007-2009, Bart Martens <bartm@knars.be>
+and is licensed under the GPL version 2, see `/usr/share/common-licenses/GPL-2'.
--- empty-expect-0.6.18b.orig/debian/install
+++ empty-expect-0.6.18b/debian/install
@@ -0,0 +1 @@
+empty usr/bin/
--- empty-expect-0.6.18b.orig/debian/manpages
+++ empty-expect-0.6.18b/debian/manpages
@@ -0,0 +1 @@
+empty.1
--- empty-expect-0.6.18b.orig/debian/rules
+++ empty-expect-0.6.18b/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/makefile.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+
+DEB_INSTALL_CHANGELOGS_ALL += CHANGELOG
--- empty-expect-0.6.18b.orig/debian/patches/02_typos.diff
+++ empty-expect-0.6.18b/debian/patches/02_typos.diff
@@ -0,0 +1,25 @@
+Patch by "A. Costa" <agcosta@gis.net>, thanks.
+Closes: #521656 'man empty' typos: "interfase" and "specitied"
+
+--- empty.1.orig	2008-12-31 15:00:48.000000000 -0500
++++ empty.1	2009-03-29 05:08:30.000000000 -0400
+@@ -54,7 +54,7 @@
+ .B EXAMPLES 
+ section for the details. To simplify this operations,
+ .B empty
+-offers an interfase to just
++offers an interface to just
+ .B send
+ any data (use
+ .B \-s
+@@ -100,7 +100,7 @@
+ with its job control algorithm will create them under /tmp directory using this templates: empty.PPID.PID.in and empty.PPID.PID.out, here PPID is usually your shell system process ID and PID is system process ID of empty-daemon.
+ .TP
+ \-s
+-send data (request) to the forked process. If fifo file was not specitied with
++send data (request) to the forked process. If fifo file was not specified with
+ .B \-o
+ key,
+ .B empty 
+
+
--- empty-expect-0.6.18b.orig/debian/patches/01_logfile.diff
+++ empty-expect-0.6.18b/debian/patches/01_logfile.diff
@@ -0,0 +1,70 @@
+empty.1, empty.c: Changed default mode of the log file from 0700 to 0600,
+and added option "--logfile-mode=mode".  Closes: #443448.
+
+
+diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/empty-0.6.16b/empty.1 ./empty.1
+--- ../orig/empty-0.6.16b/empty.1	2008-11-24 10:04:45.000000000 +0100
++++ ./empty.1	2009-04-19 21:01:15.000000000 +0200
+@@ -175,6 +175,10 @@
+ .B empty
+ session to a file. Marks >>> and <<< show the directions of data flow.
+ .TP
++\-\-logfile-mode=mode
++This option allows to choose the mode of the log file created with the -L option.
++The default mode is 0600.
++.TP
+ \-p file.pid
+ Save PID of empty daemon process to a file
+ .TP
+diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/empty-0.6.16b/empty.c ./empty.c
+--- ../orig/empty-0.6.16b/empty.c	2008-11-21 10:41:02.000000000 +0100
++++ ./empty.c	2009-04-19 20:54:01.000000000 +0200
+@@ -38,6 +38,9 @@
+ #endif
+ 
+ 
++#define _GNU_SOURCE
++#include <getopt.h>
++
+ #include <unistd.h>
+ #include <sys/types.h>
+ 
+@@ -206,12 +209,28 @@
+ 	int	pgrp;
+ #endif
+ 
++	unsigned int logfile_mode = S_IRUSR | S_IWUSR; // was: S_IRWXU;
++
++	static struct option long_options[] =
++	{
++		{ "logfile-mode", 1, 0, 0 },
++		{ NULL, 0, 0, 0 }
++	};
++
++	int option_index = -1;
++
+ #ifndef __linux__
+ 	while ((ch = getopt(argc, argv, "Scvhfrb:kwslp:i:o:t:L:")) != -1)
+ #else
+-	while ((ch = getopt(argc, argv, "+Scvhfrb:kwslp:i:o:t:L:")) != -1)
++	while ((ch = getopt_long(argc, argv, "+Scvhfrb:kwslp:i:o:t:L:", long_options, &option_index)) != -1)
+ #endif
+ 		switch (ch) {
++			case 0:
++				if( option_index >= 0
++				&& strcmp( long_options[option_index].name, "logfile-mode" ) == 0
++				&& optarg )
++					sscanf( optarg, "%o", &logfile_mode );
++				break;
+ 			case 'f':
+ 				fflg = 1;
+ 				break;
+@@ -481,7 +500,7 @@
+ 	}
+ 
+ 	if (Lflg)
+-		if ((lfd = open(sl, O_CREAT|O_WRONLY|O_APPEND, S_IRWXU)) == -1)
++		if ((lfd = open(sl, O_CREAT|O_WRONLY|O_APPEND, logfile_mode)) == -1)
+ 			(void)syslog(LOG_NOTICE,
+ 				"Warning: Can't open %s for session-log %m", sl);
+ 
