Project import
diff --git a/lsof-4.84/Makefile b/lsof-4.84/Makefile
new file mode 100644
index 0000000..8ac9793
--- /dev/null
+++ b/lsof-4.84/Makefile
@@ -0,0 +1,122 @@
+#
+#    Copyright (c) 2010-2011 Nest, Inc.
+#    All rights reserved.
+#
+#    This document is the property of Nest. It is considered
+#    confidential and proprietary information.
+#
+#    This document may not be reproduced or transmitted in any form,
+#    in whole or in part, without the express written permission of
+#    Nest.
+#
+#    Description:
+#      This file is the makefile for the "list open files" (lsof) utility.
+#
+
+BuildConfigSpecialized	:= No
+BuildProductSpecialized	:= No
+
+include pre.mak
+
+PackageName		:= lsof
+
+PackageExtension	:= tar.bz2
+PackageSeparator	:= _
+
+PackagePatchArgs	:= -g 0 -p2
+
+PackageArchive		:= $(PackageName).$(PackageExtension)
+PackageWrapperDir	:= $(PackageName)$(PackageSeparator)$(PackageVersion)
+
+PackageSourceArchive	:= $(PackageWrapperDir)/$(PackageName)$(PackageSeparator)$(PackageVersion)$(PackageSeparator)src.tar
+PackageSourceDir	:= $(PackageWrapperDir)/$(PackageName)$(PackageSeparator)$(PackageVersion)$(PackageSeparator)src
+
+PackageBuildMakefile	= $(call GenerateBuildPaths,Configure)
+
+CleanPaths		+= $(PackageLicenseFile)
+
+all: $(PackageDefaultGoal)
+
+# Expand the wrapper directory which contains another archive
+# containing the source.
+
+$(PackageSourceArchive): $(PackageArchive)
+	$(expand-package)
+	$(Verbose)touch $@
+
+# Generate the package license contents.
+
+$(PackageSourceDir)/00README: source
+
+$(PackageLicenseFile): $(PackageSourceDir)/00README
+	$(Verbose)$(SED) -n -e '/^License$$/,/\*\/$$/{;p;/\*\/$$/q;}' < $< > $@
+
+# Extract the source from the archive and apply patches, if any.
+
+$(PackageSourceDir): $(PackageSourceArchive)
+	$(Echo) "Expanding \"$(PackageSourceArchive)\" to \"$@\""
+	$(Verbose)extension=`echo $(PackageSourceArchive) | awk -F . '{if (NF > 1) {print $$NF}}'`; \
+	if [ $$extension = "bz2" ]; then \
+		tar -C $(PackageWrapperDir) --bzip2 -xf $(PackageSourceArchive); \
+	elif [ $$extension = "gz" ]; then \
+		tar -C $(PackageWrapperDir) --gzip -xf $(PackageSourceArchive); \
+	elif [ $$extension = "tar" ]; then \
+		tar -C $(PackageWrapperDir) -xf $(PackageSourceArchive); \
+	fi
+	$(Verbose)touch $@
+	$(patch-package)
+
+# Prepare the sources.
+
+.PHONY: source
+source: | $(PackageSourceDir)
+
+# Patch the sources, if necessary.
+
+.PHONY: patch
+patch: source
+
+# Generate the package build makefile.
+
+$(PackageBuildMakefile): | $(PackageSourceDir) $(BuildDirectory)
+	$(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory))
+
+# Configure the source for building.
+
+.PHONY: configure
+configure: source $(PackageBuildMakefile)
+	$(Verbose)cd $(BuildDirectory) && \
+	LSOF_CC=$(CC) \
+	LSOF_INCLUDE="$(ToolIncDir)" \
+	LSOF_LINUX_INCL="$(call GenerateResultPaths,sw/tps/linux,include)" \
+	./Configure \
+	-n \
+	$(TargetOS)
+
+# Build the source.
+#
+# We have to unset MAKEFLAGS since they confuse the package build otherwise.
+
+.PHONY: build
+build: configure
+	$(Verbose)unset MAKEFLAGS && \
+	$(MAKE) -C $(BuildDirectory) \
+	CC=$(CC) \
+	all
+
+# Stage the build to a temporary installation area.
+#
+# We have to unset MAKEFLAGS since they confuse the package build otherwise.
+
+.PHONY: stage
+stage: build | $(ResultDirectory)
+	$(Verbose)unset MAKEFLAGS && \
+	$(MAKE) -C $(BuildDirectory) DESTDIR=$(ResultDirectory) install
+
+clean:
+	$(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(PackageWrapperDir)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
+
+include post.mak
diff --git a/lsof-4.84/lsof.patches.tar.gz b/lsof-4.84/lsof.patches.tar.gz
new file mode 100644
index 0000000..7b5c6b8
--- /dev/null
+++ b/lsof-4.84/lsof.patches.tar.gz
Binary files differ
diff --git a/lsof-4.84/lsof.tar.bz2 b/lsof-4.84/lsof.tar.bz2
new file mode 100644
index 0000000..3f02eff
--- /dev/null
+++ b/lsof-4.84/lsof.tar.bz2
Binary files differ
diff --git a/lsof-4.84/lsof.url b/lsof-4.84/lsof.url
new file mode 100644
index 0000000..111f846
--- /dev/null
+++ b/lsof-4.84/lsof.url
@@ -0,0 +1 @@
+ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.84.tar.bz2
diff --git a/lsof-4.84/lsof.version b/lsof-4.84/lsof.version
new file mode 100644
index 0000000..87dbf9c
--- /dev/null
+++ b/lsof-4.84/lsof.version
@@ -0,0 +1 @@
+4.84