Project import
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b931e7b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,104 @@
+#
+#    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) $(BuildDirectory)
+	$(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 && \
+	CFLAGS="$(call ToolGenerateIncludeArgument,$(LinuxIncludePath))" \
+	$(MAKE) $(JOBSFLAG) -C $(BuildDirectory) \
+	CC="$(CC) $(CPPOPTFLAGS)" CXX="$(CXX) $(CPPOPTFLAGS)" 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.patches/rfkill-51.description b/rfkill.patches/rfkill-51.description
new file mode 100644
index 0000000..5ac9ae9
--- /dev/null
+++ b/rfkill.patches/rfkill-51.description
@@ -0,0 +1 @@
+This patch adds strings for RFKILL_TYPE_NFC and RFKILL_TYPE_6LOWPAN.
diff --git a/rfkill.patches/rfkill-51.patch b/rfkill.patches/rfkill-51.patch
new file mode 100644
index 0000000..9294c5f
--- /dev/null
+++ b/rfkill.patches/rfkill-51.patch
@@ -0,0 +1,44 @@
+diff -aruN a/rfkill.c b/rfkill.c
+--- a/rfkill.c	2010-02-06 06:33:26.000000000 -0800
++++ b/rfkill.c	2016-03-23 20:22:26.211094139 -0700
+@@ -111,6 +111,10 @@
+ 		return "GPS";
+ 	case RFKILL_TYPE_FM:
+ 		return "FM";
++	case RFKILL_TYPE_NFC:
++		return "NFC";
++	case RFKILL_TYPE_6LOWPAN:
++		return "6LoWPAN";
+ 	case NUM_RFKILL_TYPES:
+ 		return NULL;
+ 	}
+@@ -133,6 +137,8 @@
+ 	{	.type = RFKILL_TYPE_WWAN,		.name = "wwan"	},
+ 	{	.type = RFKILL_TYPE_GPS,		.name = "gps"	},
+ 	{	.type = RFKILL_TYPE_FM,			.name = "fm"	},
++	{	.type = RFKILL_TYPE_NFC,		.name = "nfc"	},
++	{	.type = RFKILL_TYPE_6LOWPAN,		.name = "sixlowpan"	},
+ 	{	.name = NULL }
+ };
+ 
+diff -aruN a/rfkill.h b/rfkill.h
+--- a/rfkill.h	2010-02-06 06:33:26.000000000 -0800
++++ b/rfkill.h	2016-03-23 20:21:11.202137658 -0700
+@@ -37,6 +37,8 @@
+  * @RFKILL_TYPE_WWAN: switch is on a wireless WAN device.
+  * @RFKILL_TYPE_GPS: switch is on a GPS device.
+  * @RFKILL_TYPE_FM: switch is on a FM radio device.
++ * @RFKILL_TYPE_NFC: switch is on an NFC device.
++ * @RFKILL_TYPE_6LOWPAN: switch is on a 802.15.4 wireless network device.
+  * @NUM_RFKILL_TYPES: number of defined rfkill types
+  */
+ enum rfkill_type {
+@@ -48,6 +50,8 @@
+ 	RFKILL_TYPE_WWAN,
+ 	RFKILL_TYPE_GPS,
+ 	RFKILL_TYPE_FM,
++	RFKILL_TYPE_NFC,
++	RFKILL_TYPE_6LOWPAN,
+ 	NUM_RFKILL_TYPES,
+ };
+ 
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