Makefile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #
  2. # Copyright (C) 2006-2014 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. PKG_NAME:=wireless-tools
  9. PKG_CPE_ID:=cpe:/a:wireless_tools_project:wireless_tools
  10. PKG_VERSION:=29
  11. PKG_MINOR:=
  12. PKG_RELEASE:=6
  13. PKG_SOURCE:=wireless_tools.$(PKG_VERSION)$(PKG_MINOR).tar.gz
  14. PKG_SOURCE_URL:=https://hewlettpackard.github.io/wireless-tools
  15. PKG_HASH:=6fb80935fe208538131ce2c4178221bab1078a1656306bce8909c19887e2e5a1
  16. TAR_OPTIONS += || true
  17. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  18. PKG_LICENSE:=GPL-2.0
  19. PKG_BUILD_DIR:=$(BUILD_DIR)/wireless_tools.$(PKG_VERSION)
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/wireless-tools/Default
  22. URL:=http://hplabs.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
  23. endef
  24. define Package/wireless-tools
  25. $(call Package/wireless-tools/Default)
  26. SECTION:=net
  27. CATEGORY:=Base system
  28. TITLE:=Tools for manipulating Linux Wireless Extensions
  29. endef
  30. define Package/wireless-tools/description
  31. This package contains a collection of tools for configuring wireless
  32. adapters implementing the "Linux Wireless Extensions".
  33. endef
  34. define Package/libiw
  35. $(call Package/wireless-tools/Default)
  36. SECTION:=libs
  37. CATEGORY:=Libraries
  38. TITLE:=Library for manipulating Linux Wireless Extensions
  39. ABI_VERSION:=29
  40. endef
  41. define Package/libiw/description
  42. This package contains a library for manipulating
  43. "Linux Wireless Extensions".
  44. endef
  45. define Build/Compile
  46. rm -rf $(PKG_INSTALL_DIR)
  47. mkdir -p $(PKG_INSTALL_DIR)
  48. $(MAKE) -C $(PKG_BUILD_DIR) \
  49. $(TARGET_CONFIGURE_OPTS) \
  50. CFLAGS="$(TARGET_CFLAGS) -I." \
  51. BUILD_WE_ESSENTIAL=y \
  52. LIBS="-lm -Wl,--gc-sections" \
  53. libiw.so.$(PKG_VERSION) iwmulticall
  54. $(MAKE) -C $(PKG_BUILD_DIR) \
  55. PREFIX="$(PKG_INSTALL_DIR)" \
  56. INSTALL_DIR="$(PKG_INSTALL_DIR)/usr/sbin" \
  57. INSTALL_LIB="$(PKG_INSTALL_DIR)/usr/lib" \
  58. install-iwmulticall
  59. endef
  60. define Build/InstallDev
  61. mkdir -p $(1)/usr/include
  62. $(CP) $(PKG_BUILD_DIR)/{iwlib,wireless}.h $(1)/usr/include/
  63. mkdir -p $(1)/usr/lib
  64. $(CP) $(PKG_BUILD_DIR)/libiw.so* $(1)/usr/lib/
  65. $(LN) libiw.so.$(PKG_VERSION) $(1)/usr/lib/libiw.so
  66. endef
  67. define Package/wireless-tools/install
  68. $(INSTALL_DIR) $(1)/usr/sbin
  69. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iwconfig $(1)/usr/sbin/
  70. $(LN) iwconfig $(1)/usr/sbin/iwlist
  71. $(LN) iwconfig $(1)/usr/sbin/iwpriv
  72. endef
  73. define Package/libiw/install
  74. $(INSTALL_DIR) $(1)/usr/lib
  75. $(CP) $(PKG_BUILD_DIR)/libiw.so.* $(1)/usr/lib/
  76. endef
  77. $(eval $(call BuildPackage,libiw))
  78. $(eval $(call BuildPackage,wireless-tools))