build: add defaults for PKG_SOURCE, PKG_SOURCE_SUBDIR, PKG_VERSION

This makes it easier to unify versioning of git based package downloads.
PKG_SOURCE_DATE along with an 8-character abbreviation of the git hash
is used as PKG_VERSION, PKG_RELEASE should be used like normal packages.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2016-12-21 16:39:56 +01:00
parent 24e58c3f72
commit ffb0181a87
4 changed files with 12 additions and 2 deletions

View File

@@ -55,6 +55,8 @@ __tr_template = $(__tr_head)$$(1)$(__tr_tail)
$(eval toupper = $(call __tr_template,$(chars_lower),$(chars_upper)))
$(eval tolower = $(call __tr_template,$(chars_upper),$(chars_lower)))
version_abbrev = $(if $(if $(CHECK),,$(DUMP)),$(1),$(shell printf '%.8s' $(1)))
_SINGLE=export MAKEFLAGS=$(space);
CFLAGS:=
ARCH:=$(subst i486,i386,$(subst i586,i386,$(subst i686,i386,$(call qstrip,$(CONFIG_ARCH)))))