build: introduce per feed repository support
[openwrt/svn-archive/archive.git] / target / imagebuilder / files / Makefile
index 4d0f1fe1159124c44266579ba5dc590a846e9216..222dac43cc84d95326095c6289f0973cb9005216 100644 (file)
@@ -126,23 +126,15 @@ package_index: FORCE
 package_install: FORCE
        @echo
        @echo Installing packages...
-       $(OPKG) install $(PACKAGE_DIR)/libc_*.ipk
-       $(OPKG) install $(PACKAGE_DIR)/kernel_*.ipk
+       $(OPKG) install $(firstword $(wildcard $(PACKAGE_DIR)/libc_*.ipk $(PACKAGE_DIR)/base/libc_*.ipk))
+       $(OPKG) install $(firstword $(wildcard $(PACKAGE_DIR)/kernel_*.ipk $(PACKAGE_DIR)/base/kernel_*.ipk))
        $(OPKG) install $(BUILD_PACKAGES)
        rm -f $(TARGET_DIR)/usr/lib/opkg/lists/*
 
 copy_files: FORCE
        @echo
        @echo Copying extra files
-       @( cd $(USER_FILES); find -type f ) | \
-               ( cd $(TARGET_DIR); while :; do \
-                       read FILE; \
-                       [ -z "$$FILE" ] && break; \
-                       [ -L "$$FILE" ] || continue; \
-                       echo "Removing symlink $(TARGET_DIR)/$$FILE"; \
-                       rm -f "$$FILE"; \
-               done; )
-       $(CP) $(USER_FILES)/* $(TARGET_DIR)/
+       @$(call file_copy,$(USER_FILES)/*,$(TARGET_DIR)/)
 
 package_postinst: FORCE
        @echo