diff mbox series

[1/3] package/skeleton-init-portable: new skeleton

Message ID 20220221043034.2736010-2-francois.perrad@gadz.org
State Rejected
Headers show
Series portable services: another use case of BR | expand

Commit Message

Francois Perrad Feb. 21, 2022, 4:30 a.m. UTC
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 package/skeleton-init-portable/Config.in      |  7 ++++++
 .../skeleton-init-portable.mk                 | 23 +++++++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 package/skeleton-init-portable/Config.in
 create mode 100644 package/skeleton-init-portable/skeleton-init-portable.mk
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index ac702d8d0..7cafd6c95 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1010,6 +1010,7 @@  F:	package/pkg-perl.mk
 F:	package/pkg-luarocks.mk
 F:	package/quickjs/
 F:	package/rings/
+F:	package/skeleton-init-portable
 F:	package/tekui/
 F:	package/wpebackend-fdo/
 F:	package/wpewebkit/
diff --git a/package/Config.in b/package/Config.in
index 10209d84d..0b947f682 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -6,6 +6,7 @@  menu "Target packages"
 	source "package/skeleton-init-common/Config.in"
 	source "package/skeleton-init-none/Config.in"
 	source "package/skeleton-init-openrc/Config.in"
+	source "package/skeleton-init-portable/Config.in"
 	source "package/skeleton-init-systemd/Config.in"
 	source "package/skeleton-init-sysv/Config.in"
 
diff --git a/package/skeleton-init-portable/Config.in b/package/skeleton-init-portable/Config.in
new file mode 100644
index 000000000..ca434451c
--- /dev/null
+++ b/package/skeleton-init-portable/Config.in
@@ -0,0 +1,7 @@ 
+config BR2_PACKAGE_SKELETON_INIT_PORTABLE
+	bool
+	select BR2_PACKAGE_HAS_SKELETON
+	select BR2_PACKAGE_SKELETON_INIT_COMMON
+
+config BR2_PACKAGE_PROVIDES_SKELETON
+	default "skeleton-init-portable" if BR2_PACKAGE_SKELETON_INIT_PORTABLE
diff --git a/package/skeleton-init-portable/skeleton-init-portable.mk b/package/skeleton-init-portable/skeleton-init-portable.mk
new file mode 100644
index 000000000..8174a5d82
--- /dev/null
+++ b/package/skeleton-init-portable/skeleton-init-portable.mk
@@ -0,0 +1,23 @@ 
+################################################################################
+#
+# skeleton-init-portable
+#
+################################################################################
+
+# The skeleton can't depend on the toolchain, since all packages depends on the
+# skeleton and the toolchain is a target package, as is skeleton.
+# Hence, skeleton would depends on the toolchain and the toolchain would depend
+# on skeleton.
+SKELETON_INIT_PORTABLE_ADD_TOOLCHAIN_DEPENDENCY = NO
+SKELETON_INIT_PORTABLE_ADD_SKELETON_DEPENDENCY = NO
+
+SKELETON_INIT_PORTABLE_DEPENDENCIES = skeleton-init-common
+
+SKELETON_INIT_PORTABLE_PROVIDES = skeleton
+
+define SKELETON_INIT_PORTABLE_INSTALL_TARGET_CMDS
+	touch $(TARGET_DIR)/etc/machine-id
+	mkdir -p $(TARGET_DIR)/var/tmp
+endef
+
+$(eval $(generic-package))