diff options
author | Jo-Philipp Wich <jo@mein.io> | 2016-04-06 21:55:44 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2016-04-06 21:55:44 +0200 |
commit | 5170393f8cae3c5acac61bd6ac6e127f9727cee4 (patch) | |
tree | 23f3c4ec47a47069da63dc97b15bb1d10f021776 /include/feeds.mk | |
parent | 941fc5e8c8fd48c31c97c9194d1bed786145f978 (diff) | |
download | upstream-5170393f8cae3c5acac61bd6ac6e127f9727cee4.tar.gz upstream-5170393f8cae3c5acac61bd6ac6e127f9727cee4.tar.bz2 upstream-5170393f8cae3c5acac61bd6ac6e127f9727cee4.zip |
include: choose package output directory based on repository info
Use the new repository metadata field to choose the output directory of the
final package archives.
Non-sharable packages will be placed in the per-target package directory
while the rest will be placed in a per-repository sub directory within the
$OUTPUT_DIR/packages/$CPU_TYPE/ prefix.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'include/feeds.mk')
-rw-r--r-- | include/feeds.mk | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/feeds.mk b/include/feeds.mk index 4f71b39940..ef7a09f4cd 100644 --- a/include/feeds.mk +++ b/include/feeds.mk @@ -1,5 +1,6 @@ # # 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. @@ -12,6 +13,16 @@ 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)) +PACKAGE_SUBDIRS=$(PACKAGE_DIR) +ifneq ($(CONFIG_PER_FEED_REPO),) + PACKAGE_SUBDIRS += $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES)/base + ifneq ($(CONFIG_PER_FEED_REPO_ADD_DISABLED),) + PACKAGE_SUBDIRS += $(foreach FEED,$(FEEDS_AVAILABLE),$(OUTPUT_DIR)/packages/$(ARCH_PACKAGES)/$(FEED)) + else + PACKAGE_SUBDIRS += $(foreach FEED,$(FEEDS_ENABLED),$(OUTPUT_DIR)/packages/$(ARCH_PACKAGES)/$(FEED)) + endif +endif + PKG_CONFIG_DEPENDS += \ CONFIG_PER_FEED_REPO \ CONFIG_PER_FEED_REPO_ADD_DISABLED \ @@ -19,9 +30,13 @@ PKG_CONFIG_DEPENDS += \ $(foreach feed,$(FEEDS_INSTALLED),CONFIG_FEED_$(feed)) # 1: package name +# 2: flags +# 3: section define FeedPackageDir $(strip $(if $(CONFIG_PER_FEED_REPO), \ - $(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/subdir),$(Package/$(1)/subdir),base)), \ + $(if $(Package/$(1)/subdir), \ + $(abspath $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES)/$(Package/$(1)/subdir)), \ + $(PACKAGE_DIR)), \ $(PACKAGE_DIR))) endef |