imagebuilder: move handling of DEFAULT_PACKAGES into shareable place
authorPetr Štetiar <ynezz@true.cz>
Sun, 17 Nov 2024 05:13:27 +0000 (05:13 +0000)
committerRobert Marko <robimarko@gmail.com>
Sun, 17 Nov 2024 18:29:06 +0000 (19:29 +0100)
It seems, that handling of DEFAULT_PACKAGES is needed in more places, so
lets move it into dedicated include file so it can be easily shared.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/16986
Signed-off-by: Robert Marko <robimarko@gmail.com>
include/default-packages.mk [new file with mode: 0644]
target/imagebuilder/files/Makefile

diff --git a/include/default-packages.mk b/include/default-packages.mk
new file mode 100644 (file)
index 0000000..c964e92
--- /dev/null
@@ -0,0 +1,5 @@
+ifneq ($(CONFIG_USE_APK),)
+  DEFAULT_PACKAGES += apk-mbedtls
+else
+  DEFAULT_PACKAGES += opkg
+endif
index 56f761e966acb184a4002c0d1fb3a2ff34aa8969..c4e2c390fe70e4eea1a3def41b9b6a7c737bab2f 100644 (file)
@@ -26,6 +26,7 @@ include $(INCLUDE_DIR)/debug.mk
 include $(INCLUDE_DIR)/depends.mk
 include $(INCLUDE_DIR)/rootfs.mk
 
+include $(INCLUDE_DIR)/default-packages.mk
 include $(INCLUDE_DIR)/version.mk
 export REVISION
 export SOURCE_DATE_EPOCH