Package-Name: lsof
# FIXME: wants reverse DNS
#Source: ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/
Source: ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/lsof_(\d+.\d+).tar.gz $1
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
	tar xvfp lsof_"$(VERSION)"/lsof_"$(VERSION)"_src.tar
	mv lsof_"$(VERSION)"_src lsof-"$(VERSION)"
	rm -rf lsof_"$(VERSION)"
Compile:
	mv -f 00* "$(PREFIX)/"
	umask 022 ; mkdir -p "$(PREFIX)"/{sbin,man/man8}
	./Configure -n linux
	$(MAKE)
	mv -f lsof "$(PREFIX)"/sbin/
	mv -f lsof.8 "$(PREFIX)"/man/man8/
Install:
	$(MAKE) instsbin SBIN=lsof
	$(MAKE) instman SECTION=8 MAN=lsof
Patch: <<EOT
--- dialects/linux/machine.h.old	2002-02-27 00:20:21 +0900
+++ dialects/linux/machine.h	2002-11-21 22:55:19 +0900
@@ -187,7 +187,7 @@
  * the build to running kernel identity.
  */
 
-/* #define	HASKERNIDCK	1	*/
+#define	HASKERNIDCK	1
 
 
 /*
@@ -372,7 +372,7 @@
  * (the one that its user logged on with) of the lsof process.
  */
 
-/* #define	HASSECURITY	1 */
+#define	HASSECURITY	1
 
 
 /*
EOT

/pkg/lsof/
/usr/man/man8/lsof.8.gz
/usr/sbin/lsof
