Makefile 2.2 KB

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