1SUMMARY = "LiSt Open Files tool" 2DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \ 3Its name stands for LiSt Open Files, and it does just that." 4HOMEPAGE = "http://people.freebsd.org/~abe/" 5SECTION = "devel" 6LICENSE = "Spencer-94" 7LIC_FILES_CHKSUM = "file://00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a" 8 9# Upstream lsof releases are hosted on an ftp server which times out download 10# attempts from hosts for which it can not perform a DNS reverse-lookup (See: 11# https://people.freebsd.org/~abe/ ). http://www.mirrorservice.org seems to be 12# the most commonly used alternative. 13 14SRC_URI = "git://github.com/lsof-org/lsof;branch=master;protocol=https \ 15 file://lsof-remove-host-information.patch \ 16 " 17 18SRCREV = "005e014e1abdadb2493d8b3ce87b37a2c0a2351d" 19 20S = "${WORKDIR}/git" 21 22 23inherit update-alternatives 24 25ALTERNATIVE:${PN} = "lsof" 26ALTERNATIVE_LINK_NAME[lsof] = "${sbindir}/lsof" 27# Make our priority higher than busybox 28ALTERNATIVE_PRIORITY = "100" 29 30 31export LSOF_INCLUDE = "${STAGING_INCDIR}" 32 33do_configure () { 34 export LSOF_AR="${AR} cr" 35 export LSOF_RANLIB="${RANLIB}" 36 if [ "x${GLIBCVERSION}" != "x" ]; then 37 LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'` 38 LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}" 39 export LINUX_CLIB 40 fi 41 yes | ./Configure linux 42} 43 44export I = "${STAGING_INCDIR}" 45export L = "${STAGING_INCDIR}" 46 47do_compile () { 48 oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}' 49} 50 51do_install () { 52 install -d ${D}${sbindir} ${D}${mandir}/man8 53 install -m 0755 lsof ${D}${sbindir}/lsof 54 install -m 0644 Lsof.8 ${D}${mandir}/man8/lsof.8 55} 56