diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 00000000..e69de29b
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 00000000..c6769fa5
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,30 @@
+#! /bin/sh
+
+NETSFILE="/etc/tinc/nets.boot"
+
+set -e
+
+case "$1" in
+    configure)
+	if [ ! -e /dev/.devfsd ] ; then if [ ! -e /dev/.devfs ] ; then
+		if [ ! -e /dev/net/tun ] ; then if [ ! -e /dev/tun ] ; then if [ -e /dev/MAKEDEV ]; then
+			echo "Creating tun device..."
+			cd /dev && ./MAKEDEV net/tun 2>/dev/null || ./MAKEDEV tun 2>/dev/null || echo "Failed to create tun device."
+		fi; fi; fi
+	fi; fi
+
+	if [ ! -e $NETSFILE ] ; then
+	    echo "## This file contains all names of the networks to be started on system startup." > $NETSFILE
+	fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+#DEBHELPER#
diff --git a/debian/tinc.default b/debian/tinc.default
new file mode 100644
index 00000000..bca24321
--- /dev/null
+++ b/debian/tinc.default
@@ -0,0 +1,7 @@
+# Extra options to be passed to tincd.
+# EXTRA="-d"
+
+# Limits to be configured for the tincd process. Please read your shell
+# (pointed by /bin/sh) documentation for ulimit. You probably want to raise the
+# max locked memory value if using both --mlock and --user flags.
+# LIMITS="-l 1024"
diff --git a/debian/tinc.dirs b/debian/tinc.dirs
new file mode 100644
index 00000000..1eae2e2d
--- /dev/null
+++ b/debian/tinc.dirs
@@ -0,0 +1,7 @@
+usr/sbin
+usr/share
+etc
+etc/init.d
+usr/share/locale
+usr/share/doc/tinc
+etc/tinc
diff --git a/debian/tinc.files b/debian/tinc.files
new file mode 100644
index 00000000..ed7bd233
--- /dev/null
+++ b/debian/tinc.files
@@ -0,0 +1,7 @@
+usr/sbin/tincd
+usr/sbin/tinc
+usr/share/man
+etc
+usr/share/doc/tinc
+usr/share/locale
+usr/share/info