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:=1
13PKG_VERSION:=1.1.1
14PKG_SOURCE_URL:=http://wireless.kernel.org/download/crda
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_MD5SUM:=5fc77af68b3e21736b8ef2f8b061c810
17
18PKG_REGULATORY_NAME:=regulatory
19PKG_REGULATORY_VERSION:=2011.04.28
20PKG_REGULATORY_SOURCE_URL:=http://wireless.kernel.org/download/wireless-regdb/regulatory.bins
21PKG_REGULATORY_SOURCE:=$(PKG_REGULATORY_VERSION)-$(PKG_REGULATORY_NAME).bin
22PKG_REGULATORY_MD5SUM:=1535e98bcaba732e2f8e8f62dac6f369
23
24include $(INCLUDE_DIR)/package.mk
25
26define Package/crda
27  SECTION:=net
28  CATEGORY:=Network
29  TITLE:=Central Regulatory Domain Agent (CRDA)
30  DEPENDS:=+libnl-tiny
31  URL:=http://wireless.kernel.org/en/developers/Regulatory/CRDA
32endef
33
34define Download/wireless-regdb
35  FILE:=$(PKG_REGULATORY_SOURCE)
36  URL:=$(PKG_REGULATORY_SOURCE_URL)
37  VERSION:=$(PKG_REGULATORY_VERSION)
38  MD5SUM:=$(PKG_REGULATORY_MD5SUM)
39endef
40$(eval $(call Download,wireless-regdb))
41
42define Package/crda/description
43 This is the Central Regulatory Domain Agent for Linux. It serves one
44 purpose: tell Linux kernel what to enforce. In essence it is a udev
45 helper for communication between the kernel and userspace. You only
46 need to run this manually for debugging purposes. For manual changing
47 of regulatory domains use iw (iw reg set) or wpa_supplicant (feature
48 yet to be added).
49endef
50
51TARGET_CPPFLAGS := \
52    -I$(STAGING_DIR)/usr/include/libnl-tiny \
53    -D_GNU_SOURCE \
54    $(TARGET_CPPFLAGS)
55
56MAKE_FLAGS += \
57    NL1FOUND="" NL2FOUND=Y \
58    NLLIBNAME="libnl-tiny" \
59    NLLIBS="-lnl-tiny -lm" \
60    REG_BIN="$(DL_DIR)/$(PKG_REGULATORY_SOURCE)" \
61    crda
62
63define Package/crda/install
64    $(INSTALL_DIR) $(1)/sbin
65    $(INSTALL_DIR) $(1)/etc/hotplug.d
66    $(INSTALL_DIR) $(1)/etc/hotplug.d/platform
67    $(INSTALL_DIR) $(1)/usr/lib/crda
68    $(INSTALL_BIN) $(PKG_BUILD_DIR)/crda $(1)/sbin/
69    $(INSTALL_DATA) ./files/hotplug.rule $(1)/etc/hotplug.d/platform/10-regulatory
70    $(INSTALL_DATA) $(DL_DIR)/$(PKG_REGULATORY_SOURCE) $(1)/usr/lib/crda/regulatory.bin
71endef
72
73$(eval $(call BuildPackage,crda))
74
75

Archive Download this file



interactive