diff options
Diffstat (limited to 'meta-skeleton/recipes-skeleton/service/service_0.1.bb')
-rw-r--r-- | meta-skeleton/recipes-skeleton/service/service_0.1.bb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta-skeleton/recipes-skeleton/service/service_0.1.bb b/meta-skeleton/recipes-skeleton/service/service_0.1.bb new file mode 100644 index 0000000000..22137a5e57 --- /dev/null +++ b/meta-skeleton/recipes-skeleton/service/service_0.1.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | DESCRIPTION = "The canonical example of init scripts" | ||
2 | SECTION = "base" | ||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYRIGHT;md5=349c872e0066155e1818b786938876a4" | ||
5 | RDEPENDS_${PN} = "initscripts" | ||
6 | PR = "r0" | ||
7 | |||
8 | SRC_URI = "file://skeleton \ | ||
9 | file://skeleton_test.c \ | ||
10 | file://COPYRIGHT \ | ||
11 | " | ||
12 | |||
13 | CONFFILES_${PN} += "${sysconfdir}/init.d/skeleton" | ||
14 | |||
15 | do_compile () { | ||
16 | ${CC} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/skeleton-test | ||
17 | } | ||
18 | |||
19 | do_install () { | ||
20 | install -d ${D}${sysconfdir}/init.d | ||
21 | cat ${WORKDIR}/skeleton | \ | ||
22 | sed -e 's,/etc,${sysconfdir},g' \ | ||
23 | -e 's,/usr/sbin,${sbindir},g' \ | ||
24 | -e 's,/var,${localstatedir},g' \ | ||
25 | -e 's,/usr/bin,${bindir},g' \ | ||
26 | -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/skeleton | ||
27 | chmod a+x ${D}${sysconfdir}/init.d/skeleton | ||
28 | |||
29 | install -d ${D}${sbindir} | ||
30 | install -m 0755 ${WORKDIR}/skeleton-test ${D}${sbindir}/ | ||
31 | } | ||
32 | |||