Merge commit 'origin/opendreambox-1.6' into vuplus-1.6
[vuplus_openembedded] / recipes / lsof / lsof_4.78.bb
1 DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \
2 Its name stands for LiSt Open Files, and it does just that."
3 SECTION = "devel"
4 LICENSE = "BSD"
5
6 PR = "r4"
7
8 SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
9 LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
10 S = "${WORKDIR}/lsof_${PV}_src"
11
12 python do_unpack () {
13         bb.build.exec_func('base_do_unpack', d)
14         src_uri = bb.data.getVar('SRC_URI', d)
15         bb.data.setVar('SRC_URI', '${LOCALSRC}', d)
16         bb.build.exec_func('base_do_unpack', d)
17         bb.data.setVar('SRC_URI', src_uri, d)
18 }
19
20 export LSOF_OS = "${TARGET_OS}"
21 LSOF_OS_linux-uclibc = "linux"
22 LSOF_OS_linux-uclibceabi = "linux"
23 LSOF_OS_linux-uclibspe = "linux"
24 LSOF_OS_linux-gnueabi = "linux"
25 LSOF_OS_linux-gnuspe = "linux"
26 export LSOF_INCLUDE = "${STAGING_INCDIR}"
27
28 do_configure () {
29         yes | ./Configure ${LSOF_OS}
30 }
31
32 export I = "${STAGING_INCDIR}"
33 export L = "${STAGING_INCDIR}"
34 export EXTRA_OEMAKE = ""
35
36 do_compile () {
37         oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}' \
38         'RANLIB=${RANLIB} liblsof.a'
39 }
40
41 do_install () {
42         install -d ${D}${sbindir} ${D}${mandir}/man8
43         install -m 4755 lsof ${D}${sbindir}/lsof
44         install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8
45 }