2 # Copyright (C) 2014 OpenWrt.org
3 # Copyright (C) 2016 LEDE Project
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 -include $(TMP_DIR)/.packageauxvars
11 FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*))
12 FEEDS_AVAILABLE:=$(sort $(FEEDS_INSTALLED) $(shell $(SCRIPT_DIR)/feeds list -n 2>/dev/null))
14 PACKAGE_SUBDIRS=$(PACKAGE_DIR)
15 ifneq ($(CONFIG_PER_FEED_REPO),)
16 PACKAGE_SUBDIRS += $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES)/base
17 PACKAGE_SUBDIRS += $(foreach FEED,$(FEEDS_AVAILABLE),$(OUTPUT_DIR)/packages/$(ARCH_PACKAGES)/$(FEED))
20 opkg_package_files = $(wildcard \
21 $(foreach dir,$(PACKAGE_SUBDIRS), \
22 $(foreach pkg,$(1), $(dir)/$(pkg)_*.ipk)))
26 $(strip $(if $(CONFIG_PER_FEED_REPO), \
27 $(if $(Package/$(1)/subdir), \
28 $(abspath $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES)/$(Package/$(1)/subdir)), \
34 define FeedSourcesAppend
36 echo 'src/gz %d_core %U/targets/%S/packages'; \
37 $(strip $(if $(CONFIG_PER_FEED_REPO), \
38 echo 'src/gz %d_base %U/packages/%A/base'; \
39 $(foreach feed,$(FEEDS_AVAILABLE), \
40 $(if $(CONFIG_FEED_$(feed)), \
41 echo '$(if $(filter m,$(CONFIG_FEED_$(feed))),# )src/gz %d_$(feed) %U/packages/%A/$(feed)';)))) \
47 $(if $(filter-out kmod-%,$(1)),$(if $(Package/$(1)/abiversion),$(if $(filter %0 %1 %2 %3 %4 %5 %6 %7 %8 %9,$(1)),-)$(Package/$(1)/abiversion)))