build: include version files into the release tarball

Change-Id: I818b645737bed35495cb4bad35667b369fd5ea6c
diff --git a/Makefile.am b/Makefile.am
index 7b2198c..aee0d9d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,12 +43,20 @@
 	doc \
 	$(NULL)
 
+BUILT_SOURCES = $(top_srcdir)/.version
+$(top_srcdir)/.version:
+	echo $(VERSION) > $@-t && mv $@-t $@
+dist-hook:
+	echo $(VERSION) > $(distdir)/.tarball-version
+
 EXTRA_DIST = \
+	.version \
 	LEGAL \
 	COPYING \
 	README.md \
 	contrib/osmo-trx.spec.in \
 	debian \
+	git-version-gen \
 	$(NULL)
 
 AM_DISTCHECK_CONFIGURE_FLAGS = \