So far, version override was provided for BuildPackage but it was impossible to override kernel package versions this way. This overcomes that limitation and will provide this feature for this case as well, in a seamless manner.
Signed-off-by: Mathieu Olivari <[email protected]> --- include/package-version-override.mk | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/include/package-version-override.mk b/include/package-version-override.mk index b60115f..63a5132 100644 --- a/include/package-version-override.mk +++ b/include/package-version-override.mk @@ -13,14 +13,14 @@ endif # if includeded the package version can be overwritten within the .config file (instead of changing the package specific Makefile) define Package/$(PKG_NAME)/override_version menu "overwrite package version" - depends on PACKAGE_$(PKG_NAME) + depends on PACKAGE_$(1) config $(PKG_NAME)_USE_CUSTOM_VERSION - depends on PACKAGE_$(PKG_NAME) + depends on PACKAGE_$(1) bool "Use custom package version" default n config $(PKG_NAME)_CUSTOM_VERSION depends on $(PKG_NAME)_USE_CUSTOM_VERSION - string "$(PKG_BASE_NAME) version as string (default version: $(PKG_VERSION_ORGINAL))" + string "$(PKG_NAME) version as string (default version: $(PKG_VERSION_ORGINAL))" default "$(PKG_VERSION_ORGINAL)" endmenu endef @@ -35,9 +35,9 @@ endif # instead of using a source ball (eg tar.gz) the specified path will point to the location of the sources define Package/$(PKG_NAME)/override_source_path menu "custom source directory" - depends on PACKAGE_$(PKG_NAME) + depends on PACKAGE_$(1) config $(PKG_NAME)_USE_CUSTOM_SOURCE_DIR - depends on PACKAGE_$(PKG_NAME) + depends on PACKAGE_$(1) bool "Use custom source directory" default n config $(PKG_NAME)_CUSTOM_SOURCE_DIR @@ -51,8 +51,13 @@ endef # include both configurations as long this file is included before package.mk # in case that you're defining your own onfiguration within the package Makefile just include the stuff by yourself define Package/$(PKG_NAME)/config - $(call Package/$(PKG_NAME)/override_version) - $(call Package/$(PKG_NAME)/override_source_path) + $(call Package/$(PKG_NAME)/override_version,$(PKG_NAME)) + $(call Package/$(PKG_NAME)/override_source_path,$(PKG_NAME)) +endef + +define KernelPackage/$(PKG_NAME)/config + $(call Package/$(PKG_NAME)/override_version,kmod-$(PKG_NAME)) + $(call Package/$(PKG_NAME)/override_source_path,kmod-$(PKG_NAME)) endef # hook for custom source path -- 1.7.10.4 _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
