X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=include%2Ffeeds.mk;h=632fecb4a3aaece1cada2b8d2ae089c85dc2d1a6;hb=044ca149f36a08f56fe827a20aa113837c58cb40;hp=c9ffa95a368a72fd43a7e688b7ee1b274ade2916;hpb=9af22f1ac9122b54700dd38f627fdd446e1109f4;p=openwrt%2Fopenwrt.git diff --git a/include/feeds.mk b/include/feeds.mk index c9ffa95a36..632fecb4a3 100644 --- a/include/feeds.mk +++ b/include/feeds.mk @@ -1,17 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2014 OpenWrt.org # Copyright (C) 2016 LEDE Project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# --include $(TMP_DIR)/.packagesubdirs +-include $(TMP_DIR)/.packageauxvars FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*)) -FEEDS_AVAILABLE:=$(sort $(FEEDS_INSTALLED) $(shell $(SCRIPT_DIR)/feeds list -n)) -FEEDS_ENABLED:=$(foreach feed,$(FEEDS_AVAILABLE),$(if $(CONFIG_FEED_$(feed)),$(feed))) -FEEDS_DISABLED:=$(filter-out $(FEEDS_ENABLED),$(FEEDS_AVAILABLE)) +FEEDS_AVAILABLE:=$(sort $(FEEDS_INSTALLED) $(shell $(SCRIPT_DIR)/feeds list -n 2>/dev/null)) PACKAGE_SUBDIRS=$(PACKAGE_DIR) ifneq ($(CONFIG_PER_FEED_REPO),) @@ -35,10 +30,24 @@ endef # 1: destination file define FeedSourcesAppend ( \ - echo "src/gz %d_core %U/targets/%S/packages"; \ + echo 'src/gz %d_core %U/targets/%S/packages'; \ $(strip $(if $(CONFIG_PER_FEED_REPO), \ - $(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %d_$(feed) %U/packages/%A/$(feed)";) \ - $(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \ - $(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %d_$(feed) %U/packages/%A/$(feed)";)))) \ + echo 'src/gz %d_base %U/packages/%A/base'; \ + $(if $(filter %SNAPSHOT-y,$(VERSION_NUMBER)-$(CONFIG_BUILDBOT)), \ + echo 'src/gz %d_kmods %U/targets/%S/kmods/$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)';) \ + $(foreach feed,$(FEEDS_AVAILABLE), \ + $(if $(CONFIG_FEED_$(feed)), \ + echo '$(if $(filter m,$(CONFIG_FEED_$(feed))),# )src/gz %d_$(feed) %U/packages/%A/$(feed)';)))) \ ) >> $(1) endef + +# 1: package name +define GetABISuffix +$(if $(ABIV_$(1)),$(ABIV_$(1)),$(call FormatABISuffix,$(1),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v))))) +endef + +# 1: package name +# 2: abi version +define FormatABISuffix +$(if $(filter-out kmod-%,$(1)),$(if $(2),$(if $(filter %0 %1 %2 %3 %4 %5 %6 %7 %8 %9,$(1)),-)$(2))) +endef