net-tools.mk 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ################################################################################
  2. #
  3. # net-tools
  4. #
  5. ################################################################################
  6. NET_TOOLS_VERSION = 2.10
  7. NET_TOOLS_SOURCE = net-tools-$(NET_TOOLS_VERSION).tar.xz
  8. NET_TOOLS_SITE = http://downloads.sourceforge.net/project/net-tools
  9. NET_TOOLS_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
  10. NET_TOOLS_LICENSE = GPL-2.0+
  11. NET_TOOLS_LICENSE_FILES = COPYING
  12. NET_TOOLS_CPE_ID_VALID = YES
  13. define NET_TOOLS_CONFIGURE_CMDS
  14. (cd $(@D); yes "" | ./configure.sh config.in )
  15. endef
  16. # Enable I18N when appropriate
  17. ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
  18. define NET_TOOLS_ENABLE_I18N
  19. $(SED) 's:I18N 0:I18N 1:' $(@D)/config.h
  20. endef
  21. endif
  22. # Enable IPv6
  23. define NET_TOOLS_ENABLE_IPV6
  24. $(SED) 's:_AFINET6 0:_AFINET6 1:' $(@D)/config.h
  25. endef
  26. NET_TOOLS_POST_CONFIGURE_HOOKS += NET_TOOLS_ENABLE_I18N NET_TOOLS_ENABLE_IPV6
  27. define NET_TOOLS_BUILD_CMDS
  28. $(TARGET_CONFIGURE_OPTS) \
  29. LDFLAGS="$(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)" \
  30. $(MAKE) -C $(@D)
  31. endef
  32. # ifconfig & route reside in /sbin for busybox, so ensure we don't end
  33. # up with two versions of those.
  34. define NET_TOOLS_INSTALL_TARGET_CMDS
  35. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
  36. mv -f $(TARGET_DIR)/bin/ifconfig $(TARGET_DIR)/sbin/ifconfig
  37. mv -f $(TARGET_DIR)/bin/route $(TARGET_DIR)/sbin/route
  38. endef
  39. $(eval $(generic-package))