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:
@@ -9,6 +9,12 @@
|
||||
OPENWRT_GIT = http://git.openwrt.org
|
||||
LEDE_GIT = https://git.lede-project.org
|
||||
|
||||
ifdef PKG_SOURCE_VERSION
|
||||
PKG_VERSION ?= $(if $(PKG_SOURCE_DATE),$(PKG_SOURCE_DATE)-)$(call version_abbrev,$(PKG_SOURCE_VERSION))
|
||||
PKG_SOURCE_SUBDIR ?= $(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE ?= $(PKG_SOURCE_SUBDIR).tar.xz
|
||||
endif
|
||||
|
||||
DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)
|
||||
|
||||
# Try to guess the download method from the URL
|
||||
|
||||
Reference in New Issue
Block a user