Makefile 2.4 KB

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