build: add template for getting opkg package files from package names

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau 2016-07-22 12:22:16 +02:00
parent 5d30bf8303
commit 731b166528
2 changed files with 4 additions and 5 deletions

View File

@ -47,6 +47,9 @@ opkg = \
--add-arch all:100 \ --add-arch all:100 \
--add-arch $(if $(ARCH_PACKAGES),$(ARCH_PACKAGES),$(BOARD)):200 --add-arch $(if $(ARCH_PACKAGES),$(ARCH_PACKAGES),$(BOARD)):200
opkg_package_files = $(wildcard \
$(foreach dir,$(PACKAGE_SUBDIRS), \
$(foreach pkg,$(1), $(dir)/$(pkg)_*.ipk)))
define prepare_rootfs define prepare_rootfs
@if [ -d $(TOPDIR)/files ]; then \ @if [ -d $(TOPDIR)/files ]; then \

View File

@ -49,11 +49,7 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install
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
$(call opkg,$(TARGET_DIR)) install \ $(call opkg,$(TARGET_DIR)) install \
$(wildcard \ $(call opkg_package_files,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null))
$(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 \