Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [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 | SECTION = "devel" |
| 5 | LICENSE = "BSD" |
| 6 | |
| 7 | SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2" |
| 8 | |
| 9 | SRC_URI[md5sum] = "1b9cd34f3fb86856a125abbf2be3a386" |
| 10 | SRC_URI[sha256sum] = "81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718" |
| 11 | |
| 12 | LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar" |
| 13 | S = "${WORKDIR}/lsof_${PV}_src" |
| 14 | |
| 15 | LIC_FILES_CHKSUM = "file://${S}/00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a" |
| 16 | |
| 17 | python do_unpack () { |
| 18 | # temporarily change S for unpack |
| 19 | # of lsof_${PV} |
| 20 | s = d.getVar('S', False) |
| 21 | d.setVar('S', '${WORKDIR}/lsof_${PV}') |
| 22 | bb.build.exec_func('base_do_unpack', d) |
| 23 | # temporarily change SRC_URI for unpack |
| 24 | # of lsof_${PV}_src |
| 25 | src_uri = d.getVar('SRC_URI', False) |
| 26 | d.setVar('SRC_URI', '${LOCALSRC}') |
| 27 | d.setVar('S', s) |
| 28 | bb.build.exec_func('base_do_unpack', d) |
| 29 | d.setVar('SRC_URI', src_uri) |
| 30 | } |
| 31 | |
| 32 | export LSOF_INCLUDE = "${STAGING_INCDIR}" |
| 33 | |
| 34 | do_configure () { |
| 35 | export LSOF_AR="${AR} cr" |
| 36 | export LSOF_RANLIB="${RANLIB}" |
| 37 | if [ "x${GLIBCVERSION}" != "x" ];then |
| 38 | LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'` |
| 39 | LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}" |
| 40 | export LINUX_CLIB |
| 41 | fi |
| 42 | yes | ./Configure linux |
| 43 | } |
| 44 | |
| 45 | export I = "${STAGING_INCDIR}" |
| 46 | export L = "${STAGING_INCDIR}" |
| 47 | export EXTRA_OEMAKE = "" |
| 48 | |
| 49 | do_compile () { |
| 50 | oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}' |
| 51 | } |
| 52 | |
| 53 | do_install () { |
| 54 | install -d ${D}${sbindir} ${D}${mandir}/man8 |
| 55 | install -m 4755 lsof ${D}${sbindir}/lsof |
| 56 | install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8 |
| 57 | } |