aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/download.mk6
-rw-r--r--include/host-build.mk3
-rw-r--r--include/package.mk3
3 files changed, 10 insertions, 2 deletions
diff --git a/include/download.mk b/include/download.mk
index 63ded7ebcd..09b929bd77 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -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
diff --git a/include/host-build.mk b/include/host-build.mk
index e11e3edd09..f6ca3ff21e 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -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
diff --git a/include/package.mk b/include/package.mk
index f51232f503..41401ddefb 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -9,6 +9,8 @@ __package_mk:=1
all: $(if $(DUMP),dumpinfo,$(if $(CHECK),check,compile))
+include $(INCLUDE_DIR)/download.mk
+
PKG_BUILD_DIR ?= $(BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
PKG_BUILD_PARALLEL ?=
@@ -92,7 +94,6 @@ endif
PKG_INSTALL_STAMP:=$(PKG_INFO_DIR)/$(PKG_DIR_NAME).$(if $(BUILD_VARIANT),$(BUILD_VARIANT),default).install
-include $(INCLUDE_DIR)/download.mk
include $(INCLUDE_DIR)/quilt.mk
include $(INCLUDE_DIR)/package-defaults.mk
include $(INCLUDE_DIR)/package-dumpinfo.mk