--- hybserv-1.9.2.orig/debian/copyright
+++ hybserv-1.9.2/debian/copyright
@@ -0,0 +1,24 @@
+HybServ2 v1.8.0 by Dinko Korunic, Patrick Alken, et al. (see README)
+Packaged by Joshua Kwan <joshk@triplehelix.org>
+and then by Aurélien GÉRÔME <ag@roxor.cx>.
+
+HybServ2 (C) 1998-2001 Patrick Alken, 2002-2006 Dinko Korunic
+
+This program is protected under the GNU General Public License.
+The short version is reproduced here.
+
+   This package is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 dated June, 1991.
+
+   This package is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this package; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+The full version of the GPL can be found in /usr/share/common-licenses/GPL.
--- hybserv-1.9.2.orig/debian/hybserv.links
+++ hybserv-1.9.2/debian/hybserv.links
@@ -0,0 +1 @@
+usr/share/man/man8/showchans.8.gz usr/share/man/man8/shownicks.8.gz
--- hybserv-1.9.2.orig/debian/rules
+++ hybserv-1.9.2/debian/rules
@@ -0,0 +1,123 @@
+#!/usr/bin/make -f
+# debian/rules for the hybserv package
+
+include /usr/share/dpatch/dpatch.make
+
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+NICKLEN = 15
+TOPICLEN = 350
+
+config.status:
+	dh_testdir
+	./configure \
+	--host=$(DEB_HOST_GNU_TYPE) \
+	--build=$(DEB_BUILD_GNU_TYPE) \
+	--prefix=/usr \
+	--sysconfdir=/etc \
+	--localstatedir=/var/log \
+	--with-nicklen=$(NICKLEN) \
+	--with-topiclen=$(TOPICLEN)
+
+build: patch build-stamp
+
+build-stamp:  config.status
+	dh_testdir
+
+	$(MAKE) CFLAGS='$(CFLAGS)'
+
+	touch build-stamp
+
+manpages: manpages-stamp
+
+manpages-stamp:
+	mkdir -p debian/doc-pages
+	for i in `find debian/doc -type f`; \
+	do docbook-to-man $$i \
+		> debian/doc-pages/`basename $$i | sed 's/.sgml//'`; \
+	done
+	touch manpages-stamp
+
+clean: clean1 unpatch
+
+clean1:
+	dh_testdir
+	dh_testroot
+	rm -f *-stamp config.log
+	rm -rf debian/doc-pages
+	-$(MAKE) distclean
+	dh_clean
+
+install: build manpages
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	$(MAKE) DESTDIR=$(CURDIR)/debian/hybserv/ install
+
+binary-indep: build install
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+
+	# mkpasswd -Hmd5 
+	rm	debian/hybserv/usr/sbin/mkpasswd
+
+	cp bin/logon.news debian/hybserv/etc/hybserv
+
+	for i in lintian linda; do \
+		cp debian/hybserv.override.$$i debian/hybserv/usr/share/$$i/overrides/hybserv; \
+	done
+
+	rm debian/hybserv/usr/sbin/show*
+	ln -s hybserv debian/hybserv/usr/sbin/showchans
+	ln -s hybserv debian/hybserv/usr/sbin/shownicks
+
+	dh_installdocs
+	dh_installman debian/doc-pages/*
+
+	# Drop these files. Basically they are repairage for fallout 
+	# from older upstream versions or for servchk which only works
+	# as advertised if threads are enabled.
+	# And finddupe is just an example now.
+
+	rm	debian/hybserv/usr/sbin/encrypt* \
+		debian/hybserv/usr/sbin/servchk \
+		debian/hybserv/usr/sbin/finddupe
+
+	dh_installexamples bin/finddupe
+
+	dh_installinit -u "defaults 21"
+	dh_installchangelogs ChangeLog
+	dh_installdebconf
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+
+	touch debian/hybserv/etc/hybserv/glines.conf
+	touch debian/hybserv/etc/hybserv/jupes.conf
+
+	chmod 660 debian/hybserv/etc/hybserv/*
+	chown -R irc:irc debian/hybserv/etc/hybserv debian/hybserv/var/backups/hybserv
+
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+
+.PHONY: build clean clean1 binary-indep binary-arch binary install patch unpatch manpages
--- hybserv-1.9.2.orig/debian/hybserv.override.lintian
+++ hybserv-1.9.2/debian/hybserv.override.lintian
@@ -0,0 +1,9 @@
+hybserv: non-standard-file-perm etc/hybserv/hybserv.conf 0660 != 0644
+hybserv: non-standard-file-perm etc/hybserv/settings.conf 0660 != 0644
+hybserv: non-standard-file-perm etc/hybserv/glines.conf 0660 != 0644
+hybserv: non-standard-file-perm etc/hybserv/jupes.conf 0660 != 0644
+hybserv: non-standard-file-perm etc/hybserv/motd.dcc 0660 != 0644
+hybserv: non-standard-file-perm etc/hybserv/motd.global 0660 != 0644
+hybserv: non-standard-file-perm etc/hybserv/logon.news 0660 != 0644
+hybserv: binary-without-manpage fixalvl
+hybserv: non-standard-dir-in-var var/backups/
--- hybserv-1.9.2.orig/debian/control
+++ hybserv-1.9.2/debian/control
@@ -0,0 +1,26 @@
+Source: hybserv
+Section: net
+Priority: extra
+Maintainer: Aurélien GÉRÔME <ag@roxor.cx>
+Build-Depends: debhelper (>> 4.0.0), dpatch, docbook-to-man
+Standards-Version: 3.7.2
+
+Package: hybserv
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, ircd-hybrid (>= 7.2.2)
+Conflicts: dancer-services
+Description: IRC services for IRCD-Hybrid
+ HybServ is a daemon that connects to your IRCD-Hybrid server and
+ automagically provides nickname, channel, memo, and oper services
+ to your entire network if it is configured correctly to talk with
+ your IRC server.
+ .
+ In short, these allow users to register nicknames and channels to
+ prevent EFnet-style takeovers thereof, allow opers to easily manage
+ glines, klines, and other server settings, and allow users with
+ registered nicknames to leave messages for others.
+ .
+ HybServ is the services package of choice on IRC networks such
+ as Aniverse.
+ .
+  Homepage: http://www.hybserv.net/
--- hybserv-1.9.2.orig/debian/hybserv.init
+++ hybserv-1.9.2/debian/hybserv.init
@@ -0,0 +1,86 @@
+#! /bin/sh
+
+# hybserv	Start/stop Hybserv 2 IRC Services
+# Version:	hybserv  1.8.0  17-Mar-2003  joshk@triplehelix.org
+# Version:	hybserv  1.9.2  05-Sep-2006  ag@roxor.cx
+
+### BEGIN INIT INFO
+# Provides:          hybserv
+# Required-Start:    $syslog ircd-hybrid
+# Required-Stop:     $syslog ircd-hybrid
+# Should-Start:      $local_fs $network $named
+# Should-Stop:       $local_fs $network $named
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Hybserv daemon init.d script
+# Description:       Use to manage the Hybserv daemon.
+### END INIT INFO
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/hybserv
+NAME=hybserv
+DESC="Hybserv 2 IRC Services"
+
+test -f $DAEMON || exit 0
+
+set -e
+
+if [ "$1" = "start" ] || [ "$1" = "restart" ] || [ "$1" = "force-reload" ]; then
+	if [ ! `grep '#NOT-EDITED#' /etc/hybserv/hybserv.conf | wc -l` -eq 0 ]; then
+		echo "Not starting $DESC: please edit /etc/hybserv/hybserv.conf first..."
+		exit 0
+	fi
+fi
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: $NAME"
+	if [ -f "/var/run/ircd/$NAME.pid" ]; then
+		echo " already running, if this is not the case, then call 'stop' first."
+	else
+		start-stop-daemon --start --quiet \
+			-u irc -c irc --exec $DAEMON >/dev/null 2>&1
+	fi
+	echo "."
+	;;
+  stop)
+	echo -n "Stopping $DESC: $NAME"
+	if [ -f "/var/run/ircd/$NAME.pid" ]; then
+		start-stop-daemon -K -p /var/run/ircd/hybserv.pid -s 15 -q --oknodo
+		rm -f /var/run/ircd/hybserv.pid
+	else
+		echo " ... not running!" # This is abnormal, please file a bug report.
+	fi
+
+	echo "."
+	;;
+  reload)
+  	if [ -f "/var/run/ircd/$NAME.pid" ]; then
+  		echo -n "Reloading configuration files for $NAME..."
+		kill -HUP `cat /var/run/ircd/$NAME.pid`
+		echo "done."
+	else
+		echo "Not reloading configuration files for $NAME - not running!"
+	fi
+	;;
+  restart|force-reload)
+	echo -n "Restarting $DESC: $NAME"
+
+	if [ -f "/var/run/ircd/$NAME.pid" ]; then
+		start-stop-daemon -K -p /var/run/ircd/$NAME.pid -s 15 -q --oknodo
+		sleep 1
+	fi
+	start-stop-daemon --start --quiet \
+		-u irc -c irc --exec $DAEMON \
+		>/dev/null 2>&1
+	echo "."
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
--- hybserv-1.9.2.orig/debian/hybserv.override.linda
+++ hybserv-1.9.2/debian/hybserv.override.linda
@@ -0,0 +1,2 @@
+Tag: non-standard-dir-perm
+Data: /etc/hybserv
--- hybserv-1.9.2.orig/debian/changelog
+++ hybserv-1.9.2/debian/changelog
@@ -0,0 +1,124 @@
+hybserv (1.9.2-4.1) unstable; urgency=high
+
+  * Non-maintainer upload by the security team
+  * Fix DoS via commands with tabs (Closes: #550389)
+    Fixes: CVE-2010-0303
+  * Add db_stop into hybserv.postinst to avoid that the postinst script
+    hangs due to open debconf file descriptors
+    Thanks to Julien Cristau
+
+ -- Steffen Joeris <white@debian.org>  Fri, 29 Jan 2010 14:30:27 +0100
+
+hybserv (1.9.2-4) unstable; urgency=low
+
+  * Update 01_fhs+mkdirfix.dpatch:
+    + Fix BackupDir which was wrong (finish #320287):
+      /etc/hybserv/backup/ => /var/backups/hybserv/.
+      Thanks to Julien BLACHE for spotting this.
+    + Update Debian patchlevel as usual.
+
+ -- Aurélien GÉRÔME <ag@roxor.cx>  Sun,  8 Oct 2006 22:56:50 +0200
+
+hybserv (1.9.2-3) unstable; urgency=high
+
+  * Add missing include /usr/share/debconf/confmodule in hybserv.postrm
+    and hybserv.preinst. (Closes: #389439, #391176)
+  * Update 01_fhs+mkdirfix.dpatch.
+
+ -- Aurélien GÉRÔME <ag@roxor.cx>  Sun,  8 Oct 2006 20:14:37 +0200
+
+hybserv (1.9.2-2) unstable; urgency=low
+
+  * Remove debconf note. (Closes: #386401)
+    Remove:
+    + debian/hybserv.config;
+    + debian/hybserv.templates;
+    + debian/po/.
+    Update:
+    + debian/hybserv.postinst => remove db_stop;
+    + debian/hybserv.postrm => add db_purge;
+    + debian/hybserv.preinst => add db_purge.
+  * Make debian/hybserv.init LSB-compliant.
+  * Update 01_fhs+mkdirfix.dpatch.
+
+ -- Aurélien GÉRÔME <ag@roxor.cx>  Tue, 19 Sep 2006 18:59:18 +0200
+
+hybserv (1.9.2-1) unstable; urgency=low
+
+  * New maintainer. (Closes: #254712)
+  * Update to the latest Standards-Version.
+  * New upstream major version.
+  * Update description in debian/control.
+  * Fix debian/rules for new upstream build system.
+  * Repackage original tarball without the autom4te.cache/ directory.
+  * Removed configure option --disable-threads which does not exist
+    anymore.
+  * Use the same settings as ircd-hybrid:
+    NICKLEN = 15 and TOPICLEN = 350.
+  * Execute the unpatch rule after the clean rule.
+  * Update 01_fhs+mkdirfix.dpatch and 02_debianize_settings.dpatch
+    to match new upstream release.
+  * Remove 03_operserv_die_del_pidfile.dpatch which is merged upstream.
+  * Add debian/watch.
+  * Update FSF address in debian/copyright.
+  * Update lintian overrides.
+  * Fix a suspected bashism in debian/hybserv.preinst by prepending
+    /bin/ to the kill command.
+  * ${misc:Depends} now expands to "debconf | debconf-2.0", thanks
+    to updated dh_installdebconf. (Closes: #331857)
+  * Add debconf Swedish translation from Daniel Nylander.
+    (Closes: #331365)
+  * Switch to po-debconf. (Closes: #351383)
+  * Store backups in /var/backups/hybserv/ instead of
+    /etc/hybserv/backup/. (Closes: #320287)
+  * Clean debian/hybserv.init and update it with a reload command.
+
+ -- Aurélien GÉRÔME <ag@roxor.cx>  Tue,  5 Sep 2006 02:00:06 +0200
+
+hybserv (1.8.0+1.9.0rc2-1) unstable; urgency=low
+
+  * Since 1.8.0 is amazingly old, we'll use CVS with our own patches as
+    necessary for unstable.
+       + This release fixes a CMDHALFOP/AUTOHALFOP mismatch that was
+         present in 1.8.0. (Closes: #194759)
+  * Clean up rules a bit, take out extraneous configure target.
+  * Copy config.{sub,guess} to autoconf/ instead of the top build dir.
+  * Stop shipping mkpasswd (as a symlink) because mkpasswd-hybrid doesn't
+    exist anymore. Also remove the symlinked manpage.
+  * Add a linda override.
+  * Add new script `finddupe' as an example.
+  * Bump Standards-Version to 3.5.10.
+  * Changed priority of the debconf invocation to low.
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Mon, 26 May 2003 13:25:03 -0700
+
+hybserv (1.8.0-2) unstable; urgency=low
+
+  * `Oops, I didn't see that!' release.
+  * hybserv is now configured with --disable-threads. thanks kreator
+  * The init.d script works as advertised now, since hybserv will run in
+    a single thread.
+  * Removed servchk, which only really applies if pthreads are enabled,
+    and they're now not.
+  * Fix permissions on /etc/hybserv. This fixes MASSIVE breakage in -1
+    where hybserv would not be able to write its .db files in that dir.
+  * Removed 'rm -rf debian/patched' and 'rm -f patch-stamp' from the
+    clean target as dpatch's unpatch target handles this already. (minor)
+  * Added an overrides file. It's a Good Thing that not just everyone
+    can read the server-to-server passwords in hybserv.conf, so those weird
+    permissions are excusable.
+  * Removed the files that are repairage for stuff that was broken in
+    earlier upstream versions of hybserv than 1.8.0, which don't exist
+    in Debian.
+  * Thanks to Lazarus Long who helped me immensely in fixing the init
+    script and the postinst/preinst to repair the damage from 1.8.0-1. :)
+  * 03_operserv_die_del_pidfile.dpatch: removes /var/run/ircd/hybserv.pid
+    when an operator uses /msg OperServ die.
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Sun,  6 Apr 2003 11:29:28 -0700
+
+hybserv (1.8.0-1) unstable; urgency=low
+
+  * Initial release (closes: #184262)
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Wed,  5 Mar 2003 11:17:40 -0800
--- hybserv-1.9.2.orig/debian/hybserv.postinst
+++ hybserv-1.9.2/debian/hybserv.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# Show the first time notice
+. /usr/share/debconf/confmodule
+
+# Fixing potential fallout from 1.8.0-1...
+chown irc:irc /etc/hybserv
+
+db_stop
+
+#DEBHELPER#
--- hybserv-1.9.2.orig/debian/hybserv.postrm
+++ hybserv-1.9.2/debian/hybserv.postrm
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+if [ "$1" = "purge" ]; then
+	rm -rf /etc/hybserv /var/log/ircd/hybserv* /var/run/ircd/hybserv* /var/backups/hybserv
+	db_purge
+fi
+
+#DEBHELPER#
--- hybserv-1.9.2.orig/debian/watch
+++ hybserv-1.9.2/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://www.hybserv.net/downloads/hybserv-(.*)\.tar\.gz
--- hybserv-1.9.2.orig/debian/hybserv.preinst
+++ hybserv-1.9.2/debian/hybserv.preinst
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+#DEBHELPER#
+
+if [ "$1" = "upgrade" ]; then
+	if [ "$2" = "1.8.0-1" ]; then
+		echo "Making sure hybserv is dead, initscript from 1.8.0-1 is not so good..."
+		/bin/kill -9 `cat /var/run/ircd/hybserv.pid` >/dev/null 2>&1 || true
+		rm -f /var/run/ircd/hybserv.pid
+	fi
+	if dpkg --compare-versions "$2" ge "1.9.2-2"; then
+		db_purge
+	fi
+fi
--- hybserv-1.9.2.orig/debian/README.Debian
+++ hybserv-1.9.2/debian/README.Debian
@@ -0,0 +1,41 @@
+hybserv for Debian
+------------------
+
+EDIT SETTINGS.CONF AND HYBSERV.CONF! Your soul is forfeit if you don't 
+do it. Besides, it'll bind only to localhost anyway if you don't edit 
+it.
+
+Also, to get ircd-hybrid to talk to it, you'll have to add a connect {} 
+block like this to it:
+
+ connect {
+        name = "services.debian.local";
+        host = "127.0.0.1";
+
+	# this doesn't really matter:
+        port = 6667;
+
+        accept_password = "passw0rd";
+
+        # ignored by hybserv:
+        send_password = "foo";
+        autoconn = no;
+ };
+
+The corresponding lines for this in hybserv.conf would be:
+
+N:services.debian.local:whatever you want
+S:passw0rd:127.0.0.1
+
+Obviously, the name and the accept_password should match what you configured
+in hybserv.conf. send_password is irrelevant because hybserv doesn't care.
+
+If you try to connect to your new services-fortified ircd-hybrid server and
+you get an ERROR: Trying to reconnect too fast, you have probably messed up the
+communication between hybserv and ircd-hybrid (ie hybserv from the same host is
+hammering the server trying to reconnect.) Check hybserv.conf and ircd.conf
+again.
+
+Good luck!
+
+ -- Joshua Kwan <joshk@triplehelix.org>, Wed,  5 Mar 2003 11:17:40 -0800
--- hybserv-1.9.2.orig/debian/compat
+++ hybserv-1.9.2/debian/compat
@@ -0,0 +1 @@
+4
--- hybserv-1.9.2.orig/debian/hybserv.dirs
+++ hybserv-1.9.2/debian/hybserv.dirs
@@ -0,0 +1,5 @@
+etc/hybserv
+usr/sbin
+usr/share/lintian/overrides
+usr/share/linda/overrides
+var/backups/hybserv
--- hybserv-1.9.2.orig/debian/hybserv.docs
+++ hybserv-1.9.2/debian/hybserv.docs
@@ -0,0 +1,6 @@
+README
+TODO
+RELEASENOTES
+UPGRADE
+doc/README-FLAGS
+doc/TCM-LINKING
--- hybserv-1.9.2.orig/debian/doc/showchans.8.sgml
+++ hybserv-1.9.2/debian/doc/showchans.8.sgml
@@ -0,0 +1,145 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Joshua Kwan</firstname>">
+  <!ENTITY dhsurname   "<surname>Kwan</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>4/1/03</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhemail     "<email>joshk@triplehelix.org</email>">
+  <!ENTITY dhusername  "Joshua Kwan">
+  <!ENTITY dhucpackage "<refentrytitle>hybserv</refentrytitle>">
+  <!ENTITY dhpackage   "showchans">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2003</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;, shownicks</refname>
+
+    <refpurpose>show channels and nicks registered with IRC 
+services</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+
+      <arg><option>-f <replaceable>data</replaceable></option></arg>
+
+      <arg><option>-n</option></arg>
+	<arg><option>-h</option><option>-?</option></arg>
+	<arg><replaceable>nick1</replaceable> / <replaceable>chan1</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> and <command>shownicks</command>
+      commands.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.</para>
+
+    <para><command>&dhpackage;</command> and 
+<command>shownicks</command> are symlinks to the hybserv binary. 
+Invoked without arguments, they read the default channel or nickname 
+databases and display all the registered channels or nicknames. 
+The optional arguments are described below.</para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-h</option>
+          <option>-?</option>
+        </term>
+        <listitem>
+          <para>Shows the summary of options.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>-f data</option></term>
+        <listitem><para>Specify data as the nick.db or chan.db to read from.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-n</option></term>
+        <listitem><para>Instead of displaying all the nicks, 
+display how many registered channels or nicks there are.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>nick1, chan1</option></term>
+        <listitem><para>Show details on the specified nick or 
+channel.</para>
+</listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <para>hybserv (8), ircd-hybrid (8).</para>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &lt;&dhemail;&gt; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; Free Documentation
+      License, Version 1.1 or any later version published by the Free
+      Software Foundation; with no Invariant Sections, no Front-Cover
+      Texts and no Back-Cover Texts.</para>
+
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
+
+
--- hybserv-1.9.2.orig/debian/doc/hybserv.8.sgml
+++ hybserv-1.9.2/debian/doc/hybserv.8.sgml
@@ -0,0 +1,135 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Joshua Kwan</firstname>">
+  <!ENTITY dhsurname   "<surname>Kwan</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>4/1/03</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhemail     "<email>joshk@triplehelix.org</email>">
+  <!ENTITY dhusername  "Joshua Kwan">
+  <!ENTITY dhucpackage "<refentrytitle>hybserv</refentrytitle>">
+  <!ENTITY dhpackage   "hybserv">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2003</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+    <refpurpose>daemon which provides IRC services</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> command.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.</para>
+
+    <para><command>&dhpackage;</command> is an IRC Services server, a daemon
+    which connects to an IRC server and provides services such as
+    NickServ and ChanServ to users, allowing them to register their
+    nicknames and channels (the latter to prevent the notorious `channel
+    takeovers' that were rampant on EFnet, which to date still does not 
+    provide IRC services.)</para>
+
+    <para><command>&dhpackage;</command> appears like any other IRC server
+    on a network and all of the services nicknames act as clients with
+    customizable user flags (typically +oi, although they do not need
+    any special flags to function correctly.)</para>
+
+    <para><command>&dhpackage;</command> provides, in its default configuration, NickServ, ChanServ, MemoServ,
+    OperServ, StatServ, and Global, which are
+    described individually below.</para>
+
+    <para>NickServ allows for registration of nicknames; it can enforce
+    this registration on users who do not own the nicknames they use.
+    Owners of nicks can also 'ghost' their nickname with their registration password,
+    in case someone has taken possession of it or it is a 'ghost' that
+    has not timed out yet.</para>
+
+    <para>ChanServ allows users with registered nicknames to register channels;
+    this registration is enforced with an 'access list' which allows the owner to specify who automatically gets operator status in a channel,
+    or voice, or halfops if supported by the IRC server. ChanServ can also
+    maintain a blacklist of sorts where users under certain hostmasks will automatically be kicked and banned from the channel.</para>
+
+<para>MemoServ is simply a message service for people who have registered
+nicknames - they are able to send static messages to each other for later
+reading.</para>
+
+<para>StatServ and Global play minor roles - Global displays the logon.news (in /etc/hybserv) and allows operators to easily send global messages to all users, and StatServ is much like a glorified ircd STATS call.</para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+	<para>hybserv does not take any arguments unless invoked as showchans(8) or shownicks(8).</para>
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <para>showchans(8), shownicks(8), ircd-hybrid(8).</para>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &lt;&dhemail;&gt; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; Free Documentation
+      License, Version 1.1 or any later version published by the Free
+      Software Foundation; with no Invariant Sections, no Front-Cover
+      Texts and no Back-Cover Texts.</para>
+
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
+
+
--- hybserv-1.9.2.orig/debian/doc/cleandb.8.sgml
+++ hybserv-1.9.2/debian/doc/cleandb.8.sgml
@@ -0,0 +1,120 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Joshua Kwan</firstname>">
+  <!ENTITY dhsurname   "<surname>Kwan</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>4/1/03</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhemail     "<email>joshk@triplehelix.org</email>">
+  <!ENTITY dhusername  "Joshua Kwan">
+  <!ENTITY dhucpackage "<refentrytitle>hybserv</refentrytitle>">
+  <!ENTITY dhpackage   "cleandb">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2003</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>purges old HybServ services database 
+backups</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+	<arg><replaceable>backupdir</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command>.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.</para>
+
+    <para><command>&dhpackage;</command> is a shell script which purges 
+all the backups in (by default) /etc/hybserv/backup that are not from 
+the past month.</para>
+
+	<para><command>&dhpackage;</command> takes no further arguments.</para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>backupdir</option>
+        </term>
+        <listitem>
+          <para>The location of your backups.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <para>hybserv (8).</para>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &lt;&dhemail;&gt; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; Free Documentation
+      License, Version 1.1 or any later version published by the Free
+      Software Foundation; with no Invariant Sections, no Front-Cover
+      Texts and no Back-Cover Texts.</para>
+
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
+
+
--- hybserv-1.9.2.orig/debian/patches/00list
+++ hybserv-1.9.2/debian/patches/00list
@@ -0,0 +1,3 @@
+01_fhs+mkdirfix
+02_debianize_settings
+03_commands_DoS
--- hybserv-1.9.2.orig/debian/patches/02_debianize_settings.dpatch
+++ hybserv-1.9.2/debian/patches/02_debianize_settings.dpatch
@@ -0,0 +1,243 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_debianize_settings.dpatch by Aurélien GÉRÔME <ag@roxor.cx>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Make it work with ircd-hybrid package out of the box and
+## DP: other settings.
+
+@DPATCH@
+diff -urNad hybserv~/bin/hybserv.conf hybserv/bin/hybserv.conf
+--- hybserv~/bin/hybserv.conf	2006-09-05 00:12:10.000000000 +0000
++++ hybserv/bin/hybserv.conf	2006-09-05 00:12:16.473637300 +0000
+@@ -7,14 +7,14 @@
+ # This should contain the name(s) and email(s) of the services 
+ # administrator(s) - just to tell users who to contact w/ questions
+ 
+-A:SideWnder <wnder@underworld.net>
++A:Debian User <user@i.love.debian.org>
+ 
+ # The first field is the name you want the services server to be.  It
+ # should match the C/N lines of the hub server.  The second field is
+ # the text info for the services (it corresponds to the third field
+ # in a server's M line)
+ 
+-N:services.hybnet.com:Hybrid services
++N:services.debian.local:Hybrid services
+ 
+ # This line should contain three fields. In order, the password for
+ # the connection, the hostname (or IP address) of the hub server to
+@@ -25,16 +25,13 @@
+ # and so on.
+ # (The password must match the C/N lines of the hub server).
+ 
+-S:ConnectPassword:irc.hub.net:6667
+-S:DumbPass:irc.althub.net:6666
+-S:Services:irc.anotherhub.net:
++S:passw0rd:127.0.0.1
+ 
+ # V: lines specify a virtual hostname to bind to when connecting to
+ # a remote site. IP Addresses can be used as well. If multiple V:
+ # lines are given, only the first is used
+ 
+-#V:my.virtual.host.com
+-#V:12.34.56.78
++V:127.0.0.1
+ 
+ # O: lines specify users who will have access to Hybserv.  The first
+ # field should contain the user's username@host.  The second should
+@@ -49,6 +46,12 @@
+ #          is defined in config.h (which is the default) - use
+ #          mkpasswd to generate the password
+ 
++# YOU MUST CHANGE THIS YOU MUST CHANGE THIS >>NOW<<
++# Take this line out too for hybserv to start:
++#NOT-EDITED#
++
++#O:hostmasks@*.work*.too.org:[CRYPTEDPASS]:[NICKNAME]:[MODEFLAGS]
++
+ O:servadmin@services.com:DifficultPassword:ServAdmin:segj
+ O:admin@services.com:Password:Nickname:aegj
+ O:coadmin@services.com:ChangeThis:Charlie:ae
+@@ -58,7 +61,6 @@
+ # C: lines specify channels that OperServ will monitor.  The first
+ # field is the name of the channel. 
+ 
+-C:#HybNet
+ C:#services
+ 
+ # I: lines specify restricted hostmasks.  The fields, in order:
+@@ -83,8 +85,8 @@
+ # have an N: and C: line in their userlist.cf, matching the password,
+ # nick (OperServ), and hostname that Hybserv is running on.
+ 
+-B:irc.tcm.com:tcmMON:FakePass:6800
+-B:irc.tcm2.org:lalaMON:Blah:
++#B:irc.tcm.com:tcmMON:FakePass:6800
++#B:irc.tcm2.org:lalaMON:Blah:
+ 
+ # L: lines give remote TCM bots access to link to Hybserv.  The fields
+ # are the hostmask of the remote TCM's box, the nickname of the TCM,
+@@ -92,8 +94,8 @@
+ # if you have no clue what a TCM is, or are not sure how to get a
+ # TCM to link to Hybserv.
+ 
+-L:*.tcm.org:tcmMON:FakePass
+-L:tcm@*.bots.com:tcmMON:FakePass
++#L:*.tcm.org:tcmMON:FakePass
++#L:tcm@*.bots.com:tcmMON:FakePass
+ 
+ # P: lines specify ports to listen on for tcm or user connections
+ # The fields are the hostmask to accept (optional), the port
+@@ -103,11 +105,11 @@
+ # the first field of the L: line
+ 
+ # Listens for tcm bot connections on port 6900
+-P::6900:tcm
++#P::6900:tcm
+ # Allows users matching *.com to connect on port 5555
+-P:*.com:5555:users
++#P:*.com:5555:users
+ # Allows anyone to connect on port 5656
+-P::5656:users
++#P::5656:users
+ 
+ # J: lines specify server jupes (servers that match a jupe line
+ # will not be allowed to connect to the network).  The first field
+diff -urNad hybserv~/bin/logon.news hybserv/bin/logon.news
+--- hybserv~/bin/logon.news	2006-09-05 00:12:10.000000000 +0000
++++ hybserv/bin/logon.news	2006-09-05 00:12:16.473637300 +0000
+@@ -1 +1,3 @@
+-Welcome to this wonderful Hybrid Network!
++If you're seeing this, Hybserv for Debian is working and installed. Edit 
++this file (/etc/hybserv/logon.news) or make it blank to delete the login 
++news.
+diff -urNad hybserv~/bin/settings.conf.in hybserv/bin/settings.conf.in
+--- hybserv~/bin/settings.conf.in	2006-09-05 00:12:10.000000000 +0000
++++ hybserv/bin/settings.conf.in	2006-09-05 00:12:16.473637300 +0000
+@@ -81,12 +81,13 @@
+ # 
+ ################################################################
+ 
+-HPath              "@prefix@/hybserv"
++HPath              "/etc/hybserv"
+ ConfigFile         "hybserv.conf"
+ LogFile            "hybserv.log"
+-PidFile            "hybserv.pid"
+-HelpPath           "help"
+-LogPath            "logs"
++PidFile            "/var/run/ircd/hybserv.pid"
++HelpPath           "/usr/share/hybserv/help"
++LogPath            "/var/log/ircd"
++BackupPath         "/var/backups/hybserv"
+ DccMotdFile        "motd.dcc"
+ MotdFile           "motd.global"
+ 
+@@ -392,7 +393,7 @@
+ #  rehash, restart, die, kill, jupe, unjupe, gline, ungline,
+ #  omode, secure, on, off, jump, killchan, killhost, htm
+ 
+-DoWallops
++#DoWallops
+ 
+ # BCFloodCount [RECOMMENDED]
+ # BCFloodTime  [RECOMMENDED]
+@@ -503,14 +504,14 @@
+ # can register. Administrators may register unlimited
+ # channels.
+ 
+-MaxChansPerUser    10
++MaxChansPerUser    20
+ 
+ # MinChanUsers <value> [RECOMMENDED]
+ #
+ #  Set this to the minimum channel users required to
+ # be able to register a channel.
+ 
+-MinChanUsers       10
++MinChanUsers       1
+ 
+ # MaxAkicks <value> [RECOMMENDED]
+ #
+@@ -574,7 +575,7 @@
+ # so Chanserv will not sit on any channel. I have found this
+ # quite annoying feature, so this is how you can turn if off.
+ 
+-#AllowGuardChannel
++AllowGuardChannel
+ 
+ ################################################################
+ #
+@@ -820,7 +821,7 @@
+ # deleted to make room for the new one.
+ #  You may comment this out to never delete log files.
+ 
+-MaxLogs            5
++#MaxLogs            5
+ 
+ # MaxModes <value> [REQUIRED]
+ #
+@@ -842,7 +843,7 @@
+ #
+ # This turns on support for MD5 capable crypt using MCF
+ 
+-#UseMD5
++UseMD5
+ 
+ # MaxTSDelta <integer> [OPTIONAL]
+ #
+diff -urNad hybserv~/include/settings.h hybserv/include/settings.h
+--- hybserv~/include/settings.h	2006-09-05 00:12:10.000000000 +0000
++++ hybserv/include/settings.h	2006-09-05 00:12:16.477638417 +0000
+@@ -51,6 +51,7 @@
+ extern  char      *HPath;
+ extern  char      *HelpPath;
+ extern  char      *LogPath;
++extern  char      *BackupPath;
+ extern  char      *JupeFile;
+ extern  char      *LogFile;
+ extern  char      *LogonNews;
+diff -urNad hybserv~/src/data.c hybserv/src/data.c
+--- hybserv~/src/data.c	2006-09-05 00:12:10.000000000 +0000
++++ hybserv/src/data.c	2006-09-05 00:12:16.477638417 +0000
+@@ -359,10 +359,10 @@
+ 	temp[MAXLINE + 1];
+ 
+ 	/*
+-	 * First make sure HPath/backup/ exists
+-	 * Notice that %s/backup/something has to be under 512 characters. -kre
++	 * First make sure BackupPath exists
++	 * Notice that BackupPath/something has to be under 512 characters. -kre
+ 	 */
+-	ircsprintf(bpath, "%s/backup", HPath);
++	ircsprintf(bpath, BackupPath);
+ 	/* Function mkdir() returns -1 on failure -kre */
+ 	if (mkdir(bpath, 0700)==-1)
+ 	{
+@@ -380,7 +380,7 @@
+ 
+ 	backup_tm = localtime(&unixtime);
+ 
+-	ircsprintf(bpath, "%s/backup/%d%02d%02d", HPath, 1900 +
++	ircsprintf(bpath, "%s/%d%02d%02d", BackupPath, 1900 +
+ 	           backup_tm->tm_year, backup_tm->tm_mon + 1, backup_tm->tm_mday);
+ 
+ 	/*
+diff -urNad hybserv~/src/settings.c hybserv/src/settings.c
+--- hybserv~/src/settings.c	2006-09-05 00:12:10.000000000 +0000
++++ hybserv/src/settings.c	2006-09-05 00:12:16.477638417 +0000
+@@ -32,6 +32,7 @@
+ char      *PidFile;
+ char      *HelpPath;
+ char      *LogPath;
++char      *BackupPath;
+ char      *MotdFile;
+ char      *DccMotdFile;
+ 
+@@ -182,6 +183,7 @@
+ 	    { "PidFile", D_NORUNTIME,         { { PARAM_STRING, &PidFile } } },
+ 	    { "HelpPath", D_NORUNTIME,        { { PARAM_STRING, &HelpPath } } },
+ 	    { "LogPath", D_NORUNTIME,         { { PARAM_STRING, &LogPath } } },
++	    { "BackupPath", D_NORUNTIME,      { { PARAM_STRING, &BackupPath } } },
+ 	    { "MotdFile", D_NORUNTIME,        { { PARAM_STRING, &MotdFile } } },
+ 	    { "DccMotdFile", D_NORUNTIME,     { { PARAM_STRING, &DccMotdFile } } },
+ 
--- hybserv-1.9.2.orig/debian/patches/03_commands_DoS.dpatch
+++ hybserv-1.9.2/debian/patches/03_commands_DoS.dpatch
@@ -0,0 +1,14 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+
+@DPATCH@
+--- ../old/hybserv-1.9.2/src/mystring.c	2005-11-29 11:40:00.000000000 +0000
++++ hybserv-1.9.2/src/mystring.c	2010-01-29 09:58:15.000000000 +0000
+@@ -142,7 +142,7 @@
+ 		else
+ 			return x;
+ 
+-		while (*buf == ' ')
++		while (IsSpace(*buf))
+ 			++buf;
+ 
+ 		if (*buf == '\0')
--- hybserv-1.9.2.orig/debian/patches/01_fhs+mkdirfix.dpatch
+++ hybserv-1.9.2/debian/patches/01_fhs+mkdirfix.dpatch
@@ -0,0 +1,141 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_fhs+mkdirfix.dpatch by Aurélien GÉRÔME <ag@roxor.cx>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use mkdir -p instead of mkdir alone and do other FHS-related
+## DP: fixes.
+
+@DPATCH@
+diff -urNad hybserv~/Makefile.in hybserv/Makefile.in
+--- hybserv~/Makefile.in	2006-09-05 00:36:33.000000000 +0000
++++ hybserv/Makefile.in	2006-09-05 00:38:42.760264789 +0000
+@@ -3,21 +3,21 @@
+ 
+ # This is installation prefix. It can be overrided by passing PREFIX
+ # argument to make, as in making a fake tree for binary package.
+-PREFIX = @prefix@
++PREFIX = $(DESTDIR)/@prefix@
+ 
+ # Set this to the directory to install the hybserv binary
+-BINDIR = $(PREFIX)/hybserv
++BINDIR = $(PREFIX)/sbin
+ 
+ # Set this to the directory to install hybserv.conf, motd.dcc, etc
+-CONFDIR = $(PREFIX)/hybserv
++CONFDIR = $(DESTDIR)/@sysconfdir@/hybserv
+ 
+ # Set this to the directory to install help files 
+ # (should match HelpPath in settings.conf)
+-HELPDIR = $(PREFIX)/hybserv/help
++HELPDIR = $(PREFIX)/share/hybserv/help
+ 
+ # Set this to the directory for logs repository
+ # (should match LogPath in settings.conf)
+-LOGDIR = $(PREFIX)/hybserv/logs
++LOGDIR = $(DESTDIR)/@localstatedir@/ircd
+ 
+ ############ Don't change anything below here ############
+ 
+@@ -93,15 +93,15 @@
+ install-binary:
+ 	@if test ! -d $(BINDIR); then \
+ 		echo Creating $(BINDIR); \
+-		mkdir $(BINDIR) 2>/dev/null; \
++		mkdir -p $(BINDIR) 2>/dev/null; \
+ 	fi
+ 	@if test ! -d $(CONFDIR); then \
+ 		echo Creating $(CONFDIR); \
+-		mkdir $(CONFDIR) 2>/dev/null; \
++		mkdir -p $(CONFDIR) 2>/dev/null; \
+ 	fi
+ 	@if test ! -d $(LOGDIR); then \
+ 		echo Creating $(LOGDIR); \
+-		mkdir $(LOGDIR) 2>/dev/null; \
++		mkdir -p $(LOGDIR) 2>/dev/null; \
+ 	fi
+ 	@echo '** Installing Hybserv2 in $(BINDIR) **'
+ 	@$(INSTALL_BIN) "bin/hybserv" "$(BINDIR)/hybserv"
+@@ -131,11 +131,11 @@
+ install-help:
+ 	@if test ! -d $(HELPDIR); then \
+ 		echo Creating $(HELPDIR); \
+-		mkdir $(HELPDIR) 2>/dev/null; \
++		mkdir -p $(HELPDIR) 2>/dev/null; \
+ 	else \
+ 		echo Removing old $(HELPDIR); \
+ 		$(RMR) $(HELPDIR); \
+-		mkdir $(HELPDIR) 2>/dev/null; \
++		mkdir -p $(HELPDIR) 2>/dev/null; \
+ 	fi
+ 	@echo Installing help files in $(HELPDIR)
+ 	@$(CPR) help/* $(HELPDIR)
+diff -urNad hybserv~/bin/cleandb.in hybserv/bin/cleandb.in
+--- hybserv~/bin/cleandb.in	2006-09-05 00:36:33.000000000 +0000
++++ hybserv/bin/cleandb.in	2006-09-05 00:38:42.760264789 +0000
+@@ -16,7 +16,7 @@
+ # confirmation for each directory being deleted.
+ 
+ # Set this to the default backup directory
+-BackupDir="@prefix@/hybserv/backup/"
++BackupDir="/var/backups/hybserv/"
+ 
+ # Don't touch anything below here
+ 
+diff -urNad hybserv~/bin/servchk hybserv/bin/servchk
+--- hybserv~/bin/servchk	2006-09-05 00:36:33.000000000 +0000
++++ hybserv/bin/servchk	2006-09-05 00:38:42.760264789 +0000
+@@ -6,16 +6,16 @@
+ # 0,10,20,30,40,50 * * * * /path/to/servchk >/dev/null 2>&1
+ 
+ # Set this to the directory where hybserv is located
+-hpath="/usr/local/hybserv"
++hpath="/usr/sbin"
+ 
+ # Set this to the name of the pid file
+-hpidfile="hybserv.pid"
++hpidfile="/var/run/ircd/hybserv.pid"
+ 
+ # Set this to the path to the configuration file
+-conffile="hybserv.conf"
++conffile="/etc/hybserv/hybserv.conf"
+ 
+-if test -r $hpath/$hpidfile; then
+-	hpid=`cat $hpath/$hpidfile`
++if test -r $hpidfile; then
++	hpid=`cat $hpidfile`
+ 	if `kill -CHLD $hpid >/dev/null 2>&1`; then
+ 		# still running
+ 		exit 0
+diff -urNad hybserv~/configure hybserv/configure
+--- hybserv~/configure	2006-09-05 00:36:33.000000000 +0000
++++ hybserv/configure	2006-09-05 00:38:53.163166819 +0000
+@@ -1341,7 +1341,7 @@
+ if test -f "$srcdir/.svn/entries"; then
+   ac_cv_revision="svn-"`grep committed-rev $srcdir/.svn/entries | sort -ur | head -n 1 | cut -d '"' -f 2`
+ else
+-  ac_cv_revision="release"
++  ac_cv_revision="debian-4"
+ fi
+ ac_cv_version="$PACKAGE_VERSION-$ac_cv_revision"
+ 
+@@ -9447,7 +9447,7 @@
+ Configuration:
+   Source revision ...... ${ac_cv_revision}
+   Detected OS .......... ${host_os}
+-  Install path ......... ${prefix}/hybserv
++  Install path ......... ${prefix}
+ 
+ Compile configuration:
+   Configured network ... ${ac_cv_network}
+diff -urNad hybserv~/include/config.h.in hybserv/include/config.h.in
+--- hybserv~/include/config.h.in	2006-09-05 00:36:33.000000000 +0000
++++ hybserv/include/config.h.in	2006-09-05 00:38:42.768267022 +0000
+@@ -14,7 +14,7 @@
+  * This will automagically transform into correct SETPATH. Don't change
+  * it.
+  */
+-#define   SETPATH   "@prefix@/hybserv/settings.conf"
++#define   SETPATH   "/etc/hybserv/settings.conf"
+ 
+ /*
+  * Define this to enable NickServ (Nickname Services)
