service_0.1.bb 874 B

1234567891011121314151617181920212223242526272829303132
  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. SRC_URI = "file://skeleton \
  8. file://skeleton_test.c \
  9. file://COPYRIGHT \
  10. "
  11. CONFFILES_${PN} += "${sysconfdir}/init.d/skeleton"
  12. do_compile () {
  13. ${CC} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/skeleton-test
  14. }
  15. do_install () {
  16. install -d ${D}${sysconfdir}/init.d
  17. cat ${WORKDIR}/skeleton | \
  18. sed -e 's,/etc,${sysconfdir},g' \
  19. -e 's,/usr/sbin,${sbindir},g' \
  20. -e 's,/var,${localstatedir},g' \
  21. -e 's,/usr/bin,${bindir},g' \
  22. -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/skeleton
  23. chmod a+x ${D}${sysconfdir}/init.d/skeleton
  24. install -d ${D}${sbindir}
  25. install -m 0755 ${WORKDIR}/skeleton-test ${D}${sbindir}/
  26. }