diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 94187f9814..dab455c400 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -386,8 +386,6 @@ ifndef $(2)_VERSION $(2)_DL_VERSION := $$($(3)_DL_VERSION) else ifdef $(3)_VERSION $(2)_DL_VERSION := $$($(3)_VERSION) - else - $(2)_DL_VERSION = undefined endif else $(2)_DL_VERSION := $$(strip $$($(2)_VERSION)) @@ -398,8 +396,8 @@ ifdef $(3)_OVERRIDE_SRCDIR $(2)_OVERRIDE_SRCDIR ?= $$($(3)_OVERRIDE_SRCDIR) endif -$(2)_BASE_NAME = $(1)-$$($(2)_VERSION) -$(2)_RAW_BASE_NAME = $$($(2)_RAWNAME)-$$($(2)_VERSION) +$(2)_BASE_NAME = $$(if $$($(2)_VERSION),$(1)-$$($(2)_VERSION),$(1)) +$(2)_RAW_BASE_NAME = $$(if $$($(2)_VERSION),$$($(2)_RAWNAME)-$$($(2)_VERSION),$$($(2)_RAWNAME)) $(2)_DL_DIR = $$(DL_DIR)/$$($(2)_BASE_NAME) $(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME) @@ -429,7 +427,7 @@ endif ifndef $(2)_SOURCE ifdef $(3)_SOURCE $(2)_SOURCE = $$($(3)_SOURCE) - else + else ifdef $(2)_VERSION $(2)_SOURCE ?= $$($(2)_RAW_BASE_NAME).tar.gz endif endif