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

@ -5,6 +5,8 @@
# See /LICENSE for more information.
#
include $(INCLUDE_DIR)/download.mk
HOST_BUILD_DIR ?= $(BUILD_DIR_HOST)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
HOST_INSTALL_DIR ?= $(HOST_BUILD_DIR)/host-install
HOST_BUILD_PARALLEL ?=
@ -35,7 +37,6 @@ HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.$(PKG_NAME)_installed
override MAKEFLAGS=
include $(INCLUDE_DIR)/download.mk
include $(INCLUDE_DIR)/quilt.mk
include $(INCLUDE_DIR)/autotools.mk