--- epic4-2.10.1.orig/Makefile.in
+++ epic4-2.10.1/Makefile.in
@@ -125,7 +125,7 @@
 			$(MV) $(IP)$(EPIC_LINK) $(IP)$(EPIC_OLD); \
 		fi; \
 		$(RM) $(IP)$(EPIC_LINK); \
-		ln -s $(epic)-$(VERSION) $(IP)$(EPIC_LINK); \
+		mv -f $(IP)$(EPIC) $(IP)$(EPIC_LINK); \
 	fi
 
 #
@@ -147,6 +147,7 @@
 #
 scriptdir = $(epicdir)/script
 installscript: installdirs test
+	-chmod -x @srcdir@/script/*
 	-@(								\
 		if ./my_test -f $(IP)$(scriptdir)/local; then		\
 			if ./my_test -f script/local; then 		\
@@ -157,25 +158,20 @@
 	)
 	for i in @srcdir@/script/*; \
 	do \
-		if ./my_test -f $$i; then \
-			if ./my_test -x $$i; then \
-				chmod a-x $$i; \
+		target=$(IP)$(scriptdir)/`basename $$i`; \
+		if ./my_test -f $$target; then \
+			if ./my_test $$i -nt $$target; then \
+				$(INSTALL_DATA) $$i $$target; \
 			fi; \
-			target=$(IP)$(scriptdir)/`basename $$i`; \
-			if ./my_test -f $$target; then \
-				if ./my_test $$i -nt $$target; then \
-					$(INSTALL_DATA) $$i $$target; \
-				fi; \
-			elif ./my_test -f $$target.gz; then \
-				if ./my_test $$i -nt $$target.gz; then \
-					$(INSTALL_DATA) $$i $$target; \
-					gzip -f $$target; \
-				fi; \
-			else \
+		elif ./my_test -f $$target.gz; then \
+			if ./my_test $$i -nt $$target.gz; then \
 				$(INSTALL_DATA) $$i $$target; \
-				if ./my_test -f $(IP)$(scriptdir)/gzip-scripts; then \
-					gzip -f $$target; \
-				fi; \
+				gzip -f $$target; \
+			fi; \
+		else \
+			$(INSTALL_DATA) $$i $$target; \
+			if ./my_test -f $(IP)$(scriptdir)/gzip-scripts; then \
+				gzip -f $$target; \
 			fi; \
 		fi; \
 	done
--- epic4-2.10.1.orig/debian/docs
+++ epic4-2.10.1/debian/docs
@@ -0,0 +1,4 @@
+BUG_FORM
+README
+KNOWNBUGS
+UPDATES
--- epic4-2.10.1.orig/debian/watch
+++ epic4-2.10.1/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://ftp.epicsol.org/pub/epic/EPIC4-PRODUCTION/epic4-([0-9.]+).tar.gz
--- epic4-2.10.1.orig/debian/NEWS
+++ epic4-2.10.1/debian/NEWS
@@ -0,0 +1,24 @@
+epic4 (1:2.0-2) unstable; urgency=high
+
+  * New but tested features: support for IRCnet UniqueID
+    incorporated from upstream CVS.
+  * This release should be identical to the EPIC4-2.1.1 (RC1
+    for EPIC4-2.2) and, hopefully, to the final EPIC4-2.2
+    stable release. For full list of changes refer to the
+    file /usr/share/doc/epic4/KNOWNBUGS.gz
+    
+    However, this release is the Debian maintainer's
+    decision. Blame him, if anything goes wrong.
+
+ -- Miros/law L. Baran <baran@debian.org>  Sun, 15 Aug 2004 10:58:32 +0200
+
+epic4 (1:1.2.6-1) unstable; urgency=medium
+
+  * Default value of the AUTO_REJOIN is now OFF, as is now the
+    upstream default. If you like the previous behaviour (i.e.
+    automatic rejoining to channels after being /kicked), please
+    use the /SET AUTO_REJOIN ON phrase in your configuration
+    files.
+
+ -- Miros/law L. Baran <baran@debian.org>  Fri,  2 Jan 2004 21:36:45 +0100
+
--- epic4-2.10.1.orig/debian/wrapper.irc
+++ epic4-2.10.1/debian/wrapper.irc
@@ -0,0 +1,26 @@
+# wrapper.irc
+#
+# Some scripts require things like being in a directory in your LOAD_PATH
+# ~/.such as irc or similar locations.  In order to accomidate these
+# scripts installed globally, it may be necessary to load a wrapper script
+# first.  This wrapper will add a pair of directories to your path.  For
+# most scripts, changing the name of the first variable should do the trick.
+
+^assign _wrapper.name #SCRIPT#
+^assign _wrapper.conf /etc/epic4
+^assign _wrapper.dir /usr/share/epic4
+
+unless (match($_wrapper.conf/$_wrapper.name $split(: $LOAD_PATH))) {
+  ^set LOAD_PATH $LOAD_PATH:$_wrapper.conf/$_wrapper.name
+}
+unless (match($_wrapper.dir/$_wrapper.name $split(: $LOAD_PATH))) {
+  ^set LOAD_PATH $LOAD_PATH:$_wrapper.dir/$_wrapper.name
+}
+
+
+## Anything else your script needs, put it here...
+
+
+load $_wrapper.name\-real.irc
+^purge _wrapper
+
--- epic4-2.10.1.orig/debian/preinst
+++ epic4-2.10.1/debian/preinst
@@ -0,0 +1,20 @@
+#!/bin/sh 
+
+set -e
+
+if [ "$1" = "upgrade" -o "$1" = "install" ]; then
+  install -m 755 -d /etc/epic4
+
+  # this file needs to be preserved, then deleted
+  if [ -e /etc/irc/servers-epic4 ]; then
+    cp /etc/irc/servers-epic4 /etc/epic4/servers
+    rm /etc/irc/servers-epic4 
+  fi
+  # this one we use only if we don't have anything else to use ...
+  if [ ! -e /etc/epic4/servers -a -e /etc/irc/servers ]; then
+    install -m 644 /etc/irc/servers /etc/epic4/servers
+  fi
+fi
+
+#DEBHELPER#
+
--- epic4-2.10.1.orig/debian/compat
+++ epic4-2.10.1/debian/compat
@@ -0,0 +1 @@
+5
--- epic4-2.10.1.orig/debian/dirs
+++ epic4-2.10.1/debian/dirs
@@ -0,0 +1 @@
+etc/epic4
--- epic4-2.10.1.orig/debian/local
+++ epic4-2.10.1/debian/local
@@ -0,0 +1,3 @@
+unless ((fexist(~/.epicrc) > -1) || (fexist(~/.ircrc) > -1)) {
+  ^load /etc/epic4/default.irc
+}
--- epic4-2.10.1.orig/debian/README.Debian
+++ epic4-2.10.1/debian/README.Debian
@@ -0,0 +1,71 @@
+epic4 for Debian
+----------------
+
+A handful of miscellaneous notes:
+
+  * Eight bit characters - If you're having trouble typing or seeing eight
+    bit characters in epic especially under screen, it's probably because
+    one of epic's sets is not set properly.  Try adding to your rc file:
+
+       ^set EIGHT_BIT_CHARACTERS on
+       ^set HIGH_BIT_ESCAPE 0
+
+    If that doesn't fix it, the script might be overriding the settings. If
+    so, change it at the input prompt and use the script's save command
+    (traditionally /save) If that doesn't fix it, take a plastic foam
+    rubber object such as a Pool Noodle and proceed to *FWOP!* the author
+    of the script mercilessly.
+
+  + Note from <http://www.epicsol.org/> (Jeremy Nelson): due to some
+    unfortunate signed-unsigned casting conflicts, it is not possible for
+    epic users to input character 255. (...) To work around this
+    problem, add this to startup script:
+ 
+    /eval bind $chr(255) parse_command {xtype -l $chr(255)}
+    bind ^@ parse_command {xtype -l $chr(255)} 
+
+  + Startup scripts: in absence of ~/.epicrc epic4 would use ~/.ircrc, but
+    the primary startup script is the ~/.epicrc or anything that the
+    environment variable $EPICRC points to.
+
+  * If you've installed an epic4-script-* package, some default script
+    will be run if you have neither ~/.epicrc nor ~/.ircrc files. There are
+    a few script packages for epic4 now, have a look at one of them for
+    making your own.  examples/wrapper.irc contains the base wrapper to use
+    if your script isn't totally global-install-friendly.
+  
+  + TCL support explicitly disabled until someone needs that. Please
+    file a wishlist bug, if you need TCL compiled in.
+
+  + New key binding mechanism: there is completely new key binding
+    mechanism in epic 1.1.7. The new mechanism is clear and easy-to-use.
+    IT'S ALSO INCOMPATIBLE WITH PREVIOUS VERSIONS. THIS IS NOT A BUG.
+    Support for old META-x bindings is removed. Read the
+    /usr/share/doc/epic4/keys for more precise information.
+    
+    In short, what to do if your script suddenly stops working:
+    
+    Locate something like:
+    
+      BIND <X> META<N>_CHARACTER
+      
+    Where <X> is a key binding prefix and <N> is a number, e.g. 1, 2, 3.
+    Remove this command or change it to what you like, e.g. you can prevent
+    the prefix itself from being interpreted:
+    
+      BIND ^X NOTHING
+
+    Now, locate all occurrences of:
+      
+      BIND META<N>-<some_key>
+
+    Where <some_key> is the rest of your chosen key binding. Replace all of
+    these lines with:
+      
+      BIND "^X<some_key>"
+
+    The script should work again.
+
+(*) Joseph Carter <knghtbrd@debian.org> Sat, 24 Mar 2001 02:43:08 -0800
+(+) Miros/law L. Baran <baran@debian.org> Wed,  2 Oct 2002 21:04:43 +0200
+
--- epic4-2.10.1.orig/debian/prerm
+++ epic4-2.10.1/debian/prerm
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+update-alternatives --remove irc /usr/bin/epic4
+update-alternatives --remove epic4-default.irc /etc/epic4/epic4.irc
+
+#DEBHELPER#
--- epic4-2.10.1.orig/debian/menu
+++ epic4-2.10.1/debian/menu
@@ -0,0 +1,2 @@
+?package(epic4): needs="text" section="Applications/Network/Communication" hints="IRC" title="epic4" \
+	command="/usr/bin/epic4"
--- epic4-2.10.1.orig/debian/copyright
+++ epic4-2.10.1/debian/copyright
@@ -0,0 +1,53 @@
+This package was first debianized by David N. Welton <davidw@efn.org>,
+later redone by Joseph Carter <knghtbrd@debian.org>. Then it was
+maintained by Miros/law L. Baran <baran@debian.org>.
+
+It's currently maintained by Kurt Roeckx <kurt@roeckx.be>
+
+It was downloaded from upstream ftp server at epicsol.org (for
+instructions look at http://www.epicsol.org/).
+
+The upstream sources in *.tar.gz form are at
+ftp://ftp.epicsol.org/pub/epic/EPIC4-PRODUCTION/
+
+Copyrights:
+
+/*
+ * Copyright (c) 1990 Michael Sandroff.
+ * Copyright (c) 1991, 1992 Troy Rollo.
+ * Copyright (c) 1992-1996 Matthew Green.
+ * Copyright © 1993, 1997 Jeremy Nelson.
+ * Copyright © 1994 Jake Khuon.
+ * Copyright © 1995, 2002 Jeremy Nelson and others ("EPIC Software Labs").
+ * All rights reserved.
+ * 
+ * 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, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notices, the above paragraph (the one permitting redistribution),
+ *    this list of conditions and the following disclaimer in the 
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The names of the author(s) may not be used to endorse or promote 
+ *    products derived from this software without specific prior written
+ *    permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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.
+ *
+ * Some files, (notably, glob.c, and compat.c) may contain some source that
+ * is covered by the original BSD 3-clause license, rather than the above
+ * license.  Please refer to those files for more specific information.
+ */
+
--- epic4-2.10.1.orig/debian/changelog
+++ epic4-2.10.1/debian/changelog
@@ -0,0 +1,691 @@
+epic4 (1:2.10.1-1.4.201403220350) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Sat, 22 Mar 2014 03:50:54 +0100
+
+epic4 (1:2.10.1-1) unstable; urgency=low
+
+  * New upstream release
+  * Only have /etc/epic4 in debian/dirs.  The others aren't useful.
+  * Stop shipping the empty dir usr/share/epic4/help/
+  * Remove Priority and Section lines for the binary package, the soure
+    package already has the same.
+  * Fix some spelling errors in README.Debian
+  * Add set -e to prerm
+  * The preinst was using #!/bin/bash for some reason, switch to sh
+  * Update Standards-Version to 3.8.3, no changes needed.
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Sat, 05 Sep 2009 09:55:59 +0200
+
+epic4 (1:2.10-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Tue, 18 Nov 2008 23:00:46 +0100
+
+epic4 (1:2.8-1) unstable; urgency=low
+
+  * New maintainer (Closes: #503558)
+  * New upstream release (Closes: #443125)
+  * Remove conflicts (Closes: #468425)
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Fri, 31 Oct 2008 19:06:06 +0100
+
+epic4 (1:2.6-1.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fixed bashism in debian/rules (patch by Chris Lamb) (closes: #484378)
+  * Lintian cleanup (closes: #477173):
+    - Don't ignore error from make distclean
+    - Replaced PWD by CURDIR in debian/rules
+    - Converted debian/copyright to UTF-8
+    - Call dh_makeshlibs in right order
+    - Updated/fixed menu section
+  * Updated standards version to 3.8.0
+  * Added Homepage and watch file
+
+ -- Peter Eisentraut <petere@debian.org>  Sun, 22 Jun 2008 19:37:39 +0200
+
+epic4 (1:2.6-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Bump to Standards-Version 3.7.3.
+  * Apply patch from Evgeni Golov to fix FTBFS.  closes: #476055.
+
+ -- Clint Adams <schizo@debian.org>  Mon, 21 Apr 2008 11:02:53 -0400
+
+epic4 (1:2.6-1) unstable; urgency=medium
+
+  * New upstream bugfix release (includes: fix for crash caused
+    by /NICK on ircnet)
+  * Use -O1 in debian/rules to avoid problems with aliasing
+    (Closes: 401090). This is quite important, hence the medium
+    urgency. Thanks go to Kurt Roeckx for spotting this.
+
+ -- Miroslaw L. Baran <baran@debian.org>  Thu, 30 Nov 2006 21:59:45 +0100
+
+epic4 (1:2.4-1) unstable; urgency=low
+
+  * New upstream release: stability fixes. (Closes: #378020)
+  * Updated debhelper compatibility level and policy version.
+  * Acknowledged NMU by Kurt Roeckx.
+
+ -- Miroslaw L. Baran <baran@debian.org>  Sun,  8 Oct 2006 17:35:53 +0200
+
+epic4 (1:2.2-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add build dependency on libperl-dev (Closes: #376946)
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Wed, 12 Jul 2006 16:29:10 +0000
+
+epic4 (1:2.2-2) unstable; urgency=low
+
+  * Rebuilt for the new OpenSSL version.
+  * Bumped the standards version.
+
+ -- Miros/law L. Baran <baran@debian.org>  Sun,  9 Oct 2005 13:11:40 +0200
+
+epic4 (1:2.2-1) unstable; urgency=low
+
+  * New stable upstream release - this is final release of
+    the epic4 line. (Closes: #293488)
+
+ -- Miros/law L. Baran <baran@debian.org>  Mon, 28 Mar 2005 21:25:02 +0200
+
+epic4 (1:2.0-2) unstable; urgency=high
+
+  * Incorporated changes from stable CVS (to commit_id 716),
+    mostly bugfixes and IRCnet uniqueID support.
+  * Fix: avoid NULL deref on empty numeric replies - thus
+    urgency high.
+  * Fix: do not segfault after pressing the key bound to the
+    TOGGLE_STOP_SCREEN action (Closes: #247464).
+  * This release is more or less identical to the RC1 for
+    EPIC4-2.2 (i.e. EPIC4-2.1.1).
+
+ -- Miros/law L. Baran <baran@debian.org>  Sun, 15 Aug 2004 13:37:44 +0200
+
+epic4 (1:2.0-1) unstable; urgency=low
+
+  * New upstream release: epic4-2.0 STABLE.
+  * Added note about the ascii 255 character to the
+    README.Debian.
+
+ -- Miros/law L. Baran <baran@debian.org>  Sun, 14 Mar 2004 00:37:29 +0100
+
+epic4 (1:1.2.8-1) unstable; urgency=medium
+
+  * New upstream release. Amended upstream EPIC4-2.0 RC1.
+  * Updated download URIs in debian/copyright.
+  * New policy version in debian/control: 3.6.1.
+  * If it's possible, let this version go into sarge.
+
+ -- Miros/law L. Baran <baran@debian.org>  Sun, 25 Jan 2004 20:59:07 +0100
+
+epic4 (1:1.2.7-1) unstable; urgency=low
+
+  * New upstream release. Upstream EPIC4-2.0 RC1.
+  * Package unreleased.
+
+ -- Miros/law L. Baran <baran@debian.org>  Thu, 22 Jan 2004 21:51:02 +0100
+
+epic4 (1:1.2.6-1) unstable; urgency=medium
+
+  * New upstream version: mostly stability fixes.
+  * Urgency medium, as this is the new sarge's epic4 in spe.
+
+ -- Miros/law L. Baran <baran@debian.org>  Fri,  2 Jan 2004 23:08:18 +0100
+
+epic4 (1:1.2.2-1) unstable; urgency=low
+
+  * Unreleased.
+  * New upstream version: beta release, many bugfixes. Definitely
+    abandoning CVS snapshots in epic4 package. (Closes: #202916).
+  * Enabled 'quote nick', because of broken ircservers somewhere
+    on the Net (closes: #198232). Thanks to Kevin Arima, who
+    provided a patch.
+  * Perl interpreter enabled again (closes: #159119).
+
+ -- Miros/law L. Baran <baran@debian.org>  Fri,  5 Dec 2003 21:35:56 +0100
+
+epic4 (1:1.1.12.20030903-1) unstable; urgency=medium
+
+  * Unreleased.
+  * Snapshot from upstream CVS as of 03.09.2003: new upstream
+    release.
+  * Acknowledged NMU by Simon Richter <sjr@debian.org>.
+
+ -- Miros/law L. Baran <baran@debian.org>  Wed,  3 Sep 2003 20:04:57 +0200
+
+epic4 (1:1.1.11.20030409-2.1) unstable; urgency=low
+
+  * NMU, asked for by Kevin Arima <debian@furball.org>. Rationale can
+    be found at
+    http://lists.debian.org/debian-mentors/2003/debian-mentors-200309/msg00008.html
+  * Fixes a problem when DCC_STORE_PATH_VAR has not been set up
+    (Closes: #207615)
+  * Fixes a buffer overrun in the handling of CTCP UTC (Closes: #208008)
+
+ -- Simon Richter <sjr@debian.org>  Wed,  3 Sep 2003 00:47:43 +0200
+
+epic4 (1:1.1.11.20030409-2) unstable; urgency=high
+
+  * Applied security patch from Jeremy Nelson (fixes the
+    alloca underrun problem when a rogue IRC server sends a
+    CTCP request from an extremely large nickname).
+
+ -- Miros/law L. Baran <baran@debian.org>  Sat, 24 May 2003 22:35:39 +0200
+
+epic4 (1:1.1.11.20030409-1) unstable; urgency=high
+
+  * New upstream release. Snapshot from upstream CVS as of
+    version 1.1.11. Many changes, including the fix for
+    potentially user exploitable buffer overflow in the /userhost
+    command (closes: #188226, #174435).
+  * Applied Martin Schulze's patch, preventing a potential buffer
+    overflow during evaluation of the text for the status bar.
+    Thanks, Martin.
+  * Perl and tcl bindings explicitely disabled.
+  * Urgency high because of the security fix.
+  * Updated the debian/copyright file.
+  * Small packaging corrections.
+
+ -- Miros/law L. Baran <baran@debian.org>  Wed,  9 Apr 2003 23:16:56 +0200
+
+epic4 (1:1.1.7.20021209-1) unstable; urgency=low
+
+  * Snapshot from upstream CVS as of 09.12.2002. Unreleased.
+
+ -- Miros/law L. Baran <baran@debian.org>  Mon,  9 Dec 2002 14:23:55 +0100
+
+epic4 (1:1.1.7.20020907-2) unstable; urgency=low
+
+  * Added note about new key binding mechanism in README.Debian.
+
+ -- Miros/law L. Baran <baran@debian.org>  Wed,  2 Oct 2002 21:07:19 +0200
+
+epic4 (1:1.1.7.20020907-1) unstable; urgency=low
+
+  * Snapshot from upstream CVS as of 07.09.2002: new upstream
+    release. Changes include:
+    + full IPv6 support. (Closes: #116451)
+    + rewritten key input/binding system (not completely
+      backwards-compatible, e.g. meta-x key bindings are
+      gone, please read /usr/share/doc/epic4/keys for more
+      precise information).
+  * Changed the NAN handling code in check_val(), this should
+    make epic script parser work again with any value
+    beginning with 'nan', many thanks to J. S. Connell.
+    (Closes: #156368)
+  * Perl support temporarily disabled (epic does not yet
+    compile with perl 5.8).
+
+ -- Miros/law L. Baran <baran@debian.org>  Tue, 10 Sep 2002 12:10:10 +0200
+
+epic4 (1:1.1.5.20020630-1) unstable; urgency=low
+
+  * Snapshot from upstream CVS as of 30.06.2002: new upstream
+    release, now one can use '-p' option with the /dcc chat,
+    and changing channel in secondary window works properly.
+    (Closes: #145633, #142074, #143535)
+  * Added a patch from Goswin Brederlow, preventing from
+    SIGFPE on Alpha in certain situations. Thanks, Goswin.
+    (Closes: #147351)
+
+ -- Miros/law L. Baran <baran@debian.org>  Sun, 30 Jun 2002 17:54:28 +0200
+
+epic4 (1:1.1.2.20020219-2) unstable; urgency=medium
+
+  * 'Here comes the main again' release.
+  * Moved back to main.
+  * HIGH_BIT_ESCAPE set to 0 again.
+
+ -- Miros/law L. Baran <baran@debian.org>  Tue, 26 Mar 2002 18:32:48 +0100
+
+epic4 (1:1.1.2.20020219-1) unstable; urgency=low
+
+  * Snapshot from upstream CVS as of 19.02.2002 (Closes: #133581,
+    '/window channel' without arguments doesn't crash epic4 now).
+  * Small changes in debian/rules (now build-depends on debhelper
+    3.4.8, which has proper dh_installdocs -X support). This was done
+    independently from NMU.
+  * The debian/copyright file synchronized with NMU.
+
+ -- Miros/law L. Baran <baran@debian.org>  Wed, 20 Feb 2002 16:47:47 +0100
+ 
+epic4 (1:1.1.2.20020129-1.1) unstable; urgency=low
+
+  * NMU
+  * debian/copyright:
+  - accepted patch from Istvan Sebestyen <stevee@alphanet.ch>
+    to add a debian/copyright file that is done The Right Way (tm)
+    (Closes: #132575)
+  * debian/rules:
+  - avoid removing debian/copyright on clean: and installing
+    COPYRIGHT as debian/copyright
+
+ -- Gustavo Noronha Silva <kov@debian.org>  Sat, 16 Feb 2002 16:45:53 -0200
+
+epic4 (1:1.1.2.20020129-1) unstable; urgency=high
+
+  * Snapshot from upstream CVS as of 29.01.2002, includes SSL
+    support, perl support and fix for the security issues with
+    ROM characters and alternate charset toggling. (With thanks
+    to Joseph Carter, Closes: #125784)
+  * Perl support enabled.
+  * SSL support enabled (this moves epic4 into the non-US).
+  * Changed versioning scheme (now includes CVS snapshot date).
+  * Tightened dependency on epic4-help (now versioned).
+  * Small manpage corrections. (Closes: #100521)
+  * Imported into private CVS repository.
+
+ -- Miros/law L. Baran <baran@debian.org>  Fri,  1 Feb 2002 11:42:07 +0100
+
+epic4 (1:1.0.1-2) unstable; urgency=low
+
+  * Adopted with Joseph Carter's consent.
+
+ -- Miros/law L. Baran <baran@debian.org>  Mon, 29 Oct 2001 15:25:25 +0100
+
+epic4 (1:1.0.1-1) unstable; urgency=low
+
+  * New upstream version
+  * set XTERM now uses x-terminal-emulator by default (Closes: #93900)
+  * fixed Suggests: epic4-help - it's a dependency now (Closes: #92556)
+  * Applied Igor Belyi's patch so -port works with DCC  (Closes: #93700)
+
+ -- Joseph Carter <knghtbrd@debian.org>  Tue, 17 Apr 2001 14:59:03 -0700
+
+epic4 (1:1.0-1) unstable; urgency=low
+
+  * New upstream version - 1.0 at long last!
+
+ -- Joseph Carter <knghtbrd@debian.org>  Sat, 31 Mar 2001 21:58:02 -0800
+
+epic4 (1:0.10.1-1) unstable; urgency=low
+
+  * New upstream version (release voting restarted, if you find bugs with
+    this version, hop needs to know immediately)
+  * New standards version ("We've upped our standards, so up yours!"  heh)
+  * Now uses debhelper v3 features - build dep on debhelper >= 3.0.0
+  * Window bug in 0.9.12 fixed (Closes: #87634)
+  * Polling loop bug fixed upstream (Closes: #81639)
+  * tabscript is gone, tc is the replacement  (Closes: #82349)
+  * This version should work better for you Alexandre (Closes: #88444)
+  * Added IRC menu hint (Closes: #80073)
+  * Sorry Remi, this took way too long..  (Closes: #79367)
+  * -H <hostname> will cause epic to use the correct IP, provided your
+    /etc/hosts is configured properly.  epic4 (like many programs) will
+    by default just grab the first interface it finds.  (Closes: #44371)
+
+ -- Joseph Carter <knghtbrd@debian.org>  Sat, 24 Mar 2001 02:43:32 -0800
+
+epic4 (1:0.9.12-1) unstable; urgency=low
+
+  * I finally get sick of waiting for 0.9.12 and upload 0.9.9 instead, and
+    would you look at this?  New upstream version.  =)
+
+ -- Joseph Carter <knghtbrd@debian.org>  Wed, 29 Nov 2000 17:58:29 -0500
+
+epic4 (1:0.9.9-1) unstable; urgency=low
+
+  * New upstream version at upstream request
+  * At time of packaging, 0.9.11 is available.  0.9.9 is more stable.
+  * No longer tries infinitely to resolve a host (Closes: #71260)
+  * Copy tc to tabscript for backward compatibility (Closes: #65023)
+  * No such fle/directory bug is fixed upstream (Closes: #65563)
+  * Sharing server file with ircII would be a bad idea (Closes: #69287)
+  * Added build-depends (Closes: #70278)
+  * Now depends on epic4-help (Closes: #71849)
+
+ -- Joseph Carter <knghtbrd@debian.org>  Mon, 27 Nov 2000 13:40:55 -0500
+
+epic4 (1:0.9.6-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Joseph Carter <knghtbrd@debian.org>  Thu, 17 Aug 2000 17:17:56 -0500
+
+epic4 (pre2.508-2) frozen unstable; urgency=medium
+
+  * functions.c fix for axur (Closes: #63266)
+
+ -- Joseph Carter <knghtbrd@debian.org>  Tue,  2 May 2000 06:32:06 -0700
+
+epic4 (pre2.508-1) frozen unstable; urgency=medium
+
+  * New upstream version
+  * Fixes the last-column bug (Closes: #62794)
+  * Fixes join bug in axur script (Closes: #61856, #61647)
+  * Now use tabscript instead of tc at hop's suggestion (Closes: #61858)
+  * Provides: irc, by request (Closes: #62486)
+
+ -- Joseph Carter <knghtbrd@debian.org>  Tue, 25 Apr 2000 18:28:11 -0700
+
+epic4 (pre2.507-1) frozen unstable; urgency=medium
+
+  * New upstream version (Closes: #58508) 
+
+ -- Joseph Carter <knghtbrd@debian.org>  Thu, 30 Mar 2000 04:49:35 -0800
+
+epic4 (pre2.503-1) unstable; urgency=medium
+
+  * New upstream version
+  * This is a reupload adding a patch to fix an infinite loop.  Since I
+    pulled the old out of incoming within 20 minutes of putting it there,
+    I'm not making this a -2.
+
+ -- Joseph Carter <knghtbrd@debian.org>  Sun, 19 Dec 1999 15:39:51 -0800
+
+epic4 (pre2.400-2) unstable; urgency=medium
+
+  * Upstream provided a fix for the slash-space bug
+
+ -- Joseph Carter <knghtbrd@debian.org>  Thu,  2 Dec 1999 14:52:13 -0800
+
+epic4 (pre2.400-1) unstable; urgency=medium
+
+  * New upstream version
+  * Many bugs fixed
+
+ -- Joseph Carter <knghtbrd@debian.org>  Wed,  1 Dec 1999 13:35:26 -0800
+
+epic4 (pre2.200-2) unstable; urgency=medium
+
+  * Patch around segv when epic tries to update a window's input line and
+    the window no longer exists
+
+ -- Joseph Carter <knghtbrd@debian.org>  Thu, 25 Nov 1999 11:02:27 -0800
+
+epic4 (pre2.200-1) unstable; urgency=low
+
+  * New upstream version
+  * no more debconf dependency, no longer needed
+  * rewrote preinst and postinst for cleaner slink upgrades
+  * checked package against policy 3.1.0
+
+ -- Joseph Carter <knghtbrd@debian.org>  Sat, 13 Nov 1999 14:41:19 -0800
+
+epic4 (pre2.100-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Joseph Carter <knghtbrd@debian.org>  Fri, 12 Nov 1999 01:34:57 -0800
+
+epic4 (pre2.004-19991102-1) unstable; urgency=low
+
+  * New upstream version
+  * Crashed frequently, never released.
+
+ -- Joseph Carter <knghtbrd@debian.org>  Thu,  4 Nov 1999 23:31:02 -0800
+
+epic4 (pre2.004-19991021-1) unstable; urgency=low
+
+  * At long last, a new upstream version !
+  * preinst now uses debconf to more cleanly deal with the musical servers
+    file.  Will now let you remove /etc/irc/servers if no other package is
+    actually using it.  Smoother upgrade from slink.  Please test this!
+  * epic4-dbg /usr/doc symlink issue squashed
+  * irc.1 manpage symlink fixed
+
+ -- Joseph Carter <knghtbrd@debian.org>  Sun, 31 Oct 1999 23:04:27 -0800
+
+epic4 (pre2.004-19990909-1) unstable; urgency=low
+
+  * New upstream version
+  * Built with gcc 2.95 again - hope this works!
+
+ -- Joseph Carter <knghtbrd@debian.org>  Sun, 19 Sep 1999 13:39:13 -0700
+
+epic4 (pre2.004-19990903-2) unstable; urgency=low
+
+  * Build with gcc 2.7.2 - this version does not run properly if compiled
+    under gcc 2.95.  hop will upstream fix soon  (Closes: #44557, #44628)
+  * bug in epic4-dbg postrm squashed  (Closes: #44627)
+
+ -- Joseph Carter <knghtbrd@debian.org>  Wed,  8 Sep 1999 17:11:28 -0700
+
+epic4 (pre2.004-19990903-1) unstable; urgency=low
+
+  * New upstream version
+  * Note /save changes may cause issues with some scripts
+
+ -- Joseph Carter <knghtbrd@debian.org>  Tue,  7 Sep 1999 05:28:28 -0700
+
+epic4 (pre2.004-19990718-1) unstable; urgency=low
+
+  * New upstream version
+  * Policy 3.0.1, debhelper v2
+
+ -- Joseph Carter <knghtbrd@debian.org>  Sun, 25 Jul 1999 03:58:02 -0700
+
+epic4 (pre2.004-19990618-3) unstable; urgency=HIGH
+
+  * prerm booboo that WILL break things is fixed
+
+ -- Joseph Carter <knghtbrd@debian.org>  Fri, 25 Jun 1999 23:19:55 -0700
+
+epic4 (pre2.004-19990618-2) unstable; urgency=low
+
+  * A few fixes to the script-debian examples
+  * Updated README.Debian and split script info into SCRIPTS.Debian
+  * Another possible DoS in the ANSI parser fixed
+
+ -- Joseph Carter <knghtbrd@debian.org>  Thu, 24 Jun 1999 06:43:15 -0700
+
+epic4 (pre2.004-19990618-1) unstable; urgency=low
+
+  * New upstream version.
+  * README.Debian now exists and contains useful info, including how to
+    package epic4 scripts sanely.
+  * Applied Robohak's patch to fix TERM_DOES_BRIGHT_BLINK's handling of the
+    blink attribute.  Please test this, information is in README.Debian.
+  * By popular demand (and threats to string me up if I didn't) I've made
+    HIGH_BIT_ESCAPE default to 0 again.  This will help people who run epic4
+    under screen or other things with broken terminfo's.
+  * Moved current directory to the start of the default LOAD_PATH
+  * /usr/bin/epic4 is now an alternative for irc, albeit only at priority 19
+    since epic4 is not totally ircII compatible anymore.  (Closes: #30346)
+  * There is finally a default script, /etc/epic4/epic4.irc.  It's installed
+    as an alternative for epic4-default.irc at priority 19, is a conffile,
+    and will be superceded by any script package you might install.
+  * Because ircii removes /etc/irc/servers when purged (gah!) we can't rely
+    on it not getting eaten---we now use /etc/epic4/servers.
+  * added pkgscript directory to the examples.  Contents of it are an
+    example debian directory for scripts, similar to what dh_make would give
+    you..  (created with it in fact)
+  * Fixed rules file for the above and more...
+  * Added /usr/local/share/epic4/script to load path.  (Closes: #35192)
+
+ -- Joseph Carter <knghtbrd@debian.org>  Tue, 22 Jun 1999 19:57:01 -0700
+
+epic4 (pre2.003-5) unstable; urgency=low
+
+  * Added /usr/local/share/epic4/script to load path, Closes: bug#35192
+
+ -- Joseph Carter <knghtbrd@debian.org>  Sun, 23 May 1999 21:06:28 -0700
+
+epic4 (pre2.003-4) unstable; urgency=low
+
+  * I never understood why pana hated the DCC checksum code so much.  It
+    screws with ip masquerading.  Disabled.
+  * Got rid of /usr/libexec in the package
+
+ -- Joseph Carter <knghtbrd@debian.org>  Mon, 17 May 1999 17:09:45 -0700
+
+epic4 (pre2.003-3) unstable; urgency=low
+
+  * glibc2.1 build--will no longer run on slink
+  * hop asked me to undef some debug code in ircaux.c, done so
+  * more FHS migration stuff
+  * debian/* cleanups
+
+ -- Joseph Carter <knghtbrd@debian.org>  Fri, 14 May 1999 12:26:59 -0700
+
+epic4 (pre2.003-2) unstable; urgency=low
+
+  * If pre2.002 and .003 were upgraded from slink versions, the rename and
+    de-conffile-ization of the serverlist would have eaten your old list and
+    created a new one with just irc.debian.org in it.  No more.  Your old
+    serverlist will be preserved if /etc/irc/servers doesn't already exist.
+
+ -- Joseph Carter <knghtbrd@debian.org>  Sat, 27 Feb 1999 03:12:38 -0800
+
+epic4 (pre2.003-1) unstable; urgency=low
+
+  * New upstream version fixing many nasties in pre2.002
+  * manpage now only in /usr/man, not in /usr/doc too
+
+ -- Joseph Carter <knghtbrd@debian.org>  Wed, 24 Feb 1999 18:37:27 -0800
+
+epic4 (pre2.002-1) unstable; urgency=low
+
+  * New upstream version
+  * It's official, we now have a new beta!
+  * Please note the serverlist is now /etc/irc/servers which is not owned as
+    a conffile.  It's created if it doesn't exist but otherwise the file is
+    considered "hands-off" much like the ircii package.
+  * Upstream author believes that because epic4 is not completely compatible
+    with ircII anymore, naming epic4 as an alternative for ircII is a bad
+    idea. (closes #30346)
+
+ -- Joseph Carter <knghtbrd@debian.org>  Tue, 23 Feb 1999 08:57:40 -0800
+
+epic4 (pre2.001NR16-1) unstable; urgency=low
+
+  * New upstream version
+  * NOBLINK_16_COLOR included upstream, now called TERM_DOES_BOLD_BLINK.
+  * Forked epic4-dbg which contains binaries compiled for debugging
+  * Rewrote debian/rules to facilitate fork and upstream changes
+  * Went mad as a result of debian/rules rewrite and trying to figure out
+    why source didn't support what I was trying to do in order to build
+    the new -dbg package.
+
+ -- Joseph Carter <knghtbrd@debian.org>  Wed, 17 Feb 1999 18:53:43 -0800
+
+epic4 (pre2.001NR8-2) unstable; urgency=low
+
+  * Samll change to support ^c16 so a few lame mirc scripts look right
+  * Added set NOBLINK_16_COLOR, uses blink attribute for "bright
+    backgrounds" if your setup allows that.  It is always off by default.
+  * Removed doc/reg.c, it shouldn't be there according to author.
+
+ -- Joseph Carter <knghtbrd@debian.org>  Sat, 21 Nov 1998 06:36:18 -0800
+
+epic4 (pre2.001NR8-1) unstable; urgency=low
+
+  * New upstream version
+  * This is an NR version and may be unstable, caveat downloader - It should
+    not be included in any release of any distribution
+  * Binary is unstripped for testing reasons
+  * Changed a color value to make ^c16 work the way lame mirc scripts use it
+
+ -- Joseph Carter <knghtbrd@debian.org>  Mon, 16 Nov 1998 00:20:22 -0800
+
+epic4 (pre2-5) unstable; urgency=low
+
+  * Binary is now stripped again for slink release - no new bugs reported
+  * Minor cleanups which don't affect functionability.
+  * New email address for Debian maintainer
+
+ -- Joseph Carter <knghtbrd@debian.org>  Tue, 13 Oct 1998 15:00:29 -0700
+
+epic4 (pre2-4) unstable; urgency=low
+
+  * Binary is NOT stripped which should aid in bug traching.
+
+ -- Joseph Carter <knghtbrd@earthlink.net>  Sun, 30 Aug 1998 07:30:21 +0000
+
+epic4 (pre2-3) unstable; urgency=low
+
+  * Turned flow control back on.
+  * Set default for HIGH_BIT_ESCAPE to 0.  (#22917)
+
+ -- Joseph Carter <knghtbrd@earthlink.net>  Fri, 24 Jul 1998 23:29:26 +0000
+
+epic4 (pre2-2) unstable; urgency=low
+
+  * Applied a pair of upstream patches
+
+ -- Joseph Carter <knghtbrd@earthlink.net>  Thu, 16 Jul 1998 08:04:48 +0000
+
+epic4 (pre2-1) unstable; urgency=low
+
+  * New upstream source - pre2 at last!
+  * Patched bug when using gzipped scripts.
+
+ -- Joseph Carter <knghtbrd@earthlink.net>  Mon, 13 Jul 1998 23:05:26 +0000
+
+epic4 (pre1.400-1) unstable; urgency=low
+
+  * New upstream source.
+  * Priority changed to optional.  
+  * Turned off flow control to allow bind of ctrl-s and q.  Please let me
+    know this turns out to be a problem.
+
+ -- Joseph Carter <knghtbrd@earthlink.net>  Mon,  6 Jul 1998 02:02:30 +0000
+
+epic4 (pre1.300-2) unstable; urgency=low
+
+  * New maintainer.
+  * debian/rules cleaned up and converted to debhelper format.
+  * unused files removed from source package diffs.
+  * Fixed serverlist bug.
+
+ -- Joseph Carter <knghtbrd@earthlink.net>  Sun,  5 Jul 1998 00:09:13 +0000
+
+epic4 (pre1.300-1) unstable; urgency=low
+
+  * New upstream version.
+  * Fixes #18979.
+  * Fixes #23197
+
+ -- David N. Welton <davidw@efn.org>  Sat, 20 Jun 1998 11:04:37 -0700
+
+epic4 (pre1.200-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- David N. Welton <davidw@efn.org>  Sun, 24 May 1998 14:21:13 -0700
+
+epic4 (pre1.100-1) unstable; urgency=low
+
+  * New upstream source - release candidate!
+
+ -- David N. Welton <davidw@efn.org>  Sat, 25 Apr 1998 13:49:34 -0700
+
+epic4 (pre1.041-1) unstable; urgency=low
+
+  * New upstream version.
+  * Took binaries out of lib directory, and changed names to wserv.epic4, etc.
+
+ -- David N. Welton <davidw@efn.org>  Sun,  4 Jan 1998 13:31:24 -0800
+
+epic4 (pre1.040-1) unstable; urgency=low
+
+  * New upstream version
+  * Fixes Bug#16116
+  * Fixes Bug#16096
+  * At least it does if I guessed the regexp syntax right.. hrumph.
+
+ -- David N. Welton <davidw@efn.org>  Thu, 18 Dec 1997 23:14:33 -0800
+
+epic4 (pre1.039-1) unstable; urgency=low
+
+  * New upstream version - here's hoping it's somewhat stable!
+
+ -- David N. Welton <davidw@efn.org>  Sun, 14 Dec 1997 17:24:43 -0800
+
+epic4 (pre1.028-2) unstable; urgency=low
+
+  * Fixed a symlink bug
+
+ -- David N. Welton <davidw@efn.org>  Sat,  1 Nov 1997 12:03:05 -0800
+
+epic4 (pre1.028-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- David N. Welton <davidw@efn.org>  Mon, 20 Oct 1997 22:25:31 -0700
--- epic4-2.10.1.orig/debian/epic4.irc
+++ epic4-2.10.1/debian/epic4.irc
@@ -0,0 +1,12 @@
+# epic4.irc
+#
+# This script gets run if you have no ~/.epicrc or ~/.ircrc or other
+# script packages installed.  If you install a script package but for some
+# reason want this script to be the default, edit the symlink yourself
+# (/etc/alternatives/epic4-default.irc)..
+#
+# Changes you make to this file will be preserved, it is a conffile.
+
+^load tc
+^load newaway
+^load man
--- epic4-2.10.1.orig/debian/postinst
+++ epic4-2.10.1/debian/postinst
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+update-alternatives --install /usr/bin/irc irc /usr/bin/epic4 19 \
+                    --slave /usr/share/man/man1/irc.1.gz irc.1 \
+                            /usr/share/man/man1/epic4.1.gz
+update-alternatives --install /etc/epic4/default.irc epic4-default.irc \
+                              /etc/epic4/epic4.irc 19
+
+#DEBHELPER#
--- epic4-2.10.1.orig/debian/control
+++ epic4-2.10.1/debian/control
@@ -0,0 +1,22 @@
+Source: epic4
+Section: net
+Priority: optional
+Maintainer: Kurt Roeckx <kurt@roeckx.be>
+Standards-Version: 3.8.3
+Build-depends: debhelper (>= 5), libncurses5-dev, libssl-dev, libperl-dev
+Homepage: http://www.epicsol.org/
+
+Package: epic4
+Architecture: any
+Provides: irc
+Depends: ${shlibs:Depends}, ${misc:Depends}, epic4-help (>= 1:1.1.7.20020907)
+Suggests: epic4-script
+Description: epic irc client, version 4
+ epic4 is an irc client based on ircII.  It is primarily suited to users who
+ wish to write their own irc scripts or have irc scripts written by others.
+ .
+ Previous versions of epic were 100% compatible with ircII 2.8.2, though
+ this is no longer the case.  Instead we've taken a new direction and chosen
+ to find places where compatibility with ircII is undesirable and fix them. 
+ No gratuitous incompatibilities have been added, though many new features
+ have been.
--- epic4-2.10.1.orig/debian/examples
+++ epic4-2.10.1/debian/examples
@@ -0,0 +1 @@
+debian/wrapper.irc
--- epic4-2.10.1.orig/debian/rules
+++ epic4-2.10.1/debian/rules
@@ -0,0 +1,100 @@
+#!/usr/bin/make -f
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+  CFLAGS = -g -Wall
+  DEBUG = 1
+else
+  CFLAGS = -O1 -pedantic
+endif
+
+
+build-stamp:
+	dh_testdir
+	./configure --prefix=/usr --mandir=/usr/share/man \
+	  --with-ssl \
+	  --with-ipv6 \
+	  --with-perl \
+	  --without-tcl \
+	  --program-transform-name='s/epic/epic4/' \
+	  --libexecdir=/usr/lib/epic4 --program-prefix=$(CURDIR)/debian/epic4
+	$(MAKE) CFLAGS="$(CFLAGS)"
+	touch build-stamp
+
+
+build:	patch build-stamp
+
+patch-stamp:
+	@for patchfile in debian/patches/*.patch; do \
+	  patchname=`basename "$$patchfile" .patch`; \
+	  echo -n "Applying $$patchname patch... "; \
+	  patch -s -p1 < $$patchfile \
+	    && (echo "succeed!"; touch patch-stamp-$$patchname) \
+	    || (echo "failed!"; failed="yes"); \
+	done; \
+	test -z $$failed && touch patch-stamp
+
+patch: patch-stamp
+
+
+unpatch:
+	-@for patchfile in `ls -1 debian/patches/*.patch | sort -nr`; do \
+	  patchname=`basename "$$patchfile" .patch`; \
+	  test -f patch-stamp-$$patchname \
+	    && (patch -s -p1 -R < $$patchfile; rm patch-stamp-$$patchname; echo "The $$patchname patch has been removed.") \
+	    || echo "Failed removing the $$patchname patch."; \
+	done
+
+clean: unpatch
+	dh_testdir
+	rm -f patch-stamp build-stamp install-stamp
+	[ ! -f Makefile ] || $(MAKE) distclean
+	dh_clean
+
+
+install-stamp: build-stamp
+	dh_testdir
+	dh_testroot
+	dh_clean -k -pepic4
+	dh_installdirs -pepic4
+	$(MAKE) install
+
+
+install:	build install-stamp
+
+
+binary-indep:
+# Nothing to see, move along...
+
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs -a doc/* -XCVS -Xdoc/epic.1
+	dh_installmenu -a
+ifndef DEBUG
+	dh_strip -a
+endif
+	install -m 644 $(CURDIR)/debian/local \
+		       $(CURDIR)/debian/epic4/usr/share/epic4/script/local
+	dh_installchangelogs -a
+	dh_installexamples -a
+	install -m 644 debian/epic4.irc $(CURDIR)/debian/epic4/etc/epic4
+	install -m 644 $(CURDIR)/debian/local \
+		       $(CURDIR)/debian/epic4/usr/share/epic4/script/local
+	rmdir $(CURDIR)/debian/epic4/usr/share/epic4/help/
+	echo "irc.debian.org:6667" > $(CURDIR)/debian/epic4/etc/epic4/servers
+	dh_link -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_makeshlibs -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_installdeb -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+
+binary:		binary-indep binary-arch
+
+
+.PHONY: binary binary-arch binary-indep clean build install
--- epic4-2.10.1.orig/debian/patches/01_status_mschulze.patch
+++ epic4-2.10.1/debian/patches/01_status_mschulze.patch
@@ -0,0 +1,26 @@
+--- epic4-1.1.7.20020907.orig/source/status.c
++++ epic4-1.1.7.20020907/source/status.c
+@@ -473,6 +473,7 @@
+ 			*lhp = lhs_buffer,
+ 			*rhp = rhs_buffer,
+ 			*cp,
++			*cp_last,
+ 			*start_rhs = 0,
+ 			*str;
+ 		int	in_rhs = 0,
+@@ -594,6 +595,7 @@
+ 		 */
+ 		ptr = str;
+ 		cp = lhp;
++		cp_last = cp + sizeof (lhs_buffer);
+ 		lhs_buffer[0] = rhs_buffer[0] = 0;
+ 
+ 		while (*ptr)
+@@ -635,6 +637,7 @@
+ 				fillchar[0] = ' ';
+ 				fillchar[1] = 0;
+ 				do
++				    if ((cp_last - cp) > 0)
+ 					*cp++ = ' ';
+ 				while (++(*prc) % 8);
+ 				ptr++;
--- epic4-2.10.1.orig/debian/patches/02_quote_nick.patch
+++ epic4-2.10.1/debian/patches/02_quote_nick.patch
@@ -0,0 +1,11 @@
+--- epic4-1.2.2/source/parse.c.old	2003-12-05 21:30:09.000000000 +0100
++++ epic4-1.2.2/source/parse.c	2003-12-05 21:30:26.000000000 +0100
+@@ -1268,7 +1268,7 @@
+ {	"LIST",		NULL,		NULL,		0		},
+ {	"MODE",		p_mode,		NULL,		0		},
+ {	"NAMES",	NULL,		NULL,		0		},
+-{	"NICK",		p_nick,		NULL,		PROTO_NOQUOTE	},
++{	"NICK",		p_nick,		NULL,		PROTO_DEPREC	},
+ {	"NOTICE",	p_notice,	NULL,		0		},
+ {	"OPER",		NULL,		NULL,		0		},
+ {	"PART",		p_part,		NULL,		0		},
--- epic4-2.10.1.orig/include/config.h
+++ epic4-2.10.1/include/config.h
@@ -42,7 +42,7 @@
  *  the client will NOT compile and work properly!  Use the default here if
  *  you dont have other servers to use.
  */
-#define DEFAULT_SERVER "localhost irc.efnet.net irc.undernet.org irc.dal.net"
+#define DEFAULT_SERVER "irc.debian.org irc.efnet.net irc.undernet.org irc.dal.net"
 
 /*
  * Maildir support is experimental in EPIC4.  More complete support is 
@@ -296,7 +296,7 @@
  * hostname:portnum:password (with the portnum and password being
  * optional).  This server list will supercede the DEFAULT_SERVER
  */
-#define SERVERS_FILE "ircII.servers"
+#define SERVERS_FILE "/etc/epic4/servers"
 
 
 /*
@@ -323,7 +323,7 @@
  * format of what the default load path is to be.  The %s format indicates
  * the runtime IRCLIB value.  This value is only used at startup time.
  */
-#define DEFAULT_IRCPATH "~/.epic:~/.irc:%s/script:."
+#define DEFAULT_IRCPATH ".:~/.epic:~/.irc:/usr/local/share/epic4/script:%s/script"
 
 
 /*
@@ -352,7 +352,7 @@
 #define DEFAULT_BEEP_WHEN_AWAY 1
 #define DEFAULT_BLINK_VIDEO 1
 #define	DEFAULT_BOLD_VIDEO 1
-#define DEFAULT_CHANNEL_NAME_WIDTH 0
+#define DEFAULT_CHANNEL_NAME_WIDTH 16
 #define DEFAULT_CLOCK 1
 #define DEFAULT_CLOCK_24HOUR 0
 #define DEFAULT_CLOCK_FORMAT NULL
@@ -392,7 +392,7 @@
 #define DEFAULT_HELP_PROMPT 1
 #define DEFAULT_HELP_WINDOW 0
 #define DEFAULT_HIDE_PRIVATE_CHANNELS 0
-#define DEFAULT_HIGH_BIT_ESCAPE 2
+#define DEFAULT_HIGH_BIT_ESCAPE 0
 #define DEFAULT_HIGHLIGHT_CHAR "BOLD"
 #define DEFAULT_HISTORY 150
 #define DEFAULT_HISTORY_CIRCLEQ 1
@@ -525,7 +525,7 @@
 #define DEFAULT_VERBOSE_CTCP 1
 #define DEFAULT_WORD_BREAK ".,; \t"
 #define DEFAULT_WSERV_TYPE "screen"
-#define DEFAULT_XTERM "xterm"
+#define DEFAULT_XTERM "x-terminal-emulator"
 #define DEFAULT_XTERM_OPTIONS NULL
 
 /*
--- epic4-2.10.1.orig/doc/epic.1
+++ epic4-2.10.1/doc/epic.1
@@ -1,10 +1,10 @@
 .Dd April 22, 1999
 .Dt EPIC 1
 .Sh NAME
-.Nm epic
+.Nm epic4
 .Nd Internet Relay Chat client for UNIX like systems
 .Sh SYNOPSIS
-.Nm epic
+.Nm epic4
 .Op Ar \-a
 .Op Ar \-b
 .Op Ar \-B
@@ -142,19 +142,20 @@
 If you don't want your users to spoof their usernames, install identd, and do everyone on IRC a favor.
 .It nickname
 The first bare word found is taken as the default nickname to use.  
-This overrides all other options, including the -n option and the 
+This overrides all other options, including the \-n option and the 
 .Ev IRCNICK 
 environment variable.  
 If all else fails, then the client uses your login name as the default nickname.
 .It server,[server]
 After the nickname, a list of one or more server specifications can be listed.
-Unless you specify the -a option, this will replace your default server list!
-The -a option forces any servers listed here to be appended to the default server list.
+Unless you specify the \-a option, this will replace your default server list!
+The \-a option forces any servers listed here to be appended to the default server list.
 The format for server specifications is:
 .sp
 .Dl hostname:port:password:nick
 .sp
 Any item can be omitted by leaving the field blank, and any trailing colons can also be omitted.
+.El
 .Sh "DETAILED DESCRIPTION"
 .Ss "The Screen:"
 The screen is split into two parts, separated by an inverse-video status line (if supported).
@@ -164,16 +165,16 @@
 The lower part of the screen (a single line) accepts keyboard input.
 .sp
 Some terminals do not support certain features required by
-.Nm epic
+.Nm epic4
 , in which case you receive a message stating this.
 If this occurs, try changing the terminal type or run
-.Nm epic
-with the -d option.
+.Nm epic4
+with the \-d option.
 .Ss "Irc Commands:"
 Any line beginning with the slash character 
 .Dq /
 is regarded as an
-.Nm epic
+.Nm epic4
 command (the command character may be changed).  
 Any line not beginning with this character is treated as a message to be sent to the current channel.
 The client has a built in help system.  
@@ -182,7 +183,7 @@
 to open up the help system.
 .Ss "The .ircrc File:"
 When
-.Nm epic
+.Nm epic4
 is executed, it checks the user's home directory for a
 .Pa ~/.ircrc 
 file, executing the commands in the file. 
@@ -191,42 +192,44 @@
 This allows predefinition of aliases and other features.
 .Sh PRACTICAL EXAMPLES
 Certainly any description of 
-.Nm epic 
+.Nm epic4 
 in this man page will be sorely inadequate because most of the confusion doesn't even start until after you get the client to connect to a server.  
 But if you really have problems getting the client to connect to a server, try some of these:
-.Bl -tag -width "epic"
-.It Nm epic
+.Bl -tag -width "epic4"
+.It Nm epic4
 Try this first.  
 This will assume all the defaults.  
-If the person who is maintaining epic at your site has done a halfway decent job, this will put you on a server that is somewhat local to you. 
-.It Nm "epic nickname irc.domain.com"
+If the person who is maintaining epic4 at your site has done a halfway decent job, this will put you on a server that is somewhat local to you. 
+.It Nm "epic4 nickname irc.domain.com"
 or something similar will attempt to connect to the irc server running on the host "irc.domain.com" (fill in a real irc server here) with the nickname of well, "nickname".  
 This is the most common way to specify an alternate server to use.
-.It Nm "epic nickname irc.domain.com:6664"
+.It Nm "epic4 nickname irc.domain.com:6664"
 Sometimes, some servers are really busy, and it can take them a long time to establish a connection with you on the default port (6667).  
 Most major servers on big public networks accept connections on many different ports, with the most common being most or all of the ports between 6660 and 6675.
 You can usually connect much faster if you use a port other than 6667, if the server you're connecting to supports an alternate port.
-.It Nm "epic nickname irc.efnet.net"
+.It Nm "epic4 nickname irc.efnet.net"
 If you're totally stumped and trying to get on efnet, try this.
-.It Nm "epic nickname irc.undernet.org"
+.It Nm "epic4 nickname irc.undernet.org"
 If you're totally stumped and trying to get on undernet, try this.
-.It Nm "epic nickname irc.dal.net"
+.It Nm "epic4 nickname irc.dal.net"
 If you're totally stumped and trying to get on dalnet, try this.
+.El
 .Sh "FILES"
-.Bl -tag -width "/usr/local/share/epic"
-.It Nm /usr/local/bin/epic
+.Bl -tag -width "/usr/share/epic4"
+.It Nm /usr/bin/epic4
 the default location of the binary
 .It Nm ~/.ircrc
 default initialization file
 .It Nm ~/.irc/
 directory you can put your own
-.Nm epic
+.Nm epic4
 scripts into, that can then be loaded with /load
-.It Nm /usr/local/share/epic
+.It Nm /usr/share/epic4
 default directory containing message-of-the-day, master initialization, 
 help files and 
-.Nm epic
+.Nm epic4
 scripts
+.El
 .Sh "THE HELP FILES"
 Starting up the client is the easy part.  
 Once you get connected, you'll probably find you have no idea what you're doing.
@@ -251,7 +254,7 @@
 .Pa <http://www.irchelp.org/>
 Lots of great help for new irc users.
 .Sh "SIGNALS"
-.Nm epic
+.Nm epic4
 handles the following signals gracefully
 .Pp
 .TP
@@ -259,6 +262,7 @@
 .It SIGUSR1
 Closes all DCC connections and EXEC'd processes.
 .Pp
+.El
 .Sh "ENVIRONMENT VARIABLES"
 It can be helpful to predefine certain variables in in the
 .Pa ~/.cshrc
@@ -281,6 +285,7 @@
 .Pa /etc/password
 .It Ev TERM     
 The type of terminal emulation to use
+.El
 .Sh "SEE ALSO"
 .Xr ircd 8
 .Sh BUGS
@@ -297,15 +302,15 @@
 .Sh ERRATA
 The online documentation probably should be in docbook form rather than
 in the current help format.  The entire help system is a hack.
-
-This manual page only describes the options to epic, but doesn't tell
+.PP
+This manual page only describes the options to epic4, but doesn't tell
 you what to do once you get connected.
 .Sh AUTHORS
 Program written by Michael Sandrof (ms5n+@andrew.cmu.edu).
 The copyright holder is Matthew Green (mrg@mame.mu.oz.au).
 This software is maintained by Jeremy Nelson (jnelson@acronet.net)
 on behalf of the EPIC project (list@epicsol.org).
-
+.PP
 At one time or another, this man page has been edited by Darren Reed,
 R.P.C. Rodgers, the lynX, Matthew Green, and Jeremy Nelson.
 .\" end of man page
