added dist target to hubdns

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Explicit paths specified without -i nor -o; assuming --only paths...
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	modified:   Makefile
#
diff --git a/Makefile b/Makefile
index ed1e3f4..a164e9f 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ name=
 prefix = /usr/local
 PATH_BIN = $(prefix)/bin
 PATH_INSTALL_LIB = $(prefix)/lib/$(progname)
+PATH_DIST := $(progname)-$$(autoversion HEAD)
 
 all: help
 
@@ -12,6 +13,15 @@ debug:
 	$(foreach v, $V, $(warning $v = $($v)))
 	@true
 
+dist:
+	-mkdir -p $(PATH_DIST)
+
+	cp -a .git $(PATH_DIST)
+	cd $(PATH_DIST) && git-checkout --force HEAD
+
+	tar jcvf $(PATH_DIST).tar.bz2 $(PATH_DIST)
+	rm -rf $(PATH_DIST)
+
 help:
 	@echo '=== Targets:'
 	@echo 'install   [ prefix=path/to/usr ] # default: prefix=$(value prefix)'
