Matt Weber | 21b61de | 2013-09-19 10:17:52 -0500 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # |
| 3 | # iputils |
| 4 | # |
| 5 | ################################################################################ |
| 6 | |
Matt Weber | 837de17 | 2016-01-21 03:31:47 +0000 | [diff] [blame] | 7 | # The original upstream was forked to the github repository in 2014 to |
| 8 | # pull fixes from other distribution and centralize the changes after |
| 9 | # the upstream seemed to have gone dormant. The fork contains the |
| 10 | # latest changes including msul support, removing a libsysfs dependency |
| 11 | # and IPv6 updates. |
| 12 | # http://www.spinics.net/lists/netdev/msg279881.html |
| 13 | |
Bernd Kuhls | 8f5fcfc | 2016-06-05 19:52:02 +0200 | [diff] [blame] | 14 | IPUTILS_VERSION = 55828d1fef3fed7f07abcbf7be9282a9662e78c7 |
Matt Weber | 837de17 | 2016-01-21 03:31:47 +0000 | [diff] [blame] | 15 | IPUTILS_SITE = $(call github,iputils,iputils,$(IPUTILS_VERSION)) |
| 16 | IPUTILS_LICENSE = GPLv2+, BSD-3c, BSD-4c |
Matt Weber | 21b61de | 2013-09-19 10:17:52 -0500 | [diff] [blame] | 17 | # Only includes a license file for BSD |
| 18 | IPUTILS_LICENSE_FILES = ninfod/COPYING |
| 19 | |
| 20 | # Build after busybox so target ends up with this package's full |
| 21 | # versions of the applications instead of busybox applets. |
| 22 | ifeq ($(BR2_PACKAGE_BUSYBOX),y) |
| 23 | IPUTILS_DEPENDENCIES += busybox |
| 24 | endif |
| 25 | |
Matt Weber | 837de17 | 2016-01-21 03:31:47 +0000 | [diff] [blame] | 26 | IPUTILS_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) USE_SYSFS=no USE_IDN=no\ |
| 27 | CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" |
| 28 | |
| 29 | ifeq ($(BR2_PACKAGE_LIBCAP),y) |
| 30 | IPUTILS_MAKE_OPTS += USE_CAP=yes |
| 31 | IPUTILS_DEPENDENCIES += libcap |
| 32 | else |
| 33 | IPUTILS_MAKE_OPTS += USE_CAP=no |
| 34 | endif |
Matt Weber | 21b61de | 2013-09-19 10:17:52 -0500 | [diff] [blame] | 35 | |
Martin Bark | ca99ed1 | 2016-02-25 13:23:34 +0000 | [diff] [blame] | 36 | ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) |
| 37 | IPUTILS_MAKE_OPTS += USE_GCRYPT=yes |
| 38 | IPUTILS_DEPENDENCIES += libgcrypt |
Arnout Vandecappelle | 129fe1b | 2016-08-25 22:13:36 +0200 | [diff] [blame] | 39 | # When gettext is enabled (BR2_PACKAGE_GETTEXT=y), and provides libintl |
| 40 | # (BR2_NEEDS_GETTEXT=y), libgpg-error will link with libintl, and libgpg-error |
| 41 | # is pulled in by libgcrypt. Since iputils doesn't use libtool, we have to link |
Peter Korsgaard | 0fc926d | 2016-08-26 11:56:11 +0200 | [diff] [blame] | 42 | # with libintl explicitly for static linking. |
Arnout Vandecappelle | 129fe1b | 2016-08-25 22:13:36 +0200 | [diff] [blame] | 43 | ifeq ($(BR2_STATIC_LIBS)$(BR2_NEEDS_GETTEXT)$(BR2_PACKAGE_GETTEXT),yyy) |
| 44 | IPUTILS_MAKE_OPTS += ADDLIB='-lintl' |
| 45 | endif |
Martin Bark | ca99ed1 | 2016-02-25 13:23:34 +0000 | [diff] [blame] | 46 | else |
| 47 | IPUTILS_MAKE_OPTS += USE_GCRYPT=no |
| 48 | endif |
| 49 | |
Martin Bark | 73b5611 | 2016-02-25 13:23:33 +0000 | [diff] [blame] | 50 | ifeq ($(BR2_PACKAGE_NETTLE),y) |
| 51 | IPUTILS_MAKE_OPTS += USE_NETTLE=yes |
| 52 | IPUTILS_DEPENDENCIES += nettle |
| 53 | else |
| 54 | IPUTILS_MAKE_OPTS += USE_NETTLE=no |
| 55 | endif |
| 56 | |
Martin Bark | eae103e | 2016-02-25 13:23:32 +0000 | [diff] [blame] | 57 | ifeq ($(BR2_PACKAGE_OPENSSL),y) |
| 58 | IPUTILS_MAKE_OPTS += USE_CRYPTO=yes |
| 59 | IPUTILS_DEPENDENCIES += openssl |
| 60 | else |
| 61 | IPUTILS_MAKE_OPTS += USE_CRYPTO=no |
| 62 | endif |
| 63 | |
Matt Weber | 21b61de | 2013-09-19 10:17:52 -0500 | [diff] [blame] | 64 | define IPUTILS_BUILD_CMDS |
Gustavo Zacarias | e62d6cf | 2016-10-13 19:13:28 -0300 | [diff] [blame] | 65 | $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(IPUTILS_MAKE_OPTS) |
Matt Weber | 21b61de | 2013-09-19 10:17:52 -0500 | [diff] [blame] | 66 | endef |
| 67 | |
| 68 | define IPUTILS_INSTALL_TARGET_CMDS |
| 69 | $(INSTALL) -D -m 755 $(@D)/arping $(TARGET_DIR)/sbin/arping |
| 70 | $(INSTALL) -D -m 755 $(@D)/clockdiff $(TARGET_DIR)/bin/clockdiff |
| 71 | $(INSTALL) -D -m 755 $(@D)/ping $(TARGET_DIR)/bin/ping |
| 72 | $(INSTALL) -D -m 755 $(@D)/rarpd $(TARGET_DIR)/sbin/rarpd |
| 73 | $(INSTALL) -D -m 755 $(@D)/rdisc $(TARGET_DIR)/sbin/rdisc |
| 74 | $(INSTALL) -D -m 755 $(@D)/tftpd $(TARGET_DIR)/usr/sbin/in.tftpd |
| 75 | $(INSTALL) -D -m 755 $(@D)/tracepath $(TARGET_DIR)/bin/tracepath |
Gustavo Zacarias | 79ce08b | 2015-04-19 09:40:00 -0300 | [diff] [blame] | 76 | $(INSTALL) -D -m 755 $(@D)/traceroute6 $(TARGET_DIR)/bin/traceroute6 |
Matt Weber | 21b61de | 2013-09-19 10:17:52 -0500 | [diff] [blame] | 77 | endef |
| 78 | |
| 79 | $(eval $(generic-package)) |