aboutsummaryrefslogtreecommitdiffstats
path: root/target/imagebuilder/Makefile
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-05-27 11:22:20 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-05-27 11:22:20 +0000
commit841bf546abcdc001a5d75e2d3a39b120e516137f (patch)
tree226cccd3d866371495239bf5476f35b3f5a625d2 /target/imagebuilder/Makefile
parentaf3ff424675ac28c33aab4e7317b6f93814461e8 (diff)
downloadmaster-187ad058-841bf546abcdc001a5d75e2d3a39b120e516137f.tar.gz
master-187ad058-841bf546abcdc001a5d75e2d3a39b120e516137f.tar.bz2
master-187ad058-841bf546abcdc001a5d75e2d3a39b120e516137f.zip
IB: use online repositories
Change the IB packaging to only embed libc, kernel and kmod packages by default and generate repositories.conf to refer to the remote package repositories. Introduce a new config option CONFIG_IB_STANDALONE which restores the old behaviour of building self contained IB archives. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45772 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/imagebuilder/Makefile')
-rw-r--r--target/imagebuilder/Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index 1f97cb8613..218def7e1d 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -9,6 +9,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/host.mk
include $(INCLUDE_DIR)/version.mk
+include $(INCLUDE_DIR)/feeds.mk
override MAKEFLAGS=
@@ -33,8 +34,38 @@ $(BIN_DIR)/$(IB_NAME).tar.bz2: clean
$(TMP_DIR)/.targetinfo \
$(TMP_DIR)/.packageinfo \
$(PKG_BUILD_DIR)/
+
+ifeq ($(CONFIG_IB_STANDALONE),)
+ echo '## Remote package repositories' >> $(PKG_BUILD_DIR)/repositories.conf
+ ifeq ($(CONFIG_PER_FEED_REPO),)
+ echo "src/gz %n %U" >> $(PKG_BUILD_DIR)/repositories.conf
+ else
+ for d in base $(FEEDS_ENABLED); do \
+ echo "src/gz %n_$$d %U/$$d" >> $(PKG_BUILD_DIR)/repositories.conf; \
+ done
+ ifneq ($(CONFIG_PER_FEED_REPO_ADD_DISABLED),)
+ for d in $(FEEDS_DISABLED); do \
+ echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$$d %U/$$d" >> $(PKG_BUILD_DIR)/repositories.conf; \
+ done
+ endif
+ endif
+endif
+
+ echo '## This is the local package repository, do not remove!' >> $(PKG_BUILD_DIR)/repositories.conf
+ echo 'src imagebuilder file:packages' >> $(PKG_BUILD_DIR)/repositories.conf
+
$(VERSION_SED) $(PKG_BUILD_DIR)/repositories.conf
+
+ifeq ($(CONFIG_IB_STANDALONE),)
+ (cd $(PACKAGE_DIR); $(FIND) -type f -name 'libc_*.ipk' -or -name 'kernel_*.ipk' -or -name 'kmod-*.ipk') | \
+ while read path; do \
+ mkdir -p "$(PKG_BUILD_DIR)/packages/$${path%/*}"; \
+ cp "$(PACKAGE_DIR)/$$path" "$(PKG_BUILD_DIR)/packages/$$path"; \
+ done
+else
$(CP) $(PACKAGE_DIR) $(PKG_BUILD_DIR)/packages
+endif
+
$(CP) $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/
if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \
$(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \