1SUMMARY = "A user tool to support sleeping some number of microseconds"
2SECTION = "base"
3LICENSE = "GPL-2.0-only"
4LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
5
6S = "${WORKDIR}"
7DEPENDS = "popt"
8
9SRC_URI = "file://usleep.c \
10    file://usleep.1 \
11    file://GPLv2.patch \
12"
13
14do_compile() {
15    ${CC} ${CFLAGS} ${LDFLAGS} usleep.c -o usleep -lpopt
16}
17
18do_install() {
19    install -d ${D}${base_bindir}
20    install -d ${D}${mandir}/man1
21
22    install -m 0755 ${WORKDIR}/usleep   ${D}${base_bindir}
23    install -m 0644 ${WORKDIR}/usleep.1 ${D}${mandir}/man1
24}
25
26inherit update-alternatives
27
28ALTERNATIVE:${PN} = "usleep"
29ALTERNATIVE_PRIORITY = "80"
30ALTERNATIVE_LINK_NAME[usleep] = "${base_bindir}/usleep"
31
32ALTERNATIVE:${PN}-doc = "usleep.1"
33ALTERNATIVE_LINK_NAME[usleep.1] = "${mandir}/man1/usleep.1"
34