Project import
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..91f18a1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,108 @@
+#
+#    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 H. Peter Anvin TFTP client
+#      and server (tftp-hpa).
+#
+
+
+include pre.mak
+
+PackageName		:= tftp-hpa
+
+PackageExtension	:= tar.bz2
+PackageSeparator	:= -
+
+PackagePatchArgs	:=
+
+PackageArchive		:= $(PackageName).$(PackageExtension)
+PackageSourceDir	:= $(PackageName)$(PackageSeparator)$(PackageVersion)
+
+PackageBuildMakefile	= $(call GenerateBuildPaths,Makefile)
+
+CleanPaths		+= $(PackageLicenseFile)
+
+TcpWrappersDir		:= sw/tps/tcp_wrappers
+TcpWrappersIncDir	:= $(call GenerateResultPaths,$(TcpWrappersDir),usr/include)
+TcpWrappersLibDir	:= $(call GenerateResultPaths,$(TcpWrappersDir),usr/lib)
+
+SOURCEDIRS                     = $(PackageSourceDir)
+$(PackageSourceDir)_RULETARGET = $(BuildDirectory)/configure
+
+all: $(PackageDefaultGoal)
+
+# Generate the package license contents.
+
+$(PackageSourceDir)/tftpd/tftpd.c: $(BuildDirectory)/source
+
+$(PackageLicenseFile): $(PackageSourceDir)/tftpd/tftpd.c
+	$(Verbose)$(SED) -n -e '/^\/\*$$/,/\*\/$$/{;p;/\*\/$$/q;}' < $< > $@
+
+# Extract the source from the archive and apply patches, if any.
+
+$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths)
+	$(expand-and-patch-package)
+
+# Prepare the sources.
+
+$(BuildDirectory)/source: | $(PackageSourceDir)
+	$(Verbose)touch $@
+
+# Patch the sources, if necessary.
+
+$(BuildDirectory)/patch: $(BuildDirectory)/source
+	$(Verbose)touch $@
+
+# Generate the package build makefile.
+#
+# Even though this package supports GNU configure, we have to clone
+# the tree since it doesn't correctly support non-colocated source and
+# build trees.
+
+# Configure the source for building.
+
+$(BuildDirectory)/configure: $(BuildDirectory)/source | $(PackageSourceDir) $(BuildDirectory)
+	$(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory))
+	$(Verbose)cd $(BuildDirectory) && \
+	./configure \
+	CC="$(CC)" \
+	CFLAGS=-I$(TcpWrappersIncDir) \
+	LDFLAGS=-L$(TcpWrappersLibDir) \
+	INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
+	--build=$(HostTuple) \
+	--host=$(TargetTuple) \
+	--without-readline \
+	--prefix=/usr \
+	--sysconfdir=/etc
+	$(Verbose)touch $@
+
+# Build the source.
+
+$(BuildDirectory)/build: $(BuildDirectory)/configure
+	$(Verbose)$(MAKE) $(JOBSFLAG) -C $(BuildDirectory) all
+	$(Verbose)touch $@
+
+# Stage the build to a temporary installation area.
+
+$(BuildDirectory)/stage: $(BuildDirectory)/build | $(ResultDirectory)
+	$(Verbose)$(MAKE) $(JOBSFLAG) -C $(BuildDirectory) INSTALLROOT=$(ResultDirectory) install
+	$(Verbose)touch $@
+
+.PHONY: stage
+stage: $(BuildDirectory)/stage
+
+clean:
+	$(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
+
+include post.mak
diff --git a/tftp-hpa.tar.bz2 b/tftp-hpa.tar.bz2
new file mode 100644
index 0000000..09f904f
--- /dev/null
+++ b/tftp-hpa.tar.bz2
Binary files differ
diff --git a/tftp-hpa.url b/tftp-hpa.url
new file mode 100644
index 0000000..3f30a59
--- /dev/null
+++ b/tftp-hpa.url
@@ -0,0 +1 @@
+http://www.kernel.org/pub/software/network/tftp/tftp-hpa-5.0.tar.bz2
diff --git a/tftp-hpa.version b/tftp-hpa.version
new file mode 100644
index 0000000..819e07a
--- /dev/null
+++ b/tftp-hpa.version
@@ -0,0 +1 @@
+5.0