net-tools.mk 1.3 KB

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