Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #
  2. # Copyright (C) 2013-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=firewall
  9. PKG_VERSION:=2015-07-27
  10. PKG_RELEASE:=$(PKG_SOURCE_VERSION)
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=git://nbd.name/firewall3.git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_VERSION:=980b7859bbd1db1e5e46422fccccbce38f9809ab
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  16. PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
  17. PKG_LICENSE:=ISC
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. define Package/firewall
  21. SECTION:=net
  22. CATEGORY:=Base system
  23. TITLE:=OpenWrt C Firewall
  24. DEPENDS:=+libubox +libubus +libuci +libip4tc +IPV6:libip6tc +libxtables +kmod-ipt-core +kmod-ipt-conntrack +kmod-ipt-nat
  25. endef
  26. define Package/firewall/description
  27. This package provides a config-compatible C implementation of the UCI firewall.
  28. endef
  29. define Package/firewall/conffiles
  30. /etc/config/firewall
  31. /etc/firewall.user
  32. endef
  33. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  34. TARGET_LDFLAGS += -Wl,--gc-sections
  35. CMAKE_OPTIONS += $(if $(CONFIG_IPV6),,-DDISABLE_IPV6=1)
  36. define Package/firewall/install
  37. $(INSTALL_DIR) $(1)/sbin
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/firewall3 $(1)/sbin/fw3
  39. $(INSTALL_DIR) $(1)/etc/init.d
  40. $(INSTALL_BIN) ./files/firewall.init $(1)/etc/init.d/firewall
  41. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  42. $(INSTALL_DATA) ./files/firewall.hotplug $(1)/etc/hotplug.d/iface/20-firewall
  43. $(INSTALL_DIR) $(1)/etc/config/
  44. $(INSTALL_DATA) ./files/firewall.config $(1)/etc/config/firewall
  45. $(INSTALL_DIR) $(1)/etc/
  46. $(INSTALL_DATA) ./files/firewall.user $(1)/etc/firewall.user
  47. endef
  48. $(eval $(call BuildPackage,firewall))