blob: 21f5dcbe06e6346796d3bbbfbf41f316274b7a4d [file] [log] [blame]
Matt Weber21b61de2013-09-19 10:17:52 -05001################################################################################
2#
3# iputils
4#
5################################################################################
6
Matt Weber837de172016-01-21 03:31:47 +00007# 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 Kuhls8f5fcfc2016-06-05 19:52:02 +020014IPUTILS_VERSION = 55828d1fef3fed7f07abcbf7be9282a9662e78c7
Matt Weber837de172016-01-21 03:31:47 +000015IPUTILS_SITE = $(call github,iputils,iputils,$(IPUTILS_VERSION))
16IPUTILS_LICENSE = GPLv2+, BSD-3c, BSD-4c
Matt Weber21b61de2013-09-19 10:17:52 -050017# Only includes a license file for BSD
18IPUTILS_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.
22ifeq ($(BR2_PACKAGE_BUSYBOX),y)
23IPUTILS_DEPENDENCIES += busybox
24endif
25
Matt Weber837de172016-01-21 03:31:47 +000026IPUTILS_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) USE_SYSFS=no USE_IDN=no\
27 CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
28
29ifeq ($(BR2_PACKAGE_LIBCAP),y)
30IPUTILS_MAKE_OPTS += USE_CAP=yes
31IPUTILS_DEPENDENCIES += libcap
32else
33IPUTILS_MAKE_OPTS += USE_CAP=no
34endif
Matt Weber21b61de2013-09-19 10:17:52 -050035
Martin Barkca99ed12016-02-25 13:23:34 +000036ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
37IPUTILS_MAKE_OPTS += USE_GCRYPT=yes
38IPUTILS_DEPENDENCIES += libgcrypt
Arnout Vandecappelle129fe1b2016-08-25 22:13:36 +020039# 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 Korsgaard0fc926d2016-08-26 11:56:11 +020042# with libintl explicitly for static linking.
Arnout Vandecappelle129fe1b2016-08-25 22:13:36 +020043ifeq ($(BR2_STATIC_LIBS)$(BR2_NEEDS_GETTEXT)$(BR2_PACKAGE_GETTEXT),yyy)
44IPUTILS_MAKE_OPTS += ADDLIB='-lintl'
45endif
Martin Barkca99ed12016-02-25 13:23:34 +000046else
47IPUTILS_MAKE_OPTS += USE_GCRYPT=no
48endif
49
Martin Bark73b56112016-02-25 13:23:33 +000050ifeq ($(BR2_PACKAGE_NETTLE),y)
51IPUTILS_MAKE_OPTS += USE_NETTLE=yes
52IPUTILS_DEPENDENCIES += nettle
53else
54IPUTILS_MAKE_OPTS += USE_NETTLE=no
55endif
56
Martin Barkeae103e2016-02-25 13:23:32 +000057ifeq ($(BR2_PACKAGE_OPENSSL),y)
58IPUTILS_MAKE_OPTS += USE_CRYPTO=yes
59IPUTILS_DEPENDENCIES += openssl
60else
61IPUTILS_MAKE_OPTS += USE_CRYPTO=no
62endif
63
Matt Weber21b61de2013-09-19 10:17:52 -050064define IPUTILS_BUILD_CMDS
Gustavo Zacariase62d6cf2016-10-13 19:13:28 -030065 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(IPUTILS_MAKE_OPTS)
Matt Weber21b61de2013-09-19 10:17:52 -050066endef
67
68define 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 Zacarias79ce08b2015-04-19 09:40:00 -030076 $(INSTALL) -D -m 755 $(@D)/traceroute6 $(TARGET_DIR)/bin/traceroute6
Matt Weber21b61de2013-09-19 10:17:52 -050077endef
78
79$(eval $(generic-package))