# Recipe for version 4.77 by Andre Detsch <detsch@gobolinux.org>, on Sat Jul 1 10:50:03 BRT 2006
# Recipe (MakeRecipe) for Lsof by David Smith <dsmith@algonet.se>, on Sat Sep 25 22:15:08 CEST 2004
compile_version=1.8.2
url="http://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/lsof_4.77.tar.bz2"
mirror_url="http://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/OLD/lsof_4.77.tar.bz2"
recipe_type=makefile

pre_build() {
	# Extract sub-package and create makefile
	[ -d lsof_4.77_src ] || tar xf lsof_4.77_src.tar
	cd lsof_4.77_src
	[ -f Makefile ] || Configure -n linux
}

# lsof does not implement an install target aside from
# one telling us to write our own and giving a hint 
# about how to do it
do_install=no

pre_link() {
	# install suid as recommended in the suid distribution
	# to allow anyone to see all open files
	install -m 4755 lsof "$target/bin"
	install -m 444 lsof.8 "$target/man/man8"
}
