--- rinetd-0.61.orig/Makefile
+++ rinetd-0.61/Makefile
@@ -4,6 +4,9 @@
 	gcc rinetd.o match.o -o rinetd
 
 install: rinetd
-	install -m 700 rinetd /usr/sbin
-	install -m 644 rinetd.8 /usr/man/man8
+	install -m 755 rinetd $(DESTDIR)/usr/sbin
+	install -m 644 rinetd.8 $(DESTDIR)/usr/share/man/man8
+	install -m 600 rinetd.conf $(DESTDIR)/etc
 
+clean:
+	rm -f rinetd *.o *~
--- rinetd-0.61.orig/debian/rules
+++ rinetd-0.61/debian/rules
@@ -0,0 +1,52 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+	# Add here commands to compile the pacckage.
+	$(MAKE)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	# Add here commands to clean up after the build process.
+	$(MAKE) clean
+	dh_clean
+
+# Build architecture-independent files here.
+binary-indep: build
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build
+	dh_testdir
+	dh_testroot
+	dh_clean
+	dh_installdirs
+	# Add here commands to install the files into debian/tmp
+	$(MAKE) DESTDIR=debian/tmp install
+	dh_installdocs README index.html
+	dh_installinit
+	dh_installmanpages
+	dh_installchangelogs CHANGES
+	dh_installcron
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+source diff:                                                                  
+	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary
--- rinetd-0.61.orig/debian/init
+++ rinetd-0.61/debian/init
@@ -0,0 +1,44 @@
+#! /bin/sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/rinetd
+CONFFILE=/etc/rinetd.conf
+NAME=rinetd
+DESC="internet redirection server"
+
+test -f $DAEMON || exit 0
+test -f $CONFFILE || exit 0
+
+set -e
+
+case "$1" in
+  start)
+    echo -n "Starting $DESC:"
+    start-stop-daemon --start --quiet --exec $DAEMON && echo -n " $NAME"
+    echo "."
+    ;;
+  stop)
+    echo -n "Stopping $DESC:"
+    start-stop-daemon --stop --quiet --pidfile /var/run/rinetd.pid --exec $DAEMON && echo -n " $NAME"
+    echo "."
+    ;;
+  reload|force-reload)
+    echo -n "Reloading configuration of $DESC:"
+    start-stop-daemon --stop --quiet --pidfile /var/run/rinetd.pid --signal 1 --exec $DAEMON && echo -n " $NAME"
+    echo "."
+    ;;
+  restart)
+    echo -n "Stopping $DESC:"
+    start-stop-daemon --stop --quiet --pidfile /var/run/rinetd.pid --exec $DAEMON && echo -n " $NAME"
+    echo "."
+    echo -n "Starting $DESC:"
+    start-stop-daemon --start --quiet --pidfile /var/run/rinetd.pid --exec $DAEMON && echo -n " $NAME"
+    echo "."
+    ;;
+  *)
+    echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload}"
+    exit 1
+    ;;
+esac
+
+exit 0
--- rinetd-0.61.orig/debian/dirs
+++ rinetd-0.61/debian/dirs
@@ -0,0 +1,3 @@
+usr/sbin
+usr/share/man/man8
+etc
--- rinetd-0.61.orig/debian/control
+++ rinetd-0.61/debian/control
@@ -0,0 +1,18 @@
+Source: rinetd
+Section: net
+Priority: optional
+Maintainer: Gergely Madarasz <gorgo@caesar.elte.hu>
+Standards-Version: 3.5.1
+Build-Depends: debhelper
+
+Package: rinetd
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Internet redirection server
+ rinetd redirects TCP connections from one IP address and port to another.
+ rinetd is a single-process server which handles any number of connections
+ to the address/port pairs specified in the file /etc/rinetd.conf. Since
+ rinetd runs as a single process using nonblocking I/O, it is able to
+ redirect a large number of connections without a severe impact on the 
+ machine. This makes it practical to run services on machines inside an IP
+ masquerading firewall.
--- rinetd-0.61.orig/debian/copyright
+++ rinetd-0.61/debian/copyright
@@ -0,0 +1,15 @@
+This package was debianized by Gergely Madarasz gorgo@caesar.elte.hu on
+Sun, 07 Dec 1997 01:14:33 +0100.
+
+It was downloaded from
+ftp://ftp.boutell.com/pub/boutell/rinetd/rinetd.tar.gz
+
+Changes:
+  07-December-1997 Gergely Madarasz <gorgo@caesar.elte.hu>
+	added debian control files
+
+Copyright (c) 1997, Thomas Boutell and Boutell.Com, Inc.  This software
+is released for free use under the terms of the GNU Public License, version 
+2 or higher.
+
+On Debian systems see /usr/share/common-licenses/GPL
--- rinetd-0.61.orig/debian/changelog
+++ rinetd-0.61/debian/changelog
@@ -0,0 +1,49 @@
+rinetd (0.61-1) unstable; urgency=low
+
+  * Non maintainer upload
+  * New upstream release
+  * Updated Standards-Version to 3.5.1
+  * Reference to GPL in debian/copyright is corrected to
+    /usr/share/common-licenses/GPL
+  * Upstream URL in debian/copyright is corrected to
+    ftp://ftp.boutell.com/pub/boutell/rinetd/rinetd.tar.gz
+  * Upstream changelog will be installed with dh_installchangelogs
+    instead of dh_installdocs
+  * dh_suidregister call is removed from debian/rules
+  * Build-Depends on debhelper added
+  * Recompiled with newer debhelper version doing the /usr/doc to
+    /usr/share/doc transition for us
+  * Moved man pages from /usr/man to /usr/share/man to comply with FHS
+
+ -- Roland Bauerschmidt <rb@debian.org>  Fri, 16 Feb 2001 10:53:19 -0600
+
+rinetd (0.52-2) unstable; urgency=low
+
+  * Add cron.weekly entry for rotating the logs
+
+ -- Gergely Madarasz <gorgo@caesar.elte.hu>  Sat, 16 Jan 1999 01:21:26 +0100
+
+rinetd (0.52-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Gergely Madarasz <gorgo@caesar.elte.hu>  Fri, 15 Jan 1999 21:22:14 +0100
+
+rinetd (0.41-1) unstable; urgency=low
+
+  * added reload, restart and force-reload entries to init.d script
+  * marked init.d script as conffile
+  * remove dh_du calls from debian/rules
+  * New upstream version
+
+ -- Gergely Madarasz <gorgo@caesar.elte.hu>  Thu,  5 Mar 1998 18:53:03 +0100
+
+rinetd (0.3-1) unstable; urgency=low
+
+  * Initial release
+
+ -- Gergely Madarasz <gorgo@caesar.elte.hu>  Sun,  7 Dec 1997 02:07:00 +0100
+
+Local variables:
+mode: debian-changelog
+End:
--- rinetd-0.61.orig/debian/conffiles
+++ rinetd-0.61/debian/conffiles
@@ -0,0 +1,3 @@
+/etc/rinetd.conf
+/etc/init.d/rinetd
+/etc/cron.weekly/rinetd
--- rinetd-0.61.orig/debian/cron.weekly
+++ rinetd-0.61/debian/cron.weekly
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+cd /var/log
+
+if [ -f rinetd.log ]; then
+	savelog -u root -g adm -m 640 -c 7 /var/log/rinetd.log >/dev/null
+fi
--- rinetd-0.61.orig/rinetd.conf
+++ rinetd-0.61/rinetd.conf
@@ -0,0 +1,25 @@
+#
+# this is the configuration file for rinetd, the internet redirection server
+#
+# you may specify global allow and deny rules here
+# only ip addresses are matched, hostnames cannot be specified here
+# the wildcards you may use are * and ?
+#
+# allow 192.168.2.*
+# deny 192.168.2.1?
+
+
+#
+# forwarding rules come here
+#
+# you may specify allow and deny rules after a specific forwarding rule
+# to apply to only that forwarding rule
+#
+# bindadress    bindport  connectaddress  connectport
+
+
+# logging information
+logfile /var/log/rinetd.log
+
+# uncomment the following line if you want web-server style logfile format
+# logcommon
