makedepends=(pcre2 lua libssh2 libpcap gobject-introspection python-setuptools)

description="Utility for network discovery and security auditing"
url="http://insecure.org/nmap/"

packager="Great-OS Team"
maintainer="Great-OS Team"

name=nmap
version=7.98
release=3

source=(http://download.insecure.org/nmap/dist/$name-$version.tgz)

build() {
  cd $name-$version

  # ensure we build devendored deps
  rm -rf liblua libpcap libpcre macosx mwin32 libssh2 libz

  # fix build
  sed -e '/strlcat/d' -i libdnet-stripped/acconfig.h
  autoreconf -fiv -I /usr/share/gettext/m4

  ./configure --prefix=/usr \
              --mandir=/usr/share/man \
              --localedir=/usr/share/locale \
              --docdir=/usr/share/doc/$name-$version \
              --infodir=/usr/share/info \
              --with-libpcre=/usr \
              --with-libpcap=/usr \
              --with-zlib=/usr \
              --with-liblua=/usr \
              --with-libssh2=/usr \
              --without-ndiff \
              --without-zenmap

  make || make -j1
  make DESTDIR=$PKG install
}
