summaryrefslogtreecommitdiff
path: root/version.make
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-09 00:35:55 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-09 00:35:55 -0700
commit312e4d37cc964bbc5bd4e20fd25500b08dc70268 (patch)
tree47df84785736864cbf0690bb7ed1dfb960477595 /version.make
parentd6b80d1b95ac566e7eb9b75389fb10ae8610dd6f (diff)
downloadtmwa-312e4d37cc964bbc5bd4e20fd25500b08dc70268.tar.gz
tmwa-312e4d37cc964bbc5bd4e20fd25500b08dc70268.tar.bz2
tmwa-312e4d37cc964bbc5bd4e20fd25500b08dc70268.tar.xz
tmwa-312e4d37cc964bbc5bd4e20fd25500b08dc70268.zip
Add @source command to help modified verions satisfy the AGPL
Diffstat (limited to 'version.make')
-rw-r--r--version.make39
1 files changed, 35 insertions, 4 deletions
diff --git a/version.make b/version.make
index 7ceea82..f7d5511 100644
--- a/version.make
+++ b/version.make
@@ -1,7 +1,11 @@
+# These lines are automatically replaced in tarballs generated by 'make dist'
VERSION_FULL := $(shell git --git-dir=${SRC_DIR}/.git describe --tags HEAD)
VERSION_HASH := $(shell git --git-dir=${SRC_DIR}/.git rev-parse HEAD)
version_bits := $(subst v, ,$(subst -, ,$(subst ., ,${VERSION_FULL})))
+# Note: these four numbers are limited to 255.
+# Currently, my tags are yy.mm.dd instead of semantic versioning.
+# The dev number is how many commits since the last tag.
VERSION_MAJOR := $(word 1,${version_bits})
VERSION_MINOR := $(word 2,${version_bits})
VERSION_PATCH := $(word 3,${version_bits})
@@ -9,8 +13,35 @@ VERSION_DEVEL := $(word 4,${version_bits})
ifeq "${VERSION_DEVEL}" ""
VERSION_DEVEL := 0
endif
-# tracking dirty trees is more trouble than it's worth
-#VERSION_FULL += $(shell cd ${SRC_DIR}; git diff --quiet HEAD || echo dirty)
-VENDOR := Vanilla
-VENDOR_VERSION := 0
+
+
+# Settings for those distributing modified versions.
+#
+# It is strongly recommended that all distributors set these,
+# but the only *requirement* is that modified versions that are run
+# (semi)publicly give VENDOR_SOURCE to satisfy section 13 of the AGPLv3.
+
+# TODO should these be passed to configure instead?
+
+# Vendor Name: String (no newlines, no parentheses)
+# This is usually one word, and does not (usually) change over time.
+# (Examples: Gentoo, Debian, Fedora, Ubuntu)
+VENDOR_NAME := Vanilla
+# Vendor Point: Integer (max value 65535)
+# This is intended to be the "packaging revision number", assuming that's
+# an integer. At a minimum, please try to make it nonzero if you have
+# any non-upstream patches (unconditionally nonzero is also okay).
+# (If your revision 0 package has patches ... please be nicer to upstream)
+VENDOR_POINT := 0
+# URL where the source may be found (after searching for version number).
+# See AGPLv3 section 13
+VENDOR_SOURCE := https://github.com/themanaworld/tmwa
+
+# Convenience
+VERSION_STRING := TMWA ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} dev${VERSION_DEVEL} +${VENDOR_POINT} (${VENDOR_NAME})
+
+version:
+ @echo version '${VERSION_STRING}'
+ @echo based on commit ${VERSION_FULL} aka ${VERSION_HASH}
+ @echo source ${VENDOR_SOURCE}