feeds: use common macro "FeedSourcesAppend" to populate opkg configurations
[openwrt/staging/lynxis.git] / package / system / opkg / Makefile
index 4f30ec2114882db68a8d51cbabec40491a3d3bfa..d313c442ddb5fe46b676449dc7a03a747656e95f 100644 (file)
@@ -89,11 +89,12 @@ EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
 CONFIGURE_ARGS += \
        --disable-curl \
        --disable-gpg \
+       --enable-sha256 \
        --with-opkgetcdir=/etc \
        --with-opkglockfile=/var/lock/opkg.lock
 
 ifeq ($(BUILD_VARIANT),smime)
-       CONFIGURE_ARGS += --enable-openssl --enable-sha256 --disable-usign
+       CONFIGURE_ARGS += --enable-openssl --disable-usign
 else
   ifndef CONFIG_SIGNED_PACKAGES
     CONFIGURE_ARGS += --disable-usign
@@ -114,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
@@ -151,6 +141,7 @@ endef
 HOST_CONFIGURE_ARGS+= \
        --disable-curl \
        --disable-gpg \
+       --enable-sha256 \
        --with-opkgetcdir=/etc \
        --with-opkglockfile=/tmp/opkg.lock