1
0

Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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.0
  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:=ad8181b5fcb9ca572f444bed54018749588522ee97e4c21922648bb78d7e7e91
  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. define Package/nftables
  25. SECTION:=net
  26. CATEGORY:=Network
  27. SUBMENU:=Firewall
  28. TITLE:=nftables packet filtering userspace utility
  29. DEPENDS:=+kmod-nft-core +libnftnl +PACKAGE_NFT_WITH_JSON:jansson
  30. URL:=http://netfilter.org/projects/nftables/
  31. endef
  32. define Package/nftables/config
  33. config PACKAGE_NFT_WITH_JSON
  34. bool "Build nftables with json support"
  35. depends on PACKAGE_nftables
  36. default n
  37. endef
  38. ifeq ($(CONFIG_PACKAGE_NFT_WITH_JSON),y)
  39. CONFIGURE_ARGS += --with-json
  40. endif
  41. define Package/nftables/install
  42. $(INSTALL_DIR) $(1)/usr/sbin
  43. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/nft $(1)/usr/sbin/
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  46. endef
  47. $(eval $(call BuildPackage,nftables))