v2] nmap: use pkgconfig and reorg

Added pkgconfig support
Since most binaries provided by nmap can be excluded via configure
  manage via pkgconfig
Aligned python packages with binaries so nmap-python is no longer needed

V2: Missed some options in EXTRA_OECONF changes

Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Armin Kuster
2014-08-19 20:54:16 -07:00
parent 2682cd4105
commit 20776618f2
+24 -10
View File
@@ -3,34 +3,48 @@ DESCRIPTION = "Nmap ("Network Mapper") is a free and open source (license) utili
SECTION = "security"
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
FILES_${PN} += "${target_datadir}/ncat"
SRC_URI = "http://nmap.org/dist/${BPN}-${PV}.tar.bz2"
SRC_URI[md5sum] = "5a36ad3a63d5b7ea5514f745a397436a"
SRC_URI[sha256sum] = "3f89d9053c69507fe9533c40188a6561d49607a37b1db6380aed9039d4883137"
inherit autotools-brokensep
inherit autotools-brokensep pkgconfig
DEPENDS = "libpcap"
PACKAGECONFIG ??= "ncat nping ndiff pcap"
EXTRA_OECONF = "--without-liblua --without-zenmap --without-subversion --with-pcap=linux --without-openssl"
PACKAGECONFIG[pcap] = "--with-pcap=linux, --without-pcap, libpcap"
PACKAGECONFIG[ssl] = "--with-openssl=${STAGING_LIBDIR}/.., --without-openssl, openssl, openssl"
#disable/enable packages
PACKAGECONFIG[nping] = ",--without-nping,"
PACKAGECONFIG[ncat] = ",--without-ncat,"
PACKAGECONFIG[ndiff] = ",--without-ndiff,"
#use nmap's Included or system's libs
PACKAGECONFIG[lua] = "--with-liblua=${STAGING_LIBDIR}/.., --with-liblua=included, lua"
PACKAGECONFIG[pcre] = "--with-libpcre=${STAGING_LIBDIR}/.., --with-libpcre=included, libpre"
EXTRA_OECONF = "--without-zenmap"
do_configure() {
autoconf
oe_runconf
}
PACKAGES = "${PN} ${PN}-dbg ${PN}-doc"
FILES_${PN} = "${bindir}/nmap ${datadir}/nmap/*"
# append packages if enabled
FILES_${PN} += "${@bb.utils.contains("PACKAGECONFIG", "ncat", "${bindir}/ncat ${target_datadir}/ncat", "", d)}"
FILES_${PN} += "${@bb.utils.contains("PACKAGECONFIG", "nping", "${bindir}/nping", "", d)}"
FILES_${PN} += "${@bb.utils.contains("PACKAGECONFIG", "ndiff", "${bindir}/ndiff ${libdir}/python${PYTHON_BASEVERSION}/site-packages/ndiff*", "", d)}"
# should add a conditional for "--without-zenmap" test.
# zenmap builds if the below are uncommented. Not tested
#PACKAGES =+ "${PN}-zenmap"
#FILES_${PN}-zenmap = "/usr/share/zenmap/*"
# should add a conditional based for "--without-ndiff"
PACKAGES =+ "${PN}-python"
DESCRIPTION_${PN}-python = \
"The ${PN}-python package includes the ndiff utility. \
Ndiff is a tool to aid in the comparison of Nmap scans."
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"