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