We often play around with different package versions.
To make it more generic you can include the package-version-override.mk just 
before package.mk within the acc. package Makefile.
The new package version will stored within the .config files. This allows to 
control our regression tests by exchanging the
.config file rather then changing the make files of the buildsystem.

Signed-off-by: ralph <[EMAIL PROTECTED]>

---

Index: include/package-version-override.mk
===================================================================
--- include/package-version-override.mk (revision 0)
+++ include/package-version-override.mk (revision 0)
@@ -0,0 +1,22 @@
+
+PKG_VERSION_ORGINAL:=$(PKG_VERSION)
+
+ifeq ($(CONFIG_$(PKG_NAME)_USE_OTHER_VERSION),y)
+PKG_VERSION:= $(strip $(subst ",, $(CONFIG_$(PKG_NAME)_OTHER_VERSION)))
+PKG_MD5SUM:=
+PKG_SOURCE:=$(subst $(PKG_VERSION_ORGINAL),$(PKG_VERSION),$(PKG_SOURCE))
+endif
+
+define Package/$(PKG_NAME)/config
+       menu "overwrite package version"
+               depends on PACKAGE_$(PKG_NAME)
+               config $(PKG_NAME)_USE_OTHER_VERSION
+                       depends on PACKAGE_$(PKG_NAME)
+                       bool "Use other source version"
+                       default n
+               config $(PKG_NAME)_OTHER_VERSION
+                       depends on $(PKG_NAME)_USE_OTHER_VERSION
+                       string "$(PKG_BASE_NAME) version as string (default 
version: $(PKG_VERSION_ORGINAL))"
+                       default "$(PKG_VERSION_ORGINAL)"
+       endmenu
+endef
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to