From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Sun, 5 Mar 2017 08:19:46 +0000 (+0800)
Subject: build: ipkg: new field Alternatives
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=73bc636aba3ec0c6381605d1f11088955101975a;p=openwrt%2Fstaging%2Fblocktrron.git

build: ipkg: new field Alternatives

It's a list of specs of the following form seprated by commas to
describe alternatives provided by this package

    <prio>:<path>:<altpath>

<path> will be a symbolic link to <altpath> of the highest <prio>

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
---

diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index 620be991b3..bf508fb493 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -159,6 +159,7 @@ Version: $(VERSION)
 $$(call addfield,Depends,$$(Package/$(1)/DEPENDS)
 )$$(call addfield,Conflicts,$$(call mergelist,$(CONFLICTS))
 )$$(call addfield,Provides,$$(call mergelist,$(PROVIDES))
+)$$(call addfield,Alternatives,$$(call mergelist,$(ALTERNATIVES))
 )$$(call addfield,Source,$(SOURCE)
 )$$(call addfield,License,$$(PKG_LICENSE)
 )$$(call addfield,LicenseFiles,$$(PKG_LICENSE_FILES)