nftables.mk 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ################################################################################
  2. #
  3. # nftables
  4. #
  5. ################################################################################
  6. NFTABLES_VERSION = 0.9.6
  7. NFTABLES_SOURCE = nftables-$(NFTABLES_VERSION).tar.bz2
  8. NFTABLES_SITE = https://www.netfilter.org/projects/nftables/files
  9. NFTABLES_DEPENDENCIES = libmnl libnftnl host-pkgconf $(TARGET_NLS_DEPENDENCIES)
  10. NFTABLES_LICENSE = GPL-2.0
  11. NFTABLES_LICENSE_FILES = COPYING
  12. NFTABLES_CONF_OPTS = --disable-man-doc --disable-pdf-doc
  13. ifeq ($(BR2_PACKAGE_GMP),y)
  14. NFTABLES_DEPENDENCIES += gmp
  15. NFTABLES_CONF_OPTS += --without-mini-gmp
  16. else
  17. NFTABLES_CONF_OPTS += --with-mini-gmp
  18. endif
  19. ifeq ($(BR2_PACKAGE_READLINE),y)
  20. NFTABLES_DEPENDENCIES += readline
  21. NFTABLES_LIBS += -lncurses
  22. else
  23. NFTABLES_CONF_OPTS += --without-cli
  24. endif
  25. ifeq ($(BR2_PACKAGE_JANSSON),y)
  26. NFTABLES_DEPENDENCIES += jansson
  27. NFTABLES_CONF_OPTS += --with-json
  28. else
  29. NFTABLES_CONF_OPTS += --without-json
  30. endif
  31. ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
  32. NFTABLES_CONF_OPTS += --enable-python
  33. NFTABLES_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,python3)
  34. else
  35. NFTABLES_CONF_OPTS += --disable-python
  36. endif
  37. ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_LIBNFTNL_JSON),yy)
  38. NFTABLES_LIBS += -ljansson -lm
  39. endif
  40. NFTABLES_CONF_ENV = LIBS="$(NFTABLES_LIBS)"
  41. define NFTABLES_LINUX_CONFIG_FIXUPS
  42. $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER)
  43. $(call KCONFIG_ENABLE_OPT,CONFIG_NF_TABLES)
  44. $(call KCONFIG_ENABLE_OPT,CONFIG_NF_TABLES_INET)
  45. endef
  46. $(eval $(autotools-package))