1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python{2_7,3_6,3_7} )
7 inherit autotools bash-completion-r1 gnome2-utils linux-info python-single-r1 systemd xdg-utils
9 DESCRIPTION="A firewall daemon with D-BUS interface providing a dynamic firewall"
10 HOMEPAGE="http://www.firewalld.org/"
11 SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
15 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
17 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
19 RDEPEND="${PYTHON_DEPS}
20 !!net-firewall/gshield
21 dev-python/dbus-python[${PYTHON_USEDEP}]
22 dev-python/decorator[${PYTHON_USEDEP}]
23 >=dev-python/python-slip-0.2.7[dbus,${PYTHON_USEDEP}]
24 dev-python/pygobject:3[${PYTHON_USEDEP}]
25 net-firewall/iptables[ipv6]
26 || ( net-firewall/iptables[nftables] net-firewall/ebtables )
29 || ( >=sys-apps/openrc-0.11.5 sys-apps/systemd )
32 dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}]
36 >=dev-util/intltool-0.35
39 RESTRICT="test" # bug 650760
42 local CONFIG_CHECK="~NF_CONNTRACK ~NF_CONNTRACK_IPV4 ~NF_CONNTRACK_IPV6 ~NETFILTER_XT_MATCH_CONNTRACK"
56 --with-iptables="${EPREFIX}/sbin/iptables" \
57 --with-ip6tables="${EPREFIX}/sbin/ip6tables" \
58 --with-iptables_restore="${EPREFIX}/sbin/iptables-restore" \
59 --with-ip6tables_restore="${EPREFIX}/sbin/ip6tables-restore" \
60 --with-ebtables="${EPREFIX}/sbin/ebtables" \
61 --with-ebtables_restore="${EPREFIX}/sbin/ebtables-restore" \
62 --with-nft="${EPREFIX}/sbin/nft" \
63 --with-systemd-unitdir="$(systemd_get_systemunitdir)" \
64 --with-bashcompletiondir="$(get_bashcompdir)"
72 rm -rf "${D}/etc/rc.d/" || die
73 rm -rf "${D}/etc/sysconfig/" || die
75 # For non-gui installs we need to remove GUI bits
77 rm -rf "${D}/etc/xdg/autostart" || die
78 rm -f "${D}/usr/bin/firewall-applet" || die
79 rm -f "${D}/usr/bin/firewall-config" || die
80 rm -rf "${D}/usr/share/applications" || die
81 rm -rf "${D}/usr/share/icons" || die
84 newinitd "${FILESDIR}"/firewalld.init firewalld
88 gnome2_schemas_savelist