X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=include%2Ffeeds.mk;h=4f71b399408fa2e27fa63ef83ca00185e4d2e7fe;hb=0368a41c49ee191efbfa643257f7953b7dac667c;hp=17ce64f83a400fca8639f68476541c5e459b519f;hpb=8b80b0b7293084944e7c93a7df71a1e41b7ae6f6;p=openwrt-working-2016%2F.git diff --git a/include/feeds.mk b/include/feeds.mk index 17ce64f83a..4f71b39940 100644 --- a/include/feeds.mk +++ b/include/feeds.mk @@ -5,19 +5,35 @@ # See /LICENSE for more information. # --include $(TMP_DIR)/.packagefeeds +-include $(TMP_DIR)/.packagesubdirs FEEDS_AVAILABLE:=$(shell $(SCRIPT_DIR)/feeds list -n) -FEEDS_INSTALLED:=$(patsubst %.index,%,$(notdir $(wildcard $(TOPDIR)/feeds/*.index))) +FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*)) FEEDS_ENABLED:=$(foreach feed,$(FEEDS_INSTALLED),$(if $(CONFIG_FEED_$(feed)),$(feed))) +FEEDS_DISABLED:=$(filter-out $(FEEDS_ENABLED),$(FEEDS_AVAILABLE)) PKG_CONFIG_DEPENDS += \ CONFIG_PER_FEED_REPO \ + CONFIG_PER_FEED_REPO_ADD_DISABLED \ + CONFIG_PER_FEED_REPO_ADD_COMMENTED \ $(foreach feed,$(FEEDS_INSTALLED),CONFIG_FEED_$(feed)) # 1: package name define FeedPackageDir $(strip $(if $(CONFIG_PER_FEED_REPO), \ - $(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/feed),$(Package/$(1)/feed),base)), \ + $(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/subdir),$(Package/$(1)/subdir),base)), \ $(PACKAGE_DIR))) endef + +# 1: destination file +define FeedSourcesAppend +( \ + $(strip $(if $(CONFIG_PER_FEED_REPO), \ + $(foreach feed,base kernel $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \ + $(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \ + $(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/$(feed)";)) \ + , \ + echo "src/gz %n %U"; \ + )) \ +) >> $(1) +endef