Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 1 | SUMMARY = "network auditing tool" |
| 2 | DESCRIPTION = "Nmap ("Network Mapper") is a free and open source (license) utility for network discovery and security auditing.\nGui support via appending to IMAGE_FEATURES x11-base in local.conf" |
| 3 | SECTION = "security" |
| 4 | LICENSE = "GPL-2.0" |
| 5 | |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;beginline=7;endline=12;md5=700c690f4ca6b1754f3f1db8645e42d9" |
| 7 | |
| 8 | SRC_URI = "http://nmap.org/dist/${BP}.tar.bz2 \ |
| 9 | file://nmap-redefine-the-python-library-dir.patch \ |
| 10 | file://nmap-replace-shtool-mkdir-with-coreutils-mkdir-command.patch \ |
| 11 | " |
| 12 | |
| 13 | SRC_URI[md5sum] = "4e454266559ddf2c4e2109866c62560c" |
| 14 | SRC_URI[sha256sum] = "a8796ecc4fa6c38aad6139d9515dc8113023a82e9d787e5a5fb5fa1b05516f21" |
| 15 | |
| 16 | inherit autotools-brokensep pkgconfig pythonnative distro_features_check |
| 17 | |
| 18 | PACKAGECONFIG ?= "ncat nping ndiff pcap" |
| 19 | PACKAGECONFIG += " ${@bb.utils.contains('IMAGE_FEATURES', 'x11-base', 'zenmap', '', d)}" |
| 20 | |
| 21 | PACKAGECONFIG[pcap] = "--with-pcap=linux, --without-pcap, libpcap, libpcap" |
| 22 | PACKAGECONFIG[pcre] = "--with-libpcre=${STAGING_LIBDIR}/.., --with-libpcre=included, libpre" |
| 23 | PACKAGECONFIG[ssl] = "--with-openssl=${STAGING_LIBDIR}/.., --without-openssl, openssl, openssl" |
| 24 | PACKAGECONFIG[ssh2] = "--with-openssh2=${STAGING_LIBDIR}/.., --without-openssh2, libssh2, libssh2" |
| 25 | PACKAGECONFIG[libz] = "--with-libz=${STAGING_LIBDIR}/.., --without-libz, zlib, zlib" |
| 26 | |
| 27 | #disable/enable packages |
| 28 | PACKAGECONFIG[nping] = ",--without-nping," |
| 29 | PACKAGECONFIG[ncat] = ",--without-ncat," |
| 30 | PACKAGECONFIG[ndiff] = ",--without-ndiff,python" |
| 31 | PACKAGECONFIG[update] = ",--without-nmap-update," |
| 32 | |
| 33 | #Add gui |
| 34 | PACKAGECONFIG[zenmap] = "--with-zenmap, --without-zenmap, gtk+ python-core python-codecs python-io python-logging python-unittest python-xml python-netclient python-doctest python-subprocess python-pygtk, python-core python-codecs python-io python-logging python-netclient python-xml python-unittest python-doctest python-subprocess python-pygtk gtk+" |
| 35 | |
| 36 | EXTRA_OECONF = "--with-libdnet=included --with-liblinear=included --without-subversion --with-liblua=included" |
| 37 | |
| 38 | export PYTHON_SITEPACKAGES_DIR |
| 39 | |
| 40 | do_configure() { |
| 41 | # strip hard coded python2# |
| 42 | sed -i -e 's=python2\.*=python=g' ${S}/configure.ac |
| 43 | sed -i -e 's=python2\.*=python=g' ${S}/configure |
| 44 | autoconf |
| 45 | oe_runconf |
| 46 | } |
| 47 | |
| 48 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'zenmap', '${PN}-zenmap', '', d)}" |
| 49 | |
| 50 | FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}" |
| 51 | FILES_${PN}-zenmap = "${@bb.utils.contains("PACKAGECONFIG", "zenmap", "${bindir}/*zenmap ${bindir}/xnmap ${datadir}/applications/* ${bindir}/nmapfe ${datadir}/zenmap/* ${PYTHON_SITEPACKAGES_DIR}/radialnet/* ${PYTHON_SITEPACKAGES_DIR}/zenmap*", "", d)}" |
| 52 | |
| 53 | RDEPENDS_${PN} = "python" |
| 54 | RDEPENDS_${PN}-zenmap = "nmap" |