python-pyasn: bump to version 1.6.0b1
[buildroot-gz.git] / package / iproute2 / iproute2.mk
blob5ea5299bd3c1f3c9e271c7164d167b9d7fce8675
1 ################################################################################
3 # iproute2
5 ################################################################################
7 IPROUTE2_VERSION = 4.9.0
8 IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.xz
9 IPROUTE2_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/net/iproute2
10 IPROUTE2_DEPENDENCIES = host-bison host-flex host-pkgconf \
11 $(if $(BR2_PACKAGE_LIBMNL),libmnl)
12 IPROUTE2_LICENSE = GPLv2
13 IPROUTE2_LICENSE_FILES = COPYING
15 # If both iproute2 and busybox are selected, make certain we win
16 # the fight over who gets to have their utils actually installed.
17 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
18 IPROUTE2_DEPENDENCIES += busybox
19 endif
21 ifeq ($(BR2_PACKAGE_ELFUTILS),y)
22 IPROUTE2_DEPENDENCIES += elfutils
23 endif
25 # If we've got iptables enable xtables support for tc
26 ifeq ($(BR2_PACKAGE_IPTABLES)x$(BR2_STATIC_LIBS),yx)
27 IPROUTE2_DEPENDENCIES += iptables
28 define IPROUTE2_WITH_IPTABLES
29 # Makefile is busted so it never passes IPT_LIB_DIR properly
30 $(SED) "s/-DIPT/-DXT/" $(@D)/tc/Makefile
31 endef
32 else
33 define IPROUTE2_WITH_IPTABLES
34 # em_ipset needs xtables, but configure misdetects it
35 echo "TC_CONFIG_IPSET:=n" >>$(@D)/Config
36 echo "TC_CONFIG_XT:=n" >>$(@D)/Config
37 endef
38 endif
40 # arpd needs BerkeleyDB and links against pthread
41 ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
42 IPROUTE2_DEPENDENCIES += berkeleydb
43 else
44 define IPROUTE2_DISABLE_ARPD
45 echo "HAVE_BERKELEY_DB:=n" >> $(@D)/Config
46 endef
47 endif
49 # ifcfg needs bash
50 ifeq ($(BR2_PACKAGE_BASH),)
51 define IPROUTE2_REMOVE_IFCFG
52 rm -f $(TARGET_DIR)/sbin/ifcfg
53 endef
54 endif
56 define IPROUTE2_CONFIGURE_CMDS
57 $(SED) 's/gcc/$$CC $$CFLAGS/g' $(@D)/configure
58 cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure
59 $(IPROUTE2_DISABLE_ARPD)
60 $(IPROUTE2_WITH_IPTABLES)
61 endef
63 define IPROUTE2_BUILD_CMDS
64 $(SED) 's/$$(CCOPTS)//' $(@D)/netem/Makefile
65 $(TARGET_MAKE_ENV) LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) \
66 DBM_INCLUDE="$(STAGING_DIR)/usr/include" \
67 CCOPTS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
68 SHARED_LIBS="$(if $(BR2_STATIC_LIBS),n,y)" -C $(@D)
69 endef
71 define IPROUTE2_INSTALL_TARGET_CMDS
72 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" \
73 SBINDIR=/sbin \
74 DOCDIR=/usr/share/doc/iproute2-$(IPROUTE2_VERSION) \
75 MANDIR=/usr/share/man install
76 $(IPROUTE2_REMOVE_IFCFG)
77 endef
79 $(eval $(generic-package))