Project import
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ccc6443
--- /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 for the wireless regulatory database, a database
+# of the supported wireless channel and power settings for a
+# given region.
+#
+
+
+include pre.mak
+
+PackageName := wireless-regdb
+
+PackageExtension := tar.bz2
+PackageSeparator := -
+
+PackagePatchArgs := -p1
+
+PackageArchive := $(PackageName).$(PackageExtension)
+PackageSourceDir := $(PackageName)$(PackageSeparator)$(PackageVersion)
+
+PackageBuildMakefile = $(call GenerateBuildPaths,Makefile)
+
+LicenseSourceFile := LICENSE
+LicenseSourcePath := $(addprefix $(PackageSourceDir)/,$(LicenseSourceFile))
+
+CleanPaths += $(PackageLicenseFile)
+
+SOURCEDIRS = $(PackageSourceDir)
+$(PackageSourceDir)_RULE_TARGET = $(BuildDirectory)/build
+
+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/wireless-regdb.patches/wireless-regdb-50.description b/wireless-regdb.patches/wireless-regdb-50.description
new file mode 100644
index 0000000..d8b7d58
--- /dev/null
+++ b/wireless-regdb.patches/wireless-regdb-50.description
@@ -0,0 +1 @@
+Use /usr/bin/python instead of /usr/bin/env python to prevent build errors with nest-python setup in your environment.
diff --git a/wireless-regdb.patches/wireless-regdb-50.patch b/wireless-regdb.patches/wireless-regdb-50.patch
new file mode 100644
index 0000000..a69dca4
--- /dev/null
+++ b/wireless-regdb.patches/wireless-regdb-50.patch
@@ -0,0 +1,9 @@
+diff -Naur a/db2bin.py b/db2bin.py
+--- a/db2bin.py 2011-04-28 12:17:40.000000000 -0700
++++ b/db2bin.py 2015-07-09 11:40:45.681967994 -0700
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python
+
+ from cStringIO import StringIO
+ import struct
diff --git a/wireless-regdb.tar.bz2 b/wireless-regdb.tar.bz2
new file mode 100644
index 0000000..d808207
--- /dev/null
+++ b/wireless-regdb.tar.bz2
Binary files differ
diff --git a/wireless-regdb.url b/wireless-regdb.url
new file mode 100644
index 0000000..9872796
--- /dev/null
+++ b/wireless-regdb.url
@@ -0,0 +1 @@
+http://linuxwireless.org/download/wireless-regdb/wireless-regdb-2011.04.28.tar.bz2
diff --git a/wireless-regdb.version b/wireless-regdb.version
new file mode 100644
index 0000000..2f21b2d
--- /dev/null
+++ b/wireless-regdb.version
@@ -0,0 +1 @@
+2011.04.28