Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | SUMMARY = "LiSt Open Files tool" |
| 2 | DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \ |
| 3 | Its name stands for LiSt Open Files, and it does just that." |
| 4 | HOMEPAGE = "http://people.freebsd.org/~abe/" |
| 5 | SECTION = "devel" |
| 6 | LICENSE = "Spencer-94" |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame] | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=a48ac97a8550eff12395a2c0d6151510" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 8 | |
| 9 | SRC_URI = "git://github.com/lsof-org/lsof;branch=master;protocol=https \ |
| 10 | file://remove-host-information.patch" |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame] | 11 | SRCREV = "546eb1c9910e7c137fdff551683c35a736021e05" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 12 | |
| 13 | S = "${WORKDIR}/git" |
| 14 | |
| 15 | |
| 16 | inherit update-alternatives |
| 17 | |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame] | 18 | ALTERNATIVE:${PN} = "lsof" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 19 | ALTERNATIVE_LINK_NAME[lsof] = "${sbindir}/lsof" |
| 20 | # Make our priority higher than busybox |
| 21 | ALTERNATIVE_PRIORITY = "100" |
| 22 | |
| 23 | |
| 24 | export LSOF_INCLUDE = "${STAGING_INCDIR}" |
| 25 | |
| 26 | do_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 | |
| 37 | export I = "${STAGING_INCDIR}" |
| 38 | export L = "${STAGING_INCDIR}" |
| 39 | |
| 40 | do_compile () { |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame] | 41 | oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS} -I..' |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | do_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 | } |