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 | |
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')
-rw-r--r-- | include/feeds.mk | 17 | ||||
-rw-r--r-- | include/package-ipkg.mk | 2 | ||||
-rw-r--r-- | include/package.mk | 2 |
3 files changed, 18 insertions, 3 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 diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index eb4c874047..a86f401805 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -88,7 +88,7 @@ _endef=endef ifeq ($(DUMP),) define BuildTarget/ipkg - PDIR_$(1):=$(call FeedPackageDir,$(1)) + PDIR_$(1):=$(call FeedPackageDir,$(1),$(PKG_FLAGS),$(SECTION)) IPKG_$(1):=$$(PDIR_$(1))/$(1)_$(VERSION)_$(PKGARCH).ipk IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1) KEEP_$(1):=$(strip $(call Package/$(1)/conffiles)) diff --git a/include/package.mk b/include/package.mk index ca315b59ac..ff9a5df9e6 100644 --- a/include/package.mk +++ b/include/package.mk @@ -294,7 +294,7 @@ Build/DistCheck=$(call Build/DistCheck/Default,) prepare-package-install: @mkdir -p $(PKG_INFO_DIR) @touch $(PKG_INSTALL_STAMP).clean - @echo "$(filter-out essential,$(PKG_FLAGS))" > $(PKG_INSTALL_STAMP).flags + @echo "$(filter-out essential nonshared,$(PKG_FLAGS))" > $(PKG_INSTALL_STAMP).flags $(PACKAGE_DIR): mkdir -p $@ |