summaryrefslogtreecommitdiff
path: root/yocto-poky/meta-skeleton/recipes-skeleton/service/service_0.1.bb
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2015-09-15 22:41:29 +0300
committerPatrick Williams <patrick@stwcx.xyz>2015-09-15 22:41:29 +0300
commit21f9b84b4b729fbd7acbd465e7a3f726e4d20f91 (patch)
treeeb2d091d427ca0813b445509d59cc8e27e8ad25f /yocto-poky/meta-skeleton/recipes-skeleton/service/service_0.1.bb
parent101cef31e2bf54c678501155cd2106251acbd076 (diff)
parentc124f4f2e04dca16a428a76c89677328bc7bf908 (diff)
downloadopenbmc-21f9b84b4b729fbd7acbd465e7a3f726e4d20f91.tar.xz
Merge commit 'c124f4f2e04dca16a428a76c89677328bc7bf908' as 'yocto-poky'
Diffstat (limited to 'yocto-poky/meta-skeleton/recipes-skeleton/service/service_0.1.bb')
-rw-r--r--yocto-poky/meta-skeleton/recipes-skeleton/service/service_0.1.bb31
1 files changed, 31 insertions, 0 deletions
diff --git a/yocto-poky/meta-skeleton/recipes-skeleton/service/service_0.1.bb b/yocto-poky/meta-skeleton/recipes-skeleton/service/service_0.1.bb
new file mode 100644
index 000000000..c5cd7a97b
--- /dev/null
+++ b/yocto-poky/meta-skeleton/recipes-skeleton/service/service_0.1.bb
@@ -0,0 +1,31 @@
+SUMMARY = "The canonical example of init scripts"
+SECTION = "base"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYRIGHT;md5=349c872e0066155e1818b786938876a4"
+
+SRC_URI = "file://skeleton \
+ file://skeleton_test.c \
+ file://COPYRIGHT \
+ "
+
+do_compile () {
+ ${CC} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/skeleton-test
+}
+
+do_install () {
+ install -d ${D}${sysconfdir}/init.d
+ cat ${WORKDIR}/skeleton | \
+ sed -e 's,/etc,${sysconfdir},g' \
+ -e 's,/usr/sbin,${sbindir},g' \
+ -e 's,/var,${localstatedir},g' \
+ -e 's,/usr/bin,${bindir},g' \
+ -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/skeleton
+ chmod a+x ${D}${sysconfdir}/init.d/skeleton
+
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/skeleton-test ${D}${sbindir}/
+}
+
+RDEPENDS_${PN} = "initscripts"
+
+CONFFILES_${PN} += "${sysconfdir}/init.d/skeleton"