blob: 6416618dcbd1a0e4da006b858afd375313212ff1 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "The canonical example of init scripts"
2SECTION = "base"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYRIGHT;md5=349c872e0066155e1818b786938876a4"
5
6SRC_URI = "file://skeleton \
7 file://skeleton_test.c \
8 file://COPYRIGHT \
9 "
10
11do_compile () {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060012 ${CC} ${CFLAGS} ${LDFLAGS} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/skeleton-test
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013}
14
15do_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
29RDEPENDS_${PN} = "initscripts"
30
31CONFFILES_${PN} += "${sysconfdir}/init.d/skeleton"