Project import
diff --git a/tftp-hpa-5.0/Makefile b/tftp-hpa-5.0/Makefile
new file mode 100644
index 0000000..75b09d7
--- /dev/null
+++ b/tftp-hpa-5.0/Makefile
@@ -0,0 +1,105 @@
+#
+#    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).
+#
+
+BuildConfigSpecialized	:= No
+BuildProductSpecialized	:= No
+
+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)
+
+all: $(PackageDefaultGoal)
+
+# Generate the package license contents.
+
+$(PackageSourceDir)/tftpd/tftpd.c: 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.
+
+.PHONY: source
+source: | $(PackageSourceDir)
+
+# Patch the sources, if necessary.
+
+.PHONY: patch
+patch: source
+
+# 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.
+
+$(PackageBuildMakefile): | $(PackageSourceDir) $(BuildDirectory)
+	$(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory))
+	$(Verbose)cd $(BuildDirectory) && \
+	./configure \
+	CC=$(CC) \
+	CFLAGS=-I$(TcpWrappersIncDir) \
+	LDFLAGS=-L$(TcpWrappersLibDir) \
+	--build=$(HostTuple) \
+	--host=$(TargetTuple) \
+	--without-readline \
+	--prefix=/usr \
+	--sysconfdir=/etc
+
+# Configure the source for building.
+
+.PHONY: configure
+configure: source $(PackageBuildMakefile)
+
+# Build the source.
+
+.PHONY: build
+build: configure
+	$(Verbose)$(MAKE) -C $(BuildDirectory) all
+
+# Stage the build to a temporary installation area.
+
+.PHONY: stage
+stage: build | $(ResultDirectory)
+	$(Verbose)$(MAKE) -C $(BuildDirectory) INSTALLROOT=$(ResultDirectory) install
+
+clean:
+	$(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
+
+include post.mak
diff --git a/tftp-hpa-5.0/tftp-hpa.tar.bz2 b/tftp-hpa-5.0/tftp-hpa.tar.bz2
new file mode 100644
index 0000000..09f904f
--- /dev/null
+++ b/tftp-hpa-5.0/tftp-hpa.tar.bz2
Binary files differ
diff --git a/tftp-hpa-5.0/tftp-hpa.url b/tftp-hpa-5.0/tftp-hpa.url
new file mode 100644
index 0000000..3f30a59
--- /dev/null
+++ b/tftp-hpa-5.0/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-5.0/tftp-hpa.version b/tftp-hpa-5.0/tftp-hpa.version
new file mode 100644
index 0000000..819e07a
--- /dev/null
+++ b/tftp-hpa-5.0/tftp-hpa.version
@@ -0,0 +1 @@
+5.0