blob: 9659fa8246a9d18893013412a08604c80af7353b [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -05001SUMMARY = "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 \
15 file://lsof-remove-host-information.patch \
16 "
17
18SRCREV = "005e014e1abdadb2493d8b3ce87b37a2c0a2351d"
19
20S = "${WORKDIR}/git"
21
22export LSOF_INCLUDE = "${STAGING_INCDIR}"
23
24do_configure () {
25 export LSOF_AR="${AR} cr"
26 export LSOF_RANLIB="${RANLIB}"
27 if [ "x${GLIBCVERSION}" != "x" ]; then
28 LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'`
29 LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}"
30 export LINUX_CLIB
31 fi
32 yes | ./Configure linux
33}
34
35export I = "${STAGING_INCDIR}"
36export L = "${STAGING_INCDIR}"
37
38do_compile () {
39 oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}'
40}
41
42do_install () {
43 install -d ${D}${sbindir} ${D}${mandir}/man8
44 install -m 0755 lsof ${D}${sbindir}/lsof
45 install -m 0644 Lsof.8 ${D}${mandir}/man8/lsof.8
46}