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}/sources" 7UNPACKDIR = "${S}" 8DEPENDS = "popt" 9 10SRC_URI = "file://usleep.c \ 11 file://usleep.1 \ 12 file://GPLv2.patch \ 13" 14 15do_compile() { 16 ${CC} ${CFLAGS} ${LDFLAGS} usleep.c -o usleep -lpopt 17} 18 19do_install() { 20 install -d ${D}${base_bindir} 21 install -d ${D}${mandir}/man1 22 23 install -m 0755 ${UNPACKDIR}/usleep ${D}${base_bindir} 24 install -m 0644 ${UNPACKDIR}/usleep.1 ${D}${mandir}/man1 25} 26 27inherit update-alternatives 28 29ALTERNATIVE:${PN} = "usleep" 30ALTERNATIVE_PRIORITY = "80" 31ALTERNATIVE_LINK_NAME[usleep] = "${base_bindir}/usleep" 32 33ALTERNATIVE:${PN}-doc = "usleep.1" 34ALTERNATIVE_LINK_NAME[usleep.1] = "${mandir}/man1/usleep.1" 35 36# http://errors.yoctoproject.org/Errors/Details/766900/ 37# usleep.c:47:43: error: passing argument 3 of 'poptGetContext' from incompatible pointer type [-Wincompatible-pointer-types] 38CFLAGS += "-Wno-error=incompatible-pointer-types" 39