Makefile 2.2 KB

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