app=netcat
version=1.10
build=1sml

build() {
  mkandenterbuilddir
  rm -rf nc-110

  tar xf $srcdir/nc-110.tar.?z*
  cd nc-110
  fixbuilddirpermissions

  applypatch $srcdir/nc-110-21.diff
  applypatch $srcdir/nc.diff

  make linux
  install -Dm 755 nc $pkg/bin/nc
  install -Dm 644 debian/nc.1 $pkg/share/man/man1/nc.1

  ( cd $pkg/bin ; ln -s nc netcat )

  cp $srcdir/NOLICENSE-COPYRIGHT $pkgdocs/

  mkfinalpkg
}

homepage="https://salsa.debian.org/debian/netcat"
download="https://salsa.debian.org/debian/netcat/-/archive/upstream/1.10/netcat-upstream-1.10.tar.bz2"
desc="Utility to read and write data across network connections"
requires="openssl libpcap"
sha512sums="
80359fc233f1f5dd450cb15a496f733fd4d7b65087f4f54474d2307b316282b8faf3e54f80caad847bbfd703d6197e5053dd7b8b4ef28fe0c34ed6b81c294733  nc-110.tar.xz
457b3e91d0daffd22c22dc0a7b7289d8cfc896d7356efce5a97fc7c09633b8a647a5515bf0881af0626bf512750735fb8f7baf0ca04c609ae51fd94bb8ab6874  nc-110-21.diff
bbb8fd9ec5ac91c8ea492243a3accd4ba775469937040804d5a35fb30402eb39490f24b2d55277158e71e0fdf5ab7dc61f3e816d53ed476f219585cdae76d887  nc.diff
"
