#!/bin/mkpkg # description: Feature-rich netcat from the Nmap project # url: https://nmap.org/ncat name=ncat version=7.991 release=1 _srcname=nmap depends=(libressl libpcap) source=(https://nmap.org/dist/$_srcname-$version.tar.bz2) sha256sums=( "a5d507f29437bef3bedd4771ff9aaa8fc1c2a109ddba1f5b1cf12027456929be" ) patch() { cd $_srcname-$version # libdnet runtime detection fails in sandbox; force the right answer sed -i 's/ac_cv_dnet_linux_pf_packet=no/ac_cv_dnet_linux_pf_packet=yes/' \ libdnet-stripped/configure # LibreSSL >= 3.5 has opaque structs; remove the guard that excludes it # (only ncat_ssl.c is relevant for ncat — the other files are nmap/nping) sed -i 's/&& !defined LIBRESSL_VERSION_NUMBER//' ncat/ncat_ssl.c } build() { cd $_srcname-$version ./configure \ CC=${CC:-cc} CXX=${CXX:-c++} \ --prefix=/usr \ --without-nmap \ --without-nping \ --without-zenmap \ --without-ndiff \ --without-nmap-update \ --with-openssl \ --with-libpcap \ --with-libpcre=included \ --without-liblua \ --without-libssh2 # only build ncat and its dependencies make -C libnetutil make -C nbase make -C nsock/src make -C ncat install -d $PKG/usr/bin install -d $PKG/usr/share/man/man1 install -m 755 ncat/ncat $PKG/usr/bin/ncat install -m 644 ncat/docs/ncat.1 $PKG/usr/share/man/man1/ncat.1 ln -sf ncat $PKG/usr/bin/nc install -d $PKG/usr/share/ncat install -m 644 ncat/certs/ca-bundle.crt $PKG/usr/share/ncat/ca-bundle.crt } signify() { untrusted comment: public key RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 } # vim: filetype=sh