aboutsummaryrefslogtreecommitdiffstats
path: root/package/crda/Makefile
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-01-28 20:03:04 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-01-28 20:03:04 +0000
commit11456c324d3e2e5bb3b113fc94d94f93952f8d42 (patch)
treeeba60c48998242ea34d1ad8d6347a5de18b46a8e /package/crda/Makefile
parentec34d908c7f9277807249c07ab0de5a267683c6e (diff)
downloadupstream-11456c324d3e2e5bb3b113fc94d94f93952f8d42.tar.gz
upstream-11456c324d3e2e5bb3b113fc94d94f93952f8d42.tar.bz2
upstream-11456c324d3e2e5bb3b113fc94d94f93952f8d42.zip
crda: new package (thanks to Hauke Mehrtens <hauke@hauke-m.de>)
SVN-Revision: 14249
Diffstat (limited to 'package/crda/Makefile')
-rw-r--r--package/crda/Makefile73
1 files changed, 73 insertions, 0 deletions
diff --git a/package/crda/Makefile b/package/crda/Makefile
new file mode 100644
index 0000000000..aa58524ec2
--- /dev/null
+++ b/package/crda/Makefile
@@ -0,0 +1,73 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=crda
+PKG_RELEASE:=1
+PKG_VERSION:=1.0.1
+PKG_SOURCE_URL:=http://wireless.kernel.org/download/crda
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_MD5SUM:=03554b71eef2626795befa17eb1d8b9e
+PKG_BUILD_DEPENDS:=mac80211 libnl openssl
+
+PKG_REGULATORY_NAME:=regulatory
+PKG_REGULATORY_VERSION:=2009.01.15
+PKG_REGULATORY_SOURCE_URL:=http://wireless.kernel.org/download/wireless-regdb/regulatory.bins
+PKG_REGULATORY_SOURCE:=$(PKG_REGULATORY_VERSION)-$(PKG_REGULATORY_NAME).bin
+PKG_REGULATORY_MD5SUM:=a0db99e5385c876b6da7e2869546f6e2
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/crda
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Central Regulatory Domain Agent (CRDA)
+ DEPENDS:=@LINUX_2_6 +hotplug2 +kmod-mac80211
+ URL:=http://wireless.kernel.org/en/developers/Regulatory/CRDA
+endef
+
+define Download/wireless-regdb
+ FILE:=$(PKG_REGULATORY_SOURCE)
+ URL:=$(PKG_REGULATORY_SOURCE_URL)
+ VERSION:=$(PKG_REGULATORY_VERSION)
+ MD5SUM:=$(PKG_REGULATORY_MD5SUM)
+endef
+$(eval $(call Download,wireless-regdb))
+
+define Package/crda/description
+ This is the Central Regulatory Domain Agent for Linux. It serves one
+ purpose: tell Linux kernel what to enforce. In essence it is a udev
+ helper for communication between the kernel and userspace. You only
+ need to run this manually for debugging purposes. For manual changing
+ of regulatory domains use iw (iw reg set) or wpa_supplicant (feature
+ yet to be added).
+endef
+
+define Build/Compile
+ $(MAKE_VARS) \
+ $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
+ $(MAKE_FLAGS) \
+ USE_OPENSSL=1 \
+ REG_BIN="$(DL_DIR)/$(PKG_REGULATORY_SOURCE)" \
+ $(1)
+endef
+
+define Package/crda/install
+ $(INSTALL_DIR) $(1)/sbin
+ $(INSTALL_DIR) $(1)/etc/hotplug.d
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/platform
+ $(INSTALL_DIR) $(1)/usr/lib/crda
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/crda $(1)/sbin/
+ $(INSTALL_DATA) ./files/hotplug.rule $(1)/etc/hotplug.d/platform/10-regulatory
+ $(INSTALL_DATA) $(DL_DIR)/$(PKG_REGULATORY_SOURCE) $(1)/usr/lib/crda/regulatory.bin
+endef
+
+$(eval $(call BuildPackage,crda))
+