blob: 835ce3b8dfcc3b6764a0e53c01498128e68b3354 [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"
Patrick Williams864cc432023-02-09 14:54:44 -06007LIC_FILES_CHKSUM = "file://COPYING;md5=a48ac97a8550eff12395a2c0d6151510"
Andrew Geissler517393d2023-01-13 08:55:19 -06008
9SRC_URI = "git://github.com/lsof-org/lsof;branch=master;protocol=https \
10 file://remove-host-information.patch"
Patrick Williams864cc432023-02-09 14:54:44 -060011SRCREV = "546eb1c9910e7c137fdff551683c35a736021e05"
Andrew Geissler517393d2023-01-13 08:55:19 -060012
13S = "${WORKDIR}/git"
14
15
16inherit update-alternatives
17
Patrick Williams864cc432023-02-09 14:54:44 -060018ALTERNATIVE:${PN} = "lsof"
Andrew Geissler517393d2023-01-13 08:55:19 -060019ALTERNATIVE_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 () {
Patrick Williams864cc432023-02-09 14:54:44 -060041 oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS} -I..'
Andrew Geissler517393d2023-01-13 08:55:19 -060042}
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}