# Copyright (C) 2016 Khem Raj # Released under the MIT license (see COPYING.MIT for the terms) SUMMARY = "OpenWrt firewall configuration utility" HOMEPAGE = "http://git.openwrt.org/?p=project/firewall3.git;a=summary" LICENSE = "0BSD" LIC_FILES_CHKSUM = "file://main.c;beginline=1;endline=17;md5=2a8ffaa9ef41014f236ab859378e8900" SECTION = "base" DEPENDS = "libubox uci ubus iptables" SRC_URI = "git://git.openwrt.org/project/firewall3.git;protocol=https;branch=master \ " SRCREV = "12f6f143106257e0921c6ebbca2fe329cbeb3de6" S = "${WORKDIR}/git" inherit cmake pkgconfig openwrt openwrt-services openwrt-base-files SRCREV_openwrt = "${OPENWRT_SRCREV}" EXTRA_OECMAKE = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '-DDISABLE_IPV6=OFF', '-DDISABLE_IPV6=ON', d)}" CFLAGS += "-Wno-error=format-overflow" do_install:append() { install -d ${D}${sysconfdir} install -d ${D}${sysconfdir}/config install -d ${D}${sysconfdir}/init.d install -d ${D}${sysconfdir}/hotplug.d/iface install -d ${D}${base_sbindir} install -m 0755 ${WORKDIR}/git/openwrt/package/network/config/firewall/files/firewall.init ${D}${sysconfdir}/init.d/firewall install -m 0644 ${WORKDIR}/git/openwrt/package/network/config/firewall/files/firewall.hotplug ${D}${sysconfdir}/hotplug.d/iface/20-firewall install -m 0644 ${WORKDIR}/git/openwrt/package/network/config/firewall/files/firewall.config ${D}${sysconfdir}/config/firewall install -m 0644 ${WORKDIR}/git/openwrt/package/network/config/firewall/files/firewall.user ${D}${sysconfdir}/firewall.user ln -s ${sbindir}/firewall3 ${D}${base_sbindir}/fw3 # Be prepared for both procd and sysvinit/systemd style module loading install -dm 0755 ${D}${sysconfdir}/modules.d ${D}${sysconfdir}/modules-load.d if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'true', 'false', d)}" = "true" ]; then # Can't indent the here-document because leading spaces confuse # kmodloader cat >${D}${sysconfdir}/modules.d/40-ip6tables <${D}${sysconfdir}/modules.d/iptables-fw3 <