Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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:=5
  12. PKG_SOURCE:=wireless_tools.$(PKG_VERSION)$(PKG_MINOR).tar.gz
  13. PKG_SOURCE_URL:=http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux
  14. PKG_MD5SUM:=e06c222e186f7cc013fd272d023710cb
  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. endef
  39. define Package/libiw/description
  40. This package contains a library for manipulating
  41. "Linux Wireless Extensions".
  42. endef
  43. define Build/Compile
  44. rm -rf $(PKG_INSTALL_DIR)
  45. mkdir -p $(PKG_INSTALL_DIR)
  46. $(MAKE) -C $(PKG_BUILD_DIR) \
  47. $(TARGET_CONFIGURE_OPTS) \
  48. CFLAGS="$(TARGET_CFLAGS) -I." \
  49. BUILD_WE_ESSENTIAL=y \
  50. LIBS="-lm -Wl,--gc-sections" \
  51. libiw.so.$(PKG_VERSION) iwmulticall
  52. $(MAKE) -C $(PKG_BUILD_DIR) \
  53. PREFIX="$(PKG_INSTALL_DIR)" \
  54. INSTALL_DIR="$(PKG_INSTALL_DIR)/usr/sbin" \
  55. INSTALL_LIB="$(PKG_INSTALL_DIR)/usr/lib" \
  56. install-iwmulticall
  57. endef
  58. define Build/InstallDev
  59. mkdir -p $(1)/usr/include
  60. $(CP) $(PKG_BUILD_DIR)/{iwlib,wireless}.h $(1)/usr/include/
  61. mkdir -p $(1)/usr/lib
  62. $(CP) $(PKG_BUILD_DIR)/libiw.so* $(1)/usr/lib/
  63. $(LN) libiw.so.$(PKG_VERSION) $(1)/usr/lib/libiw.so
  64. endef
  65. define Package/wireless-tools/install
  66. $(INSTALL_DIR) $(1)/usr/sbin
  67. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iwconfig $(1)/usr/sbin/
  68. $(LN) iwconfig $(1)/usr/sbin/iwlist
  69. $(LN) iwconfig $(1)/usr/sbin/iwpriv
  70. endef
  71. define Package/libiw/install
  72. $(INSTALL_DIR) $(1)/usr/lib
  73. $(CP) $(PKG_BUILD_DIR)/libiw.so.* $(1)/usr/lib/
  74. endef
  75. $(eval $(call BuildPackage,wireless-tools))
  76. $(eval $(call BuildPackage,libiw))