Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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:=2
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall3.git
  13. PKG_SOURCE_DATE:=2017-11-07
  14. PKG_SOURCE_VERSION:=c4309372acc7e1bef8aa230269f7da1dec790e68
  15. PKG_MIRROR_HASH:=1699884d8499d01e433959185f79ff9eb69704de47885b996123374b8015b422
  16. PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
  17. PKG_LICENSE:=ISC
  18. PKG_CONFIG_DEPENDS := CONFIG_IPV6
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/firewall
  22. SECTION:=net
  23. CATEGORY:=Base system
  24. TITLE:=OpenWrt C Firewall
  25. DEPENDS:=+libubox +libubus +libuci +libip4tc +IPV6:libip6tc +libxtables +kmod-ipt-core +kmod-ipt-conntrack +IPV6:kmod-nf-conntrack6 +kmod-ipt-nat
  26. endef
  27. define Package/firewall/description
  28. This package provides a config-compatible C implementation of the UCI firewall.
  29. endef
  30. define Package/firewall/conffiles
  31. /etc/config/firewall
  32. /etc/firewall.user
  33. endef
  34. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  35. TARGET_LDFLAGS += -Wl,--gc-sections
  36. CMAKE_OPTIONS += $(if $(CONFIG_IPV6),,-DDISABLE_IPV6=1)
  37. define Package/firewall/install
  38. $(INSTALL_DIR) $(1)/sbin
  39. $(INSTALL_BIN) $(PKG_BUILD_DIR)/firewall3 $(1)/sbin/fw3
  40. $(INSTALL_DIR) $(1)/etc/init.d
  41. $(INSTALL_BIN) ./files/firewall.init $(1)/etc/init.d/firewall
  42. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  43. $(INSTALL_DATA) ./files/firewall.hotplug $(1)/etc/hotplug.d/iface/20-firewall
  44. $(INSTALL_DIR) $(1)/etc/config/
  45. $(INSTALL_DATA) ./files/firewall.config $(1)/etc/config/firewall
  46. $(INSTALL_DIR) $(1)/etc/
  47. $(INSTALL_DATA) ./files/firewall.user $(1)/etc/firewall.user
  48. endef
  49. $(eval $(call BuildPackage,firewall))