packaging: Make a deb, adjust the setuptools scripts

This makes the source into a proper Debian package, and also creates the
egg-info, as well as a skeleton man page.

Change-Id: Ifeb490f42d7472d56d720f13ff814930ab5917d4
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..176bf6a
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+mdt (0.0.1-1) unstable; urgency=low
+
+  * Initial release
+
+ -- June Tate-Gans <jtgans@google.org>  Thu, 27 Dec 2018 14:02:00 -0700
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..730acc8
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,27 @@
+Source: mdt
+Section: python
+Maintainer: AIY Projects <support-aiyprojects@google.com>
+Build-Depends: debhelper,
+               dh-python,
+               python3-all-dev,
+               python3-setuptools
+Priority: optional
+Vcs-Git: https://aiyprojects.googlesource.com/mdt
+
+Package: mdt
+Section: misc
+Priority: optional
+Architecture: all
+Depends: ${python3:Depends},
+         ${misc:Depends},
+         python3-zeroconf,
+         python3-spur
+Description: simple tool to work with single board computers running Mendel Linux
+ MDT is a simple tool to aid in working with single board computers that the
+ Mendel Linux distribution runs on. It consists of a whole bunch of
+ pre-existing open source tooling, coupled with some simple wrappers written in
+ python to ease their use.
+ .
+ It also provides an easy way to interact with these boards without having to
+ fight with serial consoles, IP addresses, and other fiddly bits, reducing
+ barrier to entry when working with these boards.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..52b67a7
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,7 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: aiy-board-tools
+Source: https://aiyprojects.googlesource.com/aiy-board-tools
+
+Files: *
+Copyright: Copyright 2018 Google, LLC <support-aiyprojects@google.com>
+License: Apache-2.0
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..6661f78
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,17 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+export PYBUILD_DESTDIR_python3=debian/mdt/
+
+%:
+	dh $@ --with python3 --buildsystem=pybuild
+
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -rf mdt/__pycache__
+
+# disable until we have tests to run
+override_dh_auto_test:
diff --git a/man/mdt.1 b/man/mdt.1
new file mode 100644
index 0000000..423d5ad
--- /dev/null
+++ b/man/mdt.1
@@ -0,0 +1,27 @@
+.TH MDT "1" "December 2018" "MDT" "User Commands"
+.SH NAME
+mdt \- manipulate Mendel Linux devices
+.SH SYNOPSIS
+.B mdt
+[\fI\,OPTIONS\/\fR]... [[\fI\,SUBCOMMAND\/\fR] [\fI\,ARGS\/\fR]...]
+.SH DESCRIPTION
+.PP
+MDT is a simple tool to aid in working with single board computers that the
+Mendel Linux distribution runs on. It consists of a whole bunch of pre-existing
+open source tooling, coupled with some simple wrappers written in python to ease
+their use.
+.PP
+It also provides an easy way to interact with these boards without having to
+fight with serial consoles, IP addresses, and other fiddly bits, reducing
+barrier to entry when working with these boards.
+.PP
+With minimal effort, MDT should also be portable to existing systems such as
+Debian and Ubuntu, if needed. This, however, is out of the scope of this
+project.
+.SH AUTHOR
+Written by June Tate-Gans.
+.SH "REPORTING BUGS"
+Contact AIY Projects support at <support-aiyprojects@google.com>
+.SH COPYRIGHT
+Copyright \(co 2018 Google, Inc.
+License Apache 2.0.
diff --git a/mdt.egg-info/PKG-INFO b/mdt.egg-info/PKG-INFO
new file mode 100644
index 0000000..6ad0099
--- /dev/null
+++ b/mdt.egg-info/PKG-INFO
@@ -0,0 +1,36 @@
+Metadata-Version: 1.1
+Name: mdt
+Version: 1.0
+Summary: A command-line tool to manage Mendel embedded systems
+Home-page: https://aiyprojects.googlesource.com/mdt.git
+Author: Mendel Linux Software Team
+Author-email: support-aiyprojects@google.com
+License: UNKNOWN
+Description-Content-Type: text/markdown
+Description: MDT - The Mendel Development Tool
+        =================================
+        
+        ## What is this?
+        
+        MDT is a simple tool to aid in working with single board computers that the
+        Mendel Linux distribution runs on. It consists of a whole bunch of pre-existing
+        open source tooling, coupled with some simple wrappers written in python to ease
+        their use.
+        
+        It also provides an easy way to interact with these boards without having to
+        fight with serial consoles, IP addresses, and other fiddly bits, reducing
+        barrier to entry when working with these boards.
+        
+        With minimal effort, MDT should also be portable to existing systems such as
+        Debian and Ubuntu, if needed. This, however, is out of the scope of this
+        project.
+        
+Keywords: embedded development
+Platform: UNKNOWN
+Classifier: Development Status :: 3 - Alpha
+Classifier: Intended Audience :: Developers
+Classifier: Topic :: Software Development
+Classifier: Topic :: Utilities
+Classifier: License :: OSI Approved :: Apache License
+Classifier: Operating System :: POSIX
+Classifier: Programming Language :: Python :: 3
diff --git a/mdt.egg-info/SOURCES.txt b/mdt.egg-info/SOURCES.txt
new file mode 100644
index 0000000..36f1046
--- /dev/null
+++ b/mdt.egg-info/SOURCES.txt
@@ -0,0 +1,14 @@
+MANIFEST.in
+README.md
+setup.py
+man/mdt.1
+mdt/__init__.py
+mdt/devices.py
+mdt/discoverer.py
+mdt/mdt.py
+mdt.egg-info/PKG-INFO
+mdt.egg-info/SOURCES.txt
+mdt.egg-info/dependency_links.txt
+mdt.egg-info/entry_points.txt
+mdt.egg-info/requires.txt
+mdt.egg-info/top_level.txt
\ No newline at end of file
diff --git a/mdt.egg-info/dependency_links.txt b/mdt.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/mdt.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/mdt.egg-info/entry_points.txt b/mdt.egg-info/entry_points.txt
new file mode 100644
index 0000000..f1c2c42
--- /dev/null
+++ b/mdt.egg-info/entry_points.txt
@@ -0,0 +1,3 @@
+[console_script]
+mdt = mdt:main
+
diff --git a/mdt.egg-info/requires.txt b/mdt.egg-info/requires.txt
new file mode 100644
index 0000000..fae72de
--- /dev/null
+++ b/mdt.egg-info/requires.txt
@@ -0,0 +1,2 @@
+spur
+zeroconf
diff --git a/mdt.egg-info/top_level.txt b/mdt.egg-info/top_level.txt
new file mode 100644
index 0000000..2226b15
--- /dev/null
+++ b/mdt.egg-info/top_level.txt
@@ -0,0 +1 @@
+mdt
diff --git a/setup.py b/setup.py
index 7ef364d..f4ccac0 100755
--- a/setup.py
+++ b/setup.py
@@ -17,26 +17,22 @@
     author='Mendel Linux Software Team',
     author_email='support-aiyprojects@google.com',
     classifiers = [
-        # 3 -> Alpha
-        # 4 -> Beta
-        # 5 -> Production/Stable
         'Development Status :: 3 - Alpha',
-
         'Intended Audience :: Developers',
         'Topic :: Software Development',
-
+        'Topic :: Utilities',
         'License :: OSI Approved :: Apache License',
-
+        'Operating System :: POSIX',
         'Programming Language :: Python :: 3',
     ],
     keywords='embedded development',
     packages=find_packages(exclude=['contrib', 'docs', 'tests']),
     install_requires=[
         'zeroconf',
-        'paramiko'
+        'spur'
     ],
+    data_files=[('share/man/man1', ['man/mdt.1'])],
     package_data={
-        'default_mendel_ssh_key', [ 'data/mendel_ssh_id', 'data/mendel_ssh_id.pub' ],
     },
     entry_points={
         'console_script': [