Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "The canonical example of init scripts" |
| 2 | SECTION = "base" |
| 3 | LICENSE = "GPLv2" |
| 4 | LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYRIGHT;md5=349c872e0066155e1818b786938876a4" |
| 5 | |
| 6 | SRC_URI = "file://skeleton \ |
| 7 | file://skeleton_test.c \ |
| 8 | file://COPYRIGHT \ |
| 9 | " |
| 10 | |
| 11 | do_compile () { |
| 12 | ${CC} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/skeleton-test |
| 13 | } |
| 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 | |
| 25 | install -d ${D}${sbindir} |
| 26 | install -m 0755 ${WORKDIR}/skeleton-test ${D}${sbindir}/ |
| 27 | } |
| 28 | |
| 29 | RDEPENDS_${PN} = "initscripts" |
| 30 | |
| 31 | CONFFILES_${PN} += "${sysconfdir}/init.d/skeleton" |