python-treq: bump to version 16.12.0
[buildroot-gz.git] / package / iputils / iputils.mk
blob21f5dcbe06e6346796d3bbbfbf41f316274b7a4d
1 ################################################################################
3 # iputils
5 ################################################################################
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
14 IPUTILS_VERSION = 55828d1fef3fed7f07abcbf7be9282a9662e78c7
15 IPUTILS_SITE = $(call github,iputils,iputils,$(IPUTILS_VERSION))
16 IPUTILS_LICENSE = GPLv2+, BSD-3c, BSD-4c
17 # Only includes a license file for BSD
18 IPUTILS_LICENSE_FILES = ninfod/COPYING
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
26 IPUTILS_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) USE_SYSFS=no USE_IDN=no\
27 CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
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
36 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
37 IPUTILS_MAKE_OPTS += USE_GCRYPT=yes
38 IPUTILS_DEPENDENCIES += libgcrypt
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
42 # with libintl explicitly for static linking.
43 ifeq ($(BR2_STATIC_LIBS)$(BR2_NEEDS_GETTEXT)$(BR2_PACKAGE_GETTEXT),yyy)
44 IPUTILS_MAKE_OPTS += ADDLIB='-lintl'
45 endif
46 else
47 IPUTILS_MAKE_OPTS += USE_GCRYPT=no
48 endif
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
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
64 define IPUTILS_BUILD_CMDS
65 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(IPUTILS_MAKE_OPTS)
66 endef
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
76 $(INSTALL) -D -m 755 $(@D)/traceroute6 $(TARGET_DIR)/bin/traceroute6
77 endef
79 $(eval $(generic-package))