diff --git a/Makefile b/Makefile
index 83d599c2314ebe3379395318aa622379ae3db27a..e13005c67b1bbaf09d3f4d9da7b8296290c674d8 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,24 @@ build/release-stamp:
 	@echo "Fixing version string..."
 	@sed -i "s/__version__ = .*/__version__ = '${VERSION}'/g" \
 		build/${PKGNAME}-${VERSION}/${NAME}/__init__.py
+	@echo "Generating debian changelog..."
+	@( \
+		version=${VERSION}; \
+		author=$$(git show HEAD --format="format:%an <%ae>" -s); \
+		date=$$(git show HEAD --format="format:%aD" -s); \
+		day=$$(git show HEAD --format='format:%ai' -s \
+			| awk '{print $$1}' \
+			| awk -F '-' '{print $$3}' | sed 's/^0/ /g'); \
+		date=$$(echo $${date} \
+			| awk '{print $$1, "'"$${day}"'", $$3, $$4, $$5, $$6}'); \
+		hash=$$(git show HEAD --format="format:%H" -s); \
+		echo "${PKGNAME} ($${version}) unstable; urgency=low"; \
+		echo; \
+		echo "  * Generated from git commit $${hash}."; \
+		echo; \
+		echo " -- $${author}  $${date}"; \
+		echo; \
+	) > build/${PKGNAME}-${VERSION}/debian/changelog
 	@find build/${PKGNAME}-${VERSION}/ -exec \
 		touch -t $$(date -d @$$(git show -s --format="format:%at") \
 			+"%Y%m%d%H%M.%S") {} \;
@@ -50,3 +68,13 @@ build/release-stamp:
 	@echo "Generated release tarball:"
 	@echo "    $$(ls dist/${PKGNAME}-${VERSION}.tar.gz)"
 	@touch build/release-stamp
+
+deb: release build/deb-stamp
+build/deb-stamp:
+	@echo "Building debian packages..."
+	@cd build/${PKGNAME}-${VERSION}; \
+		dpkg-buildpackage -rfakeroot -us -uc
+	@mv build/*_${VERSION}_*.deb dist/
+	@echo "Generated debian packages:"
+	@for pkg in $$(ls dist/*_${VERSION}_*.deb); do echo "  $${pkg}"; done
+	@touch build/deb-stamp
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000000000000000000000000000000000000..ec635144f60048986bc560c5576355344005e6e7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000000000000000000000000000000000000..d8eaa3bab9fc4ec5578998e1de0124ff71dfe355
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,14 @@
+Source: nvmetcli
+Section: python
+Priority: optional
+Maintainer: Christoph Hellwig <hch@lst.de>
+Build-Depends: debhelper(>= 8), python, python-setuptools, dh-python
+Standards-Version: 3.9.4
+
+Package: nvmetcli
+Architecture: all
+Depends: ${misc:Depends}, ${python:Depends}, python-configshell-fb, python-kmodpy
+Description: Command line interface for the kernel NVMe target
+ This package contains the command line interface to the NVMe over Fabrics
+ target in the Linux kernel.  It allows configuring the target interactively
+ as well as saving / restoring the configuration to / from a json file.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000000000000000000000000000000000000..037d34324e6b3d30083004f53aab96dc4d77e3a1
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,22 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: nvmetcli
+
+Files: *
+ Copyright (c) 2011-2013 by Datera, Inc.
+ Copyright (c) 2011-2014 by Red Hat, Inc.
+ Copyright (c) 2016 by HGST, a Western Digital Company.
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License"); you may
+ not use this file except in compliance with the License. You may obtain
+ a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ License for the specific language governing permissions and limitations
+ under the License.
+
+ The full text of the license can be found in
+ '/usr/share/common-licenses/Apache-2.0'.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000000000000000000000000000000000000..f2800fbbd7d246a3b243586130c67b52259e31aa
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1 @@
+/etc/nvmet
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000000000000000000000000000000000000..e845566c06f9bf557d35e8292c37cf05d97a9769
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000000000000000000000000000000000000..33bc6932384313f926ac5f68af8699774105975a
--- /dev/null
+++ b/debian/install
@@ -0,0 +1 @@
+nvmetcli		/usr/sbin
diff --git a/debian/nvmetcli.examples b/debian/nvmetcli.examples
new file mode 100644
index 0000000000000000000000000000000000000000..966124f2ec58c7083f92aa0772b6b13f4ba4a03c
--- /dev/null
+++ b/debian/nvmetcli.examples
@@ -0,0 +1,2 @@
+loop.json
+rdma.json
diff --git a/debian/pyversions b/debian/pyversions
new file mode 100644
index 0000000000000000000000000000000000000000..3ad2293ef13a873d206999863621193b3fb89d6c
--- /dev/null
+++ b/debian/pyversions
@@ -0,0 +1 @@
+2.7-
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000000000000000000000000000000000000..c21e5a2f8fff8fb2c82211ba86e7bf48431d107a
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,22 @@
+#!/usr/bin/make -f
+
+build_dir   = build
+install_dir = $(CURDIR)/debian/nvmetcli
+
+# prevent internet access / don't use PyPi
+export http_proxy = http://127.0.0.1:9
+
+
+%:
+	dh $@ --with python2
+
+override_dh_auto_build:
+	python setup.py build
+
+override_dh_auto_install:
+	python setup.py install --root=$(install_dir) --install-layout=deb
+
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -rf build
+	rm -rf *.egg-info