apk and opkg side by side
[openwrt/staging/aparcar.git] / package / base-files / Makefile
index caa9f15153ea7540385d7fcaafbcaf4ac8f7a4fa..cf6d23d80082b645a0c95239460c8f8e14f4b8f5 100644 (file)
@@ -227,9 +227,18 @@ endif
        $(if $(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE), \
                rm -f $(1)/etc/banner.failsafe,)
 
+ifdef CONFIG_USE_APK
        mkdir -p $(1)/etc/apk/
-       $(call FeedSourcesAppend,$(1)/etc/apk/repositories)
+       $(call FeedSourcesAppendAPK,$(1)/etc/apk/repositories)
        $(VERSION_SED_SCRIPT) $(1)/etc/apk/repositories
+else
+       $(if $(CONFIG_CLEAN_IPKG),, \
+               mkdir -p $(1)/etc/opkg; \
+               $(call FeedSourcesAppendOPKG,$(1)/etc/opkg/distfeeds.conf); \
+               $(VERSION_SED_SCRIPT) $(1)/etc/opkg/distfeeds.conf)
+       $(if $(CONFIG_IPK_FILES_CHECKSUMS),, \
+               rm -f $(1)/sbin/pkg_check)
+endif
 endef
 
 ifneq ($(DUMP),1)