public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Q. Gylstorff" <Quirin.Gylstorff@siemens.com>
To: isar-users@googlegroups.com
Cc: Quirin Gylstorff <quirin.gylstorff@siemens.com>
Subject: [RFC PATCH 2/2] Add example for build-config-snippets
Date: Mon,  9 Aug 2021 12:26:45 +0200	[thread overview]
Message-ID: <20210809102645.17414-3-Quirin.Gylstorff@siemens.com> (raw)
In-Reply-To: <20210809102645.17414-1-Quirin.Gylstorff@siemens.com>

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 meta-isar/conf/local.conf.sample              |  2 +-
 .../example-build-config_0.1.bb               | 32 +++++++++++++++++++
 .../example-build-config/files/build.snippet  |  1 +
 .../example-build-config/files/build_config   |  1 +
 4 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 meta-isar/recipes-app/example-build-config/example-build-config_0.1.bb
 create mode 100644 meta-isar/recipes-app/example-build-config/files/build.snippet
 create mode 100644 meta-isar/recipes-app/example-build-config/files/build_config

diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample
index 6cf1656..b86d618 100644
--- a/meta-isar/conf/local.conf.sample
+++ b/meta-isar/conf/local.conf.sample
@@ -178,7 +178,7 @@ CONF_VERSION = "1"
 
 #
 # The default list of extra packages to be installed.
-IMAGE_INSTALL = "hello-isar example-raw example-module-${KERNEL_NAME} enable-fsck isar-exclude-docs samefile hello isar-disable-apt-cache cowsay example-prebuilt"
+IMAGE_INSTALL = "hello-isar example-raw example-module-${KERNEL_NAME} enable-fsck isar-exclude-docs samefile hello isar-disable-apt-cache cowsay example-prebuilt example-build-config"
 
 #
 # Enable cross-compilation support
diff --git a/meta-isar/recipes-app/example-build-config/example-build-config_0.1.bb b/meta-isar/recipes-app/example-build-config/example-build-config_0.1.bb
new file mode 100644
index 0000000..c899aed
--- /dev/null
+++ b/meta-isar/recipes-app/example-build-config/example-build-config_0.1.bb
@@ -0,0 +1,32 @@
+# Sample application using dpkg-raw, which turns a folder (${D}) of
+# files into a .deb
+#
+# This software is a part of ISAR.
+
+DESCRIPTION = "Sample use for build-config-snippets for ISAR"
+MAINTAINER = "Your name here <you@domain.com>"
+
+inherit dpkg-raw
+inherit build-config-snippets
+BUILD_CONFIG ?= "build_config"
+
+SRC_URI += "file://${BUILD_CONFIG}"
+
+BUILD_FEATURE_libhello = ""
+BUILD_FEATURE_libhello[DEPENDS] = "libhello"
+BUILD_FEATURE_libhello[DEBIAN_DEPENDS] = "libhello"
+BUILD_FEATURE_libhello[DEBIAN_BUILD_DEPENDS] = "libhello"
+BUILD_FEATURE_libhello[BUILD_CONFIG_SNIPPETS] = "file://build.snippet"
+
+
+BUILD_FEATURES += "libhello"
+do_prepare_build[cleandirs] = "${D}/usr/share/example-build-config"
+do_prepare_build() {
+    # use deb_debianize to generate the necessary debian files
+    deb_debianize
+
+    # ${BUILD_CONFIG}.gen contains the concated build_config
+    install ${WORKDIR}/build_config.gen ${D}/usr/share/example-build-config/build_config.gen
+}
+
+
diff --git a/meta-isar/recipes-app/example-build-config/files/build.snippet b/meta-isar/recipes-app/example-build-config/files/build.snippet
new file mode 100644
index 0000000..199e48a
--- /dev/null
+++ b/meta-isar/recipes-app/example-build-config/files/build.snippet
@@ -0,0 +1 @@
+# build snippet test
diff --git a/meta-isar/recipes-app/example-build-config/files/build_config b/meta-isar/recipes-app/example-build-config/files/build_config
new file mode 100644
index 0000000..d95da26
--- /dev/null
+++ b/meta-isar/recipes-app/example-build-config/files/build_config
@@ -0,0 +1 @@
+# BUILD CONFIG EXAMPLE
-- 
2.20.1


  parent reply	other threads:[~2021-08-09 10:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 10:26 [RFC PATCH 0/2] Add bbclass to generate build configuration from snippets Q. Gylstorff
2021-08-09 10:26 ` [RFC PATCH 1/2] Add build-config-snippet class Q. Gylstorff
2021-08-09 10:26 ` Q. Gylstorff [this message]
2021-08-09 12:58 ` [RFC PATCH 0/2] Add bbclass to generate build configuration from snippets Jan Kiszka
2021-08-09 13:46   ` Gylstorff Quirin
2021-08-09 14:05     ` Gylstorff Quirin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210809102645.17414-3-Quirin.Gylstorff@siemens.com \
    --to=quirin.gylstorff@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox