feeds.mk 829 B

1234567891011121314151617181920212223242526
  1. #
  2. # Copyright (C) 2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. -include $(TMP_DIR)/.packagefeeds
  8. FEEDS_AVAILABLE:=$(shell $(SCRIPT_DIR)/feeds list -n)
  9. FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*))
  10. FEEDS_ENABLED:=$(foreach feed,$(FEEDS_INSTALLED),$(if $(CONFIG_FEED_$(feed)),$(feed)))
  11. FEEDS_DISABLED:=$(filter-out $(FEEDS_ENABLED),$(FEEDS_AVAILABLE))
  12. PKG_CONFIG_DEPENDS += \
  13. CONFIG_PER_FEED_REPO \
  14. CONFIG_PER_FEED_REPO_ADD_DISABLED \
  15. CONFIG_PER_FEED_REPO_ADD_COMMENTED \
  16. $(foreach feed,$(FEEDS_INSTALLED),CONFIG_FEED_$(feed))
  17. # 1: package name
  18. define FeedPackageDir
  19. $(strip $(if $(CONFIG_PER_FEED_REPO), \
  20. $(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/feed),$(Package/$(1)/feed),base)), \
  21. $(PACKAGE_DIR)))
  22. endef