blob: 3f9b9c273c4768c7789792b4873dbdecce60c820 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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
|