build: rework opkg command invocation
Drop included $(XARGS), add support for passing target dir via parameter Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
37e82e4e42
commit
5d30bf8303
2 changed files with 11 additions and 6 deletions
|
@ -34,11 +34,11 @@ ifdef CONFIG_USE_MKLIBS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# where to build (and put) .ipk packages
|
# where to build (and put) .ipk packages
|
||||||
OPKG:= \
|
opkg = \
|
||||||
IPKG_NO_SCRIPT=1 \
|
IPKG_NO_SCRIPT=1 \
|
||||||
IPKG_INSTROOT=$(TARGET_DIR) \
|
IPKG_INSTROOT=$(1) \
|
||||||
$(XARGS) $(STAGING_DIR_HOST)/bin/opkg \
|
$(STAGING_DIR_HOST)/bin/opkg \
|
||||||
--offline-root $(TARGET_DIR) \
|
--offline-root $(1) \
|
||||||
--force-depends \
|
--force-depends \
|
||||||
--force-overwrite \
|
--force-overwrite \
|
||||||
--force-postinstall \
|
--force-postinstall \
|
||||||
|
|
|
@ -48,11 +48,16 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install
|
||||||
- find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755
|
- find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755
|
||||||
rm -rf $(TARGET_DIR)
|
rm -rf $(TARGET_DIR)
|
||||||
[ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp
|
[ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp
|
||||||
@echo $(wildcard $(foreach dir,$(PACKAGE_SUBDIRS),$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(dir)/$(pkg)_*.ipk))) | $(OPKG) install
|
$(call opkg,$(TARGET_DIR)) install \
|
||||||
|
$(wildcard \
|
||||||
|
$(foreach dir,$(PACKAGE_SUBDIRS), \
|
||||||
|
$(foreach pkg, \
|
||||||
|
$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null), \
|
||||||
|
$(dir)/$(pkg)_*.ipk)))
|
||||||
@for file in $(PACKAGE_INSTALL_FILES); do \
|
@for file in $(PACKAGE_INSTALL_FILES); do \
|
||||||
[ -s $$file.flags ] || continue; \
|
[ -s $$file.flags ] || continue; \
|
||||||
for flag in `cat $$file.flags`; do \
|
for flag in `cat $$file.flags`; do \
|
||||||
$(OPKG) flag $$flag < $$file; \
|
$(call opkg,$(TARGET_DIR)) flag $$flag `cat $$file`; \
|
||||||
done; \
|
done; \
|
||||||
done || true
|
done || true
|
||||||
@-$(MAKE) package/preconfig
|
@-$(MAKE) package/preconfig
|
||||||
|
|
Loading…
Reference in a new issue