Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright (C) 2015 OpenWrt.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=nftables
  8. PKG_VERSION:=0.9.2
  9. PKG_RELEASE:=1
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  11. PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
  12. PKG_HASH:=5cb66180143e6bfc774f4eb316206d40ac1cb6df269a90882404cbf7165513f5
  13. PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
  14. PKG_LICENSE:=GPL-2.0
  15. PKG_FIXUP:=autoreconf
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. DISABLE_NLS:=
  19. CONFIGURE_ARGS += \
  20. --disable-debug \
  21. --disable-man-doc \
  22. --with-mini-gmp \
  23. --without-cli \
  24. --disable-python \
  25. define Package/nftables
  26. SECTION:=net
  27. CATEGORY:=Network
  28. SUBMENU:=Firewall
  29. TITLE:=nftables packet filtering userspace utility
  30. DEPENDS:=+kmod-nft-core +libnftnl +PACKAGE_NFT_WITH_JSON:jansson
  31. URL:=http://netfilter.org/projects/nftables/
  32. endef
  33. define Package/nftables/config
  34. config PACKAGE_NFT_WITH_JSON
  35. bool "Build nftables with json support"
  36. depends on PACKAGE_nftables
  37. default n
  38. endef
  39. ifeq ($(CONFIG_PACKAGE_NFT_WITH_JSON),y)
  40. CONFIGURE_ARGS += --with-json
  41. endif
  42. define Package/nftables/install
  43. $(INSTALL_DIR) $(1)/usr/sbin
  44. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/nft $(1)/usr/sbin/
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  47. endef
  48. $(eval $(call BuildPackage,nftables))