summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2014-08-19 20:54:16 -0700
committerArmin Kuster <akuster808@gmail.com>2014-09-13 10:24:53 -0700
commit20776618f2fa5373a9a48136c121bdcc64c3eaea (patch)
treee745b8cc742377b0e49da732a7afe53c989b1d18
parent2682cd4105a70d2f33529593a94217564f00896f (diff)
downloadmeta-security-20776618f2fa5373a9a48136c121bdcc64c3eaea.tar.gz
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>
-rw-r--r--recipes-security/nmap/nmap_6.46.bb34
1 files changed, 24 insertions, 10 deletions
diff --git a/recipes-security/nmap/nmap_6.46.bb b/recipes-security/nmap/nmap_6.46.bb
index 52acf96..6fe3c6b 100644
--- a/recipes-security/nmap/nmap_6.46.bb
+++ b/recipes-security/nmap/nmap_6.46.bb
@@ -3,34 +3,48 @@ DESCRIPTION = "Nmap ("Network Mapper") is a free and open source (license) utili
3SECTION = "security" 3SECTION = "security"
4LICENSE = "GPL-2.0" 4LICENSE = "GPL-2.0"
5LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" 5LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
6FILES_${PN} += "${target_datadir}/ncat"
7 6
8SRC_URI = "http://nmap.org/dist/${BPN}-${PV}.tar.bz2" 7SRC_URI = "http://nmap.org/dist/${BPN}-${PV}.tar.bz2"
9 8
10SRC_URI[md5sum] = "5a36ad3a63d5b7ea5514f745a397436a" 9SRC_URI[md5sum] = "5a36ad3a63d5b7ea5514f745a397436a"
11SRC_URI[sha256sum] = "3f89d9053c69507fe9533c40188a6561d49607a37b1db6380aed9039d4883137" 10SRC_URI[sha256sum] = "3f89d9053c69507fe9533c40188a6561d49607a37b1db6380aed9039d4883137"
12 11
13inherit autotools-brokensep 12inherit autotools-brokensep pkgconfig
14 13
15DEPENDS = "libpcap" 14PACKAGECONFIG ??= "ncat nping ndiff pcap"
16 15
17EXTRA_OECONF = "--without-liblua --without-zenmap --without-subversion --with-pcap=linux --without-openssl" 16PACKAGECONFIG[pcap] = "--with-pcap=linux, --without-pcap, libpcap"
17PACKAGECONFIG[ssl] = "--with-openssl=${STAGING_LIBDIR}/.., --without-openssl, openssl, openssl"
18
19#disable/enable packages
20PACKAGECONFIG[nping] = ",--without-nping,"
21PACKAGECONFIG[ncat] = ",--without-ncat,"
22PACKAGECONFIG[ndiff] = ",--without-ndiff,"
23
24#use nmap's Included or system's libs
25PACKAGECONFIG[lua] = "--with-liblua=${STAGING_LIBDIR}/.., --with-liblua=included, lua"
26PACKAGECONFIG[pcre] = "--with-libpcre=${STAGING_LIBDIR}/.., --with-libpcre=included, libpre"
27
28EXTRA_OECONF = "--without-zenmap"
18 29
19do_configure() { 30do_configure() {
20 autoconf 31 autoconf
21 oe_runconf 32 oe_runconf
22} 33}
23 34
35PACKAGES = "${PN} ${PN}-dbg ${PN}-doc"
36
37FILES_${PN} = "${bindir}/nmap ${datadir}/nmap/*"
38
39# append packages if enabled
40FILES_${PN} += "${@bb.utils.contains("PACKAGECONFIG", "ncat", "${bindir}/ncat ${target_datadir}/ncat", "", d)}"
41FILES_${PN} += "${@bb.utils.contains("PACKAGECONFIG", "nping", "${bindir}/nping", "", d)}"
42FILES_${PN} += "${@bb.utils.contains("PACKAGECONFIG", "ndiff", "${bindir}/ndiff ${libdir}/python${PYTHON_BASEVERSION}/site-packages/ndiff*", "", d)}"
43
24# should add a conditional for "--without-zenmap" test. 44# should add a conditional for "--without-zenmap" test.
25# zenmap builds if the below are uncommented. Not tested 45# zenmap builds if the below are uncommented. Not tested
26#PACKAGES =+ "${PN}-zenmap" 46#PACKAGES =+ "${PN}-zenmap"
27#FILES_${PN}-zenmap = "/usr/share/zenmap/*" 47#FILES_${PN}-zenmap = "/usr/share/zenmap/*"
28 48
29# should add a conditional based for "--without-ndiff"
30PACKAGES =+ "${PN}-python"
31DESCRIPTION_${PN}-python = \
32"The ${PN}-python package includes the ndiff utility. \
33Ndiff is a tool to aid in the comparison of Nmap scans."
34FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
35 49
36 50