description="Useful to List Open Files for a given running application or process."
url="http://ftp.u-strasbg.fr/securite"

packager="spiky <spiky@nutyx.org>"
contributors="Berlius,Fanch,Tnut"

makedepends=(libtirpc)

name=lsof
version=4.99.3

source=(https://github.com/lsof-org/lsof/archive/$version/$name-$version.tar.gz)

build () {

cd $name-$version
#sed -i 's|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|' dialects/linux/machine.h
sed -i "s|.so ./version|.ds VN ${pkgver}|" -i Lsof.8

./Configure -n linux
make CC="cc $CFLAGS $CPPFLAGS $LDFLAGS"

install -v -m755 -d $PKG/usr/bin
install -v -m755 -d $PKG/usr/share/man/man8

install -v -m0755 -o root -g root lsof $PKG/usr/bin
install -v Lsof.8 $PKG/usr/share/man/man8/lsof.8

}
