Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #
  2. # Copyright (C) 2013-2016 OpenWrt.org
  3. # Copyright (C) 2016 LEDE project
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=firewall
  10. PKG_RELEASE:=3
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL=$(PROJECT_GIT)/firewall3.git
  13. PKG_SOURCE_DATE:=2022-02-17
  14. PKG_SOURCE_VERSION:=4cd7d4f36bea731bf901cb067456f1d460294926
  15. PKG_MIRROR_HASH:=ce9e8ac1bcf22afbb0a80c3da1a8e8e887851299681097e3dfbfc347f2c4c80f
  16. PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
  17. PKG_LICENSE:=ISC
  18. PKG_CONFIG_DEPENDS := CONFIG_IPV6
  19. PKG_BUILD_FLAGS:=gc-sections lto
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/firewall
  23. SECTION:=net
  24. CATEGORY:=Base system
  25. TITLE:=libreCMC C Firewall
  26. DEPENDS:=+libubox +libubus +libuci +libip4tc +IPV6:libip6tc +libiptext +IPV6:libiptext6 +libxtables +kmod-ipt-core +kmod-ipt-conntrack +IPV6:kmod-nf-conntrack6 +kmod-ipt-nat
  27. PROVIDES:=uci-firewall
  28. CONFLICTS:=firewall4
  29. endef
  30. define Package/firewall/description
  31. This package provides a config-compatible C implementation of the UCI firewall.
  32. endef
  33. define Package/firewall/conffiles
  34. /etc/config/firewall
  35. /etc/firewall.user
  36. endef
  37. CMAKE_OPTIONS += $(if $(CONFIG_IPV6),,-DDISABLE_IPV6=1)
  38. define Package/firewall/install
  39. $(INSTALL_DIR) $(1)/sbin
  40. $(INSTALL_BIN) $(PKG_BUILD_DIR)/firewall3 $(1)/sbin/fw3
  41. $(INSTALL_DIR) $(1)/etc/init.d
  42. $(INSTALL_BIN) ./files/firewall.init $(1)/etc/init.d/firewall
  43. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  44. $(INSTALL_CONF) ./files/firewall.hotplug $(1)/etc/hotplug.d/iface/20-firewall
  45. $(INSTALL_DIR) $(1)/etc/config/
  46. $(INSTALL_CONF) ./files/firewall.config $(1)/etc/config/firewall
  47. $(INSTALL_DIR) $(1)/etc/
  48. $(INSTALL_CONF) ./files/firewall.user $(1)/etc/firewall.user
  49. $(INSTALL_DIR) $(1)/usr/share/fw3
  50. $(INSTALL_CONF) $(PKG_BUILD_DIR)/helpers.conf $(1)/usr/share/fw3
  51. endef
  52. $(eval $(call BuildPackage,firewall))