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 /package | |
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 'package')
-rw-r--r-- | package/Makefile | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/package/Makefile b/package/Makefile index e0bd75ba7f..c8f12d8a44 100644 --- a/package/Makefile +++ b/package/Makefile @@ -98,7 +98,7 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install - find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755 rm -rf $(TARGET_DIR) [ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp - @$(FIND) `sed -e 's|.*|$(PACKAGE_DIR)$(if $(CONFIG_PER_FEED_REPO),/*)/&_*.ipk|' $(PACKAGE_INSTALL_FILES)` | sort -u | $(OPKG) install + @echo $(wildcard $(foreach dir,$(PACKAGE_SUBDIRS),$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(dir)/$(pkg)_*.ipk))) | $(OPKG) install @for file in $(PACKAGE_INSTALL_FILES); do \ [ -s $$file.flags ] || continue; \ for flag in `cat $$file.flags`; do \ @@ -139,28 +139,19 @@ ifndef CONFIG_OPKGSMIME_PASSPHRASE endif endif -PACKAGE_SUBDIRS=. -ifneq ($(CONFIG_PER_FEED_REPO),) - ifneq ($(CONFIG_PER_FEED_REPO_ADD_DISABLED),) - PACKAGE_SUBDIRS=base kernel $(FEEDS_AVAILABLE) - else - PACKAGE_SUBDIRS=base kernel $(FEEDS_ENABLED) - endif -endif - $(curdir)/index: FORCE @echo Generating package index... @for d in $(PACKAGE_SUBDIRS); do ( \ - mkdir -p $(PACKAGE_DIR)/$$d; \ - cd $(PACKAGE_DIR)/$$d || continue; \ + mkdir -p $$d; \ + cd $$d || continue; \ $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages && \ gzip -9nc Packages > Packages.gz; \ ); done ifdef CONFIG_SIGNED_PACKAGES @echo Signing package index... @for d in $(PACKAGE_SUBDIRS); do ( \ - [ -d $(PACKAGE_DIR)/$$d ] && \ - cd $(PACKAGE_DIR)/$$d || continue; \ + [ -d $$d ] && \ + cd $$d || continue; \ $(STAGING_DIR_HOST)/bin/usign -S -m Packages -s $(BUILD_KEY); \ ); done else @@ -172,8 +163,8 @@ ifeq ($(call qstrip,$(CONFIG_OPKGSMIME_CERT)),) else @echo Signing package index... @for d in $(PACKAGE_SUBDIRS); do ( \ - [ -d $(PACKAGE_DIR)/$$d ] && \ - cd $(PACKAGE_DIR)/$$d || continue; \ + [ -d $$d ] && \ + cd $$d || continue; \ openssl smime -binary -in Packages.gz \ -out Packages.sig -outform PEM -sign \ -signer $(CONFIG_OPKGSMIME_CERT) \ |