summaryrefslogtreecommitdiff
path: root/recipes/distro-version
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/distro-version')
-rw-r--r--recipes/distro-version/distro-version.bb17
1 files changed, 17 insertions, 0 deletions
diff --git a/recipes/distro-version/distro-version.bb b/recipes/distro-version/distro-version.bb
new file mode 100644
index 0000000000..269186f590
--- /dev/null
+++ b/recipes/distro-version/distro-version.bb
@@ -0,0 +1,17 @@
+LICENSE = "MIT"
+
+PV = "${DISTRO_VERSION}"
+
+INHIBIT_DEFAULT_DEPS = "1"
+PACKAGES = "${PN}"
+PACKAGE_ARCH = "all"
+
+export METADATA_REVISION
+export METADATA_BRANCH
+
+do_install() {
+ mkdir -p ${D}${sysconfdir}
+ echo "${DISTRO_NAME} ${DISTRO_VERSION}" > ${D}${sysconfdir}/${DISTRO}-version
+ echo "Built from branch: ${METADATA_BRANCH}" >> ${D}${sysconfdir}/${DISTRO}-version
+ echo "Revision: ${METADATA_REVISION}" >> ${D}${sysconfdir}/${DISTRO}-version
+}