-DESCRIPTION="A daemon monitoring XInput events"
-HOMEPAGE="https://bitbucket.org/andrew_shadura/inputplug/overview"
-SRC_URI="http://bitbucket.org/andrew_shadura/inputplug/get/tip.tar.bz2 -> ${P}.tar.bz2"
+DESCRIPTION="XInput event monitor daemon"
+HOMEPAGE="https://github.com/andrewshadura/inputplug"
+
+if [ "${PV}" == "9999" ]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/andrewshadura/${PN}"
+else
+ SRC_URI="https://github.com/andrewshadura/${PN}/archive/${PV}.tar.gz"
+fi