2 # Copyright (C) 2013-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
11 PKG_VERSION
:=2015-07-27
12 PKG_RELEASE
:=$(PKG_SOURCE_VERSION
)
15 PKG_SOURCE_URL
=$(OPENWRT_GIT
)/project
/firewall3.git
16 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_SOURCE_VERSION
:=980b7859bbd1db1e5e46422fccccbce38f9809ab
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
).
tar.gz
19 PKG_MAINTAINER
:=Jo-Philipp Wich
<jow@openwrt.org
>
22 PKG_CONFIG_DEPENDS
:= CONFIG_IPV6
24 include $(INCLUDE_DIR
)/package.mk
25 include $(INCLUDE_DIR
)/cmake.mk
27 define Package
/firewall
30 TITLE
:=OpenWrt C Firewall
31 DEPENDS
:=+libubox
+libubus
+libuci
+libip4tc
+IPV6
:libip6tc
+libxtables
+kmod-ipt-core
+kmod-ipt-conntrack
+kmod-ipt-nat
34 define Package
/firewall
/description
35 This package provides a config-compatible C implementation of the UCI firewall.
38 define Package
/firewall
/conffiles
43 TARGET_CFLAGS
+= -ffunction-sections
-fdata-sections
44 TARGET_LDFLAGS
+= -Wl
,--gc-sections
45 CMAKE_OPTIONS
+= $(if
$(CONFIG_IPV6
),,-DDISABLE_IPV6
=1)
47 define Package
/firewall
/install
48 $(INSTALL_DIR
) $(1)/sbin
49 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/firewall3
$(1)/sbin
/fw3
50 $(INSTALL_DIR
) $(1)/etc
/init.d
51 $(INSTALL_BIN
) .
/files
/firewall.init
$(1)/etc
/init.d
/firewall
52 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
53 $(INSTALL_DATA
) .
/files
/firewall.hotplug
$(1)/etc
/hotplug.d
/iface
/20-firewall
54 $(INSTALL_DIR
) $(1)/etc
/config
/
55 $(INSTALL_DATA
) .
/files
/firewall.config
$(1)/etc
/config
/firewall
56 $(INSTALL_DIR
) $(1)/etc
/
57 $(INSTALL_DATA
) .
/files
/firewall.user
$(1)/etc
/firewall.user
60 $(eval
$(call BuildPackage
,firewall
))