$(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/feed),$(Package/$(1)/feed),base)), \
$(PACKAGE_DIR)))
endef
+
+# 1: destination file
+define FeedSourcesAppend
+( \
+ $(strip $(if $(CONFIG_PER_FEED_REPO), \
+ $(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \
+ $(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \
+ $(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/$(feed)";)) \
+ , \
+ echo "src/gz %n %U"; \
+ )) \
+) >> $(1)
+endef
ifneq ($(CONFIG_SIGNED_PACKAGES),)
echo "option check_signature 1" >> $(1)/etc/opkg.conf
endif
- ifeq ($(CONFIG_PER_FEED_REPO),)
- echo "src/gz %n %U" >> $(1)/etc/opkg.conf
- else
- for d in base $(FEEDS_ENABLED); do \
- echo "src/gz %n_$$$$d %U/$$$$d" >> $(1)/etc/opkg.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" >> $(1)/etc/opkg.conf; \
- done
- endif
- endif
+ $(call FeedSourcesAppend,$(1)/etc/opkg.conf)
$(VERSION_SED) $(1)/etc/opkg.conf
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg
endef
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
+ $(call FeedSourcesAppend,$(PKG_BUILD_DIR)/repositories.conf)
endif
+ echo '' >> $(PKG_BUILD_DIR)/repositories.conf
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