Patchwork [meta-fsl-ppc,v2,4/5] merge-files: add recipe

login
register
mail settings
Submitter Ting Liu
Date July 23, 2014, 2:25 a.m.
Message ID <1406082306-17391-1-git-send-email-ting.liu@freescale.com>
Download mbox | patch
Permalink /patch/76437/
State Accepted
Headers show

Comments

Ting Liu - July 23, 2014, 2:25 a.m.
From: Ting Liu <b28495@freescale.com>

Signed-off-by: Ting Liu <b28495@freescale.com>
---
changes in v2: s/merged/merge/

 .../merge-files/merge-files/merge/README           |    7 +++++
 recipes-extended/merge-files/merge-files_1.0.bb    |   25 ++++++++++++++++++++
 2 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 recipes-extended/merge-files/merge-files/merge/README
 create mode 100644 recipes-extended/merge-files/merge-files_1.0.bb

Patch

diff --git a/recipes-extended/merge-files/merge-files/merge/README b/recipes-extended/merge-files/merge-files/merge/README
new file mode 100644
index 0000000..cd907fe
--- /dev/null
+++ b/recipes-extended/merge-files/merge-files/merge/README
@@ -0,0 +1,7 @@ 
+This package is used to merge specified files into rootfs.
+
+Steps:
+1> copy files to recipes-*/merge-files/merge-files/merge/
+2> add 'IMAGE_INSTALL += "merge-files"' into rootfs recipe
+3> bitbake <rootfs_image_type>
+
diff --git a/recipes-extended/merge-files/merge-files_1.0.bb b/recipes-extended/merge-files/merge-files_1.0.bb
new file mode 100644
index 0000000..f64b909
--- /dev/null
+++ b/recipes-extended/merge-files/merge-files_1.0.bb
@@ -0,0 +1,25 @@ 
+DESCRIPTION = "Merge prebuilt/extra files into rootfs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+inherit allarch
+
+SRC_URI = "file://merge"
+
+MERGED_DST ?= "${ROOT_HOME}"
+do_install () {
+    install -d ${D}/${MERGED_DST}
+    find ${WORKDIR}/merge/ -maxdepth 1 -mindepth 1 -not -name README \
+    -exec cp -fr '{}' ${D}/${MERGED_DST}/ \;
+    find ${WORKDIR}/merge/ -maxdepth 1 -mindepth 1 -exec rm -fr '{}' \;
+}
+do_unpack[nostamp] = "1"
+do_install[nostamp] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+FILES_${PN} = "/*"
+ALLOW_EMPTY_${PN} = "1"
+INSANE_SKIP_${PN} = "debug-files dev-so"
+