Root/package/crda/Makefile

1#
2# Copyright (C) 2009 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=crda
12PKG_RELEASE:=2
13PKG_VERSION:=1.1.0
14PKG_SOURCE_URL:=http://wireless.kernel.org/download/crda
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_MD5SUM:=6004584d2e39e899f7642b141dd72028
17PKG_BUILD_DEPENDS:=mac80211
18
19PKG_REGULATORY_NAME:=regulatory
20PKG_REGULATORY_VERSION:=2010.11.17
21PKG_REGULATORY_SOURCE_URL:=http://mirror2.openwrt.org/sources
22#PKG_REGULATORY_SOURCE_URL:=http://wireless.kernel.org/download/wireless-regdb/regulatory.bins
23PKG_REGULATORY_SOURCE:=$(PKG_REGULATORY_VERSION)-$(PKG_REGULATORY_NAME).bin
24PKG_REGULATORY_MD5SUM:=4a497f045d93a8d5b135f4d2816faa83
25
26include $(INCLUDE_DIR)/package.mk
27
28define Package/crda
29  SECTION:=net
30  CATEGORY:=Network
31  TITLE:=Central Regulatory Domain Agent (CRDA)
32  DEPENDS:=@LINUX_2_6 +hotplug2 +libnl-tiny
33  URL:=http://wireless.kernel.org/en/developers/Regulatory/CRDA
34endef
35
36define Download/wireless-regdb
37  FILE:=$(PKG_REGULATORY_SOURCE)
38  URL:=$(PKG_REGULATORY_SOURCE_URL)
39  VERSION:=$(PKG_REGULATORY_VERSION)
40  MD5SUM:=$(PKG_REGULATORY_MD5SUM)
41endef
42$(eval $(call Download,wireless-regdb))
43
44define Package/crda/description
45 This is the Central Regulatory Domain Agent for Linux. It serves one
46 purpose: tell Linux kernel what to enforce. In essence it is a udev
47 helper for communication between the kernel and userspace. You only
48 need to run this manually for debugging purposes. For manual changing
49 of regulatory domains use iw (iw reg set) or wpa_supplicant (feature
50 yet to be added).
51endef
52
53TARGET_CPPFLAGS := \
54    -I$(STAGING_DIR)/usr/include/libnl-tiny \
55    -D_GNU_SOURCE \
56    $(TARGET_CPPFLAGS)
57
58MAKE_FLAGS += \
59    NL1FOUND="" NL2FOUND=Y \
60    NLLIBNAME="libnl-tiny" \
61    NLLIBS="-lnl-tiny -lm" \
62    REG_BIN="$(DL_DIR)/$(PKG_REGULATORY_SOURCE)" \
63    crda
64
65define Package/crda/install
66    $(INSTALL_DIR) $(1)/sbin
67    $(INSTALL_DIR) $(1)/etc/hotplug.d
68    $(INSTALL_DIR) $(1)/etc/hotplug.d/platform
69    $(INSTALL_DIR) $(1)/usr/lib/crda
70    $(INSTALL_BIN) $(PKG_BUILD_DIR)/crda $(1)/sbin/
71    $(INSTALL_DATA) ./files/hotplug.rule $(1)/etc/hotplug.d/platform/10-regulatory
72    $(INSTALL_DATA) $(DL_DIR)/$(PKG_REGULATORY_SOURCE) $(1)/usr/lib/crda/regulatory.bin
73endef
74
75$(eval $(call BuildPackage,crda))
76
77

Archive Download this file



interactive