blob: 9f80176ee13bb31210dab4687a5e061f7d2a327e [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001SUMMARY = "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
9SRC_URI = "git://github.com/lsof-org/lsof;branch=master;protocol=https \
10 file://remove-host-information.patch"
11SRCREV = "898916d4c7c390ea4610aebaf1d32b8a3c49f26b"
12
13S = "${WORKDIR}/git"
14
15
16inherit update-alternatives
17
18ALTERNATIVE_${PN} = "lsof"
19ALTERNATIVE_LINK_NAME[lsof] = "${sbindir}/lsof"
20# Make our priority higher than busybox
21ALTERNATIVE_PRIORITY = "100"
22
23
24export LSOF_INCLUDE = "${STAGING_INCDIR}"
25
26do_configure () {
27 export LSOF_AR="${AR} cr"
28 export LSOF_RANLIB="${RANLIB}"
29 if [ "x${GLIBCVERSION}" != "x" ]; then
30 LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'`
31 LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}"
32 export LINUX_CLIB
33 fi
34 yes | ./Configure linux
35}
36
37export I = "${STAGING_INCDIR}"
38export L = "${STAGING_INCDIR}"
39
40do_compile () {
41 oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}'
42}
43
44do_install () {
45 install -d ${D}${sbindir} ${D}${mandir}/man8
46 install -m 0755 lsof ${D}${sbindir}/lsof
47 install -m 0644 Lsof.8 ${D}${mandir}/man8/lsof.8
48}