diff options
| author | John Ogness <john.ogness@linutronix.de> | 2017-12-19 11:16:28 +0100 |
|---|---|---|
| committer | John Ogness <john.ogness@linutronix.de> | 2017-12-19 11:16:28 +0100 |
| commit | 6e7e1b7172813fc4ecb60597f903dd21a4616159 (patch) | |
| tree | dbfe0b8f1a3d51c275722ba86d4ffe109ee88aef /distribution/yocto-advanced/meta-schulung-extended/recipes-app/greeting/hello_1.0.bb | |
| parent | 270520b4a2eac8725c8575c3180964289722e191 (diff) | |
update yocto-advanced: sync to devel/manut/yocto
The devel/manut/yocto heavily diverted from master. Sync
with latest version 8cd4956a9b48a316eab6dc6d1b1f6cd51362fecf.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Diffstat (limited to 'distribution/yocto-advanced/meta-schulung-extended/recipes-app/greeting/hello_1.0.bb')
| -rw-r--r-- | distribution/yocto-advanced/meta-schulung-extended/recipes-app/greeting/hello_1.0.bb | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/distribution/yocto-advanced/meta-schulung-extended/recipes-app/greeting/hello_1.0.bb b/distribution/yocto-advanced/meta-schulung-extended/recipes-app/greeting/hello_1.0.bb new file mode 100644 index 0000000..3f9b9c2 --- /dev/null +++ b/distribution/yocto-advanced/meta-schulung-extended/recipes-app/greeting/hello_1.0.bb @@ -0,0 +1,49 @@ +# packages require licenses! +LICENSE = "MIT" + +# if the license is not "CLOSED", a checksum is required +# (we are using a common license file since this +# application does not provide LICENSE text) +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +# specify files needed to build the package +SRC_URI = " \ + file://hello.c \ + file://hello-init.sh \ +" + +S = "${WORKDIR}" + +# specify a new compile task +# - by default, poky calls "make", but we have no Makefile +# - this task is called from the ${S} directory, ${WORKDIR}/${PN}/${PV} +# - poky appropriately sets ${CC}, ${CFLAGS}, ${LDFLAGS} and exports +# them to the shell process environment +do_compile () { + $CC $CFLAGS $LDFLAGS -o${B}/hello ${S}/hello.c +} + +# specify an install task +# - by default, do_install is empty +# - this task is called from the ${S} directory, ${WORKDIR}/${PN}-${PV} +# - anything copy to ${D} will be packaged +# - by default, poky sets ${base_bindir} to "/bin" +do_install () { + install -D -m 0755 ${B}/hello ${D}${base_bindir}/hello + + # install the init script + install -D -m 0755 ${WORKDIR}/hello-init.sh \ + ${D}${sysconfdir}/init.d/hello +} + +# specify the name of the init script +# (it is will be expected to be in /etc/init.d) +INITSCRIPT_NAME="hello" + +# setup the init script +# (this will create the link: /etc/rcS.d/S20hello) +INITSCRIPT_PARAMS = "start 20 S ." + +# use the update-rc.d class to setup the init scripts +# (this class uses INITSCRIPT_NAME and INITSCRIPT_PARAMS) +inherit update-rc.d |
