SUMMARY="A utility for network discovery and security auditing"
DESCRIPTION="Nmap (\"Network Mapper\") is a free and open source license \
utility for network discovery and security auditing. Many systems and network \
administrators also find it useful for tasks such as network inventory, \
managing service upgrade schedules, and monitoring host or service uptime. \
Nmap uses raw IP packets in novel ways to determine what hosts are available \
on the network, what services (application name and version) those hosts are \
offering, what operating systems (and OS versions) they are running, what \
type of packet filters/firewalls are in use, and dozens of other \
characteristics. It was designed to rapidly scan large networks, but works \
fine against single hosts. Nmap runs on all major computer operating systems, \
and official binary packages are available for Linux, Windows, and Mac OS X. \
In addition to the classic command-line Nmap executable, the Nmap suite \
includes an advanced GUI and results viewer (Zenmap), a flexible data \
transfer, redirection, and debugging tool (Ncat), a utility for comparing \
scan results (Ndiff), and a packet generation and response analysis tool \
(Nping)."
HOMEPAGE="https://nmap.org/"
COPYRIGHT="1996–2020 The Nmap Project"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://nmap.org/dist/nmap-$portVersion.tar.bz2"
CHECKSUM_SHA256="5557c3458275e8c43e1d0cfa5dad4e71dd39e091e2029a293891ad54098a40e8"

ARCHITECTURES="?all"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"

PROVIDES="
	nmap$secondaryArchSuffix = $portVersion
	cmd:nmap$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libpcap$secondaryArchSuffix
	lib:libpcre$secondaryArchSuffix
	lib:libssl$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libpcap$secondaryArchSuffix
	devel:libpcre$secondaryArchSuffix
	devel:libssl$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:awk
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:python
	cmd:sed
	"

BUILD()
{
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make $jobArgs install
}
