Makefile 1.9 KB

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