From ace825551c2dc07a621149451f987a1baf92b9da Mon Sep 17 00:00:00 2001
From: Jo-Philipp Wich <jow@openwrt.org>
Date: Thu, 28 May 2015 09:47:37 +0000
Subject: feeds: use common macro "FeedSourcesAppend" to populate opkg
 configurations

This introduces a common macro to assemble the correct url templates to
avoid code duplication and have the feed config handling in a central place.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45799 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 package/system/opkg/Makefile | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

(limited to 'package/system/opkg')

diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile
index 1b1f3f19e4..d313c442dd 100644
--- a/package/system/opkg/Makefile
+++ b/package/system/opkg/Makefile
@@ -115,18 +115,7 @@ define Package/opkg/Default/install
   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
-- 
cgit v1.2.3