Project import
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3e29a30
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,103 @@
+#
+#    Copyright (c) 2011 Nest Labs, 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 make file for rfkill, a tool for enabling and
+#      disabling wireless devices on Linux.
+#
+
+
+include pre.mak
+
+PackageName		:= rfkill
+
+PackageExtension	:= tar.bz2
+PackageSeparator	:= -
+
+PackagePatchArgs	:= -p1
+
+PackageArchive		:= $(PackageName).$(PackageExtension)
+PackageSourceDir	:= $(PackageName)$(PackageSeparator)$(PackageVersion)
+
+PackageBuildMakefile	= $(call GenerateBuildPaths,Makefile)
+
+LicenseSourceFile	:= COPYING
+LicenseSourcePath	:= $(addprefix $(PackageSourceDir)/,$(LicenseSourceFile))
+
+CleanPaths		+= $(PackageLicenseFile)
+
+SOURCEDIRS                      = $(PackageSourceDir)
+$(PackageSourceDir)_RULE_TARGET = $(BuildDirectory)/configure
+
+all: $(PackageDefaultGoal)
+
+# Generate the package license contents.
+
+$(LicenseSourcePath): $(BuildDirectory)/source
+
+$(PackageLicenseFile): $(LicenseSourcePath)
+	$(copy-result)
+
+# 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.
+# Configure the source for building.
+
+$(BuildDirectory)/configure: $(BuildDirectory)/source | $(PackageSourceDir) $(BuildDirectory)
+	$(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory))
+	$(Verbose)touch $@
+
+# Build the source.
+#
+# We have to unset MAKEFLAGS since they confuse the package build otherwise.
+
+$(BuildDirectory)/build: $(BuildDirectory)/configure | $(BuildDirectory)
+	$(Verbose)unset MAKEFLAGS && \
+	$(MAKE) $(JOBSFLAG) -C $(BuildDirectory) \
+	CC="$(CC)" CXX="$(CXX)" AR=$(AR) NM=$(NM) RANLIB=$(RANLIB) STRIP=$(STRIP) \
+	INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
+	all
+	$(Verbose)touch $@
+
+# Stage the build to a temporary installation area.
+#
+# We have to unset MAKEFLAGS since they confuse the package build otherwise.
+
+$(BuildDirectory)/stage: $(BuildDirectory)/build | $(ResultDirectory)
+	$(Verbose)unset MAKEFLAGS && \
+	$(MAKE) $(JOBSFLAG) -C $(BuildDirectory) \
+	INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
+	DESTDIR=$(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/rfkill.patches/rfkill-50.description b/rfkill.patches/rfkill-50.description
new file mode 100644
index 0000000..7d105d8
--- /dev/null
+++ b/rfkill.patches/rfkill-50.description
@@ -0,0 +1,3 @@
+This patch eliminates the GIT repository label version checking because it will invariably fail when the package is included as a subtree 
+or submodule of a larger GIT repository.
+
diff --git a/rfkill.patches/rfkill-50.patch b/rfkill.patches/rfkill-50.patch
new file mode 100644
index 0000000..7ee850e
--- /dev/null
+++ b/rfkill.patches/rfkill-50.patch
@@ -0,0 +1,23 @@
+diff -aruN a/version.sh b/version.sh
+--- a/version.sh	2010-02-06 06:33:26.000000000 -0800
++++ b/version.sh	2011-12-15 14:10:14.427286828 -0800
+@@ -12,19 +12,6 @@
+ 
+ if test "x$SUFFIX" != 'x'; then
+ 	v="$VERSION$SUFFIX"
+-elif head=`git rev-parse --verify HEAD 2>/dev/null`; then
+-	git update-index --refresh --unmerged > /dev/null
+-	descr=$(git describe 2>/dev/null || echo "v$VERSION")
+-
+-	# on git builds check that the version number above
+-	# is correct...
+-	[ "${descr%%-*}" = "v$VERSION" ] || exit 2
+-
+-	echo -n 'const char rfkill_version[] = "' > "$OUT"
+-	v="${descr#v}"
+-	if git diff-index --name-only HEAD | read dummy ; then
+-		v="$v"-dirty
+-	fi
+ else
+ 	v="$VERSION"
+ fi
diff --git a/rfkill.tar.bz2 b/rfkill.tar.bz2
new file mode 100644
index 0000000..0c3daf3
--- /dev/null
+++ b/rfkill.tar.bz2
Binary files differ
diff --git a/rfkill.url b/rfkill.url
new file mode 100644
index 0000000..b12eb3d
--- /dev/null
+++ b/rfkill.url
@@ -0,0 +1 @@
+http://linuxwireless.org/download/rfkill/rfkill-0.4.tar.bz2
diff --git a/rfkill.version b/rfkill.version
new file mode 100644
index 0000000..bd73f47
--- /dev/null
+++ b/rfkill.version
@@ -0,0 +1 @@
+0.4