1
0

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:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL=$(LEDE_GIT)/project/firewall3.git
  13. PKG_SOURCE_DATE:=2017-05-27
  14. PKG_SOURCE_VERSION:=a4d98aea373e04f3fdc3c492c1688ba52ce490a9
  15. PKG_MIRROR_HASH:=55402b1e6bb471f6aed599c61c1c63b58212f5789f094d78247646fc0a7cf435
  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 +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))