app=lsof
version=4.93.2
build=1sml
homepage="https://github.com/lsof-org/lsof"
download="https://github.com/lsof-org/lsof/archive/refs/tags/$version.tar.gz"
desc="list info about files open by processes"
requires="libtirpc"

build() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions

  ./Configure -n linux

  make CC="$CC" LDFLAGS="-static"
  cp 00README $pkgdocs/LICENSE

  install -Dm 755 lsof $pkg/bin/lsof
  install -Dm 644 Lsof.8 $pkg/share/man/man8/lsof.8

  mkfinalpkg
}

sha512sums="
69072f26ea4f2a7b0d56785ad364281cf71339f094d09c2b9b66469e60e8ee0ce3e08ea17a1d6b100308722877e568b41b9b05b7409f04a90e119f3334313fdf  lsof-4.93.2.tar.lz
"
