浏览代码

nftables: allow to build with json support

Signed-off-by: Rosy Song <[email protected]>
Rosy Song 7 年之前
父节点
当前提交
f30583c41d
共有 1 个文件被更改,包括 12 次插入1 次删除
  1. 12 1
      package/network/utils/nftables/Makefile

+ 12 - 1
package/network/utils/nftables/Makefile

@@ -34,10 +34,21 @@ define Package/nftables
   CATEGORY:=Network
   CATEGORY:=Network
   SUBMENU:=Firewall
   SUBMENU:=Firewall
   TITLE:=nftables packet filtering userspace utility
   TITLE:=nftables packet filtering userspace utility
-  DEPENDS:=+kmod-nft-core +libnftnl
+  DEPENDS:=+kmod-nft-core +libnftnl +PACKAGE_NFT_WITH_JSON:jansson
   URL:=http://netfilter.org/projects/nftables/
   URL:=http://netfilter.org/projects/nftables/
 endef
 endef
 
 
+define Package/nftables/config
+	config PACKAGE_NFT_WITH_JSON
+		bool "Build nftables with json support"
+		depends on PACKAGE_nftables
+		default n
+endef
+
+ifeq ($(CONFIG_PACKAGE_NFT_WITH_JSON),y)
+CONFIGURE_ARGS += --with-json
+endif
+
 define Package/nftables/install
 define Package/nftables/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/nft $(1)/usr/sbin/
 	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/nft $(1)/usr/sbin/