# 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