Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [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" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4 | LICENSE = "GPL-2.0-only" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 5 | |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://COPYING;beginline=7;endline=12;md5=66938a7e5b4c118eda78271de14874c2" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 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 \ |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 11 | file://0001-Include-time.h-header-to-pass-clang-compilation.patch \ |
Andrew Geissler | 1548c07 | 2019-02-22 16:03:50 -0600 | [diff] [blame] | 12 | file://0002-Fix-building-with-libc.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 13 | file://0001-Make-ndiff-support-python3.patch \ |
| 14 | file://0001-configure.ac-make-ndiff-depend-on-python3.patch \ |
Andrew Geissler | 1548c07 | 2019-02-22 16:03:50 -0600 | [diff] [blame] | 15 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 16 | |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 17 | SRC_URI[md5sum] = "d37b75b06d1d40f27b76d60db420a1f5" |
| 18 | SRC_URI[sha256sum] = "fcfa5a0e42099e12e4bf7a68ebe6fde05553383a682e816a7ec9256ab4773faa" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 19 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 20 | inherit autotools-brokensep pkgconfig python3native |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 21 | |
| 22 | PACKAGECONFIG ?= "ncat nping ndiff pcap" |
| 23 | |
| 24 | PACKAGECONFIG[pcap] = "--with-pcap=linux, --without-pcap, libpcap, libpcap" |
Andrew Geissler | 1548c07 | 2019-02-22 16:03:50 -0600 | [diff] [blame] | 25 | PACKAGECONFIG[pcre] = "--with-libpcre=${STAGING_LIBDIR}/.., --with-libpcre=included, libpcre" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 26 | PACKAGECONFIG[ssl] = "--with-openssl=${STAGING_LIBDIR}/.., --without-openssl, openssl, openssl" |
| 27 | PACKAGECONFIG[ssh2] = "--with-openssh2=${STAGING_LIBDIR}/.., --without-openssh2, libssh2, libssh2" |
| 28 | PACKAGECONFIG[libz] = "--with-libz=${STAGING_LIBDIR}/.., --without-libz, zlib, zlib" |
| 29 | |
| 30 | #disable/enable packages |
| 31 | PACKAGECONFIG[nping] = ",--without-nping," |
| 32 | PACKAGECONFIG[ncat] = ",--without-ncat," |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 33 | PACKAGECONFIG[ndiff] = "--with-ndiff=yes,--without-ndiff,python3" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 34 | PACKAGECONFIG[update] = ",--without-nmap-update," |
| 35 | |
| 36 | EXTRA_OECONF = "--with-libdnet=included --with-liblinear=included --without-subversion --with-liblua=included" |
| 37 | |
| 38 | # zenmap needs python-pygtk which has been removed |
| 39 | # it also only works with python2 |
| 40 | # disable for now until py3 is supported |
| 41 | EXTRA_OECONF += "--without-zenmap" |
| 42 | |
| 43 | export PYTHON_SITEPACKAGES_DIR |
| 44 | |
| 45 | do_configure() { |
| 46 | autoconf |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 47 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} |
| 48 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 49 | oe_runconf |
| 50 | } |
| 51 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 52 | do_install:append() { |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 53 | for f in ndiff uninstall_ndiff; do |
| 54 | if [ -f ${D}${bindir}/$f ]; then |
| 55 | sed -i 's@^#!.*$@#!/usr/bin/env python3@g' ${D}${bindir}/$f |
| 56 | fi |
| 57 | done |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 58 | } |
| 59 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 60 | FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}/ncat" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 61 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 62 | RDEPENDS:${PN} += "python3-core" |