diff options
author | 2020-08-08 17:20:50 +0300 | |
---|---|---|
committer | 2020-08-08 17:20:50 +0300 | |
commit | c62a1ebc509c9a945bb18242c4a9deea7a1e9978 (patch) | |
tree | 79e6467e77ca42a463574b15fc6e26bf267831c4 /net-firewall/sanewall/sanewall-1.1.6-r3.ebuild | |
parent | net-firewall/firehol: migrate to sys-apps/kmod (diff) | |
download | gentoo-c62a1ebc509c9a945bb18242c4a9deea7a1e9978.tar.gz gentoo-c62a1ebc509c9a945bb18242c4a9deea7a1e9978.tar.bz2 gentoo-c62a1ebc509c9a945bb18242c4a9deea7a1e9978.zip |
net-firewall/sanewall: migrate to sys-apps/kmod
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to 'net-firewall/sanewall/sanewall-1.1.6-r3.ebuild')
-rw-r--r-- | net-firewall/sanewall/sanewall-1.1.6-r3.ebuild | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/net-firewall/sanewall/sanewall-1.1.6-r3.ebuild b/net-firewall/sanewall/sanewall-1.1.6-r3.ebuild new file mode 100644 index 000000000000..0fe04aa29826 --- /dev/null +++ b/net-firewall/sanewall/sanewall-1.1.6-r3.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-info + +DESCRIPTION="iptables firewall generator (fork of firehol)" +HOMEPAGE="https://www.sanewall.org" +SRC_URI="https://download.sanewall.org/releases/${PV}/${P}.tar.xz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + net-firewall/iptables[ipv6] + sys-apps/iproute2[-minimal] + sys-apps/kmod[tools] + sys-apps/net-tools + || ( + net-misc/wget + net-misc/curl + ) +" +DEPEND="" + +pkg_setup() { + local KCONFIG_OPTS="~NF_CONNTRACK_IPV4 ~NF_CONNTRACK_MARK ~NF_NAT ~NF_NAT_FTP ~NF_NAT_IRC \ + ~IP_NF_IPTABLES ~IP_NF_FILTER ~IP_NF_TARGET_REJECT ~IP_NF_TARGET_LOG ~IP_NF_TARGET_ULOG \ + ~IP_NF_TARGET_MASQUERADE ~IP_NF_TARGET_REDIRECT ~IP_NF_MANGLE \ + ~NETFILTER_XT_MATCH_LIMIT ~NETFILTER_XT_MATCH_STATE ~NETFILTER_XT_MATCH_OWNER" + + get_version + if [[ ${KV_PATCH} -ge 25 ]] ; then + CONFIG_CHECK="~NF_CONNTRACK ${KCONFIG_OPTS}" + else + CONFIG_CHECK="~NF_CONNTRACK_ENABLED ${KCONFIG_OPTS}" + fi + linux-info_pkg_setup +} + +src_install() { + default + newconfd "${FILESDIR}"/${PN}.confd ${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} +} + +pkg_postinst() { + # install default configuration if it doesn't exist + if [[ ! -e "${ROOT}"/etc/${PN}/${PN}.conf ]] ; then + einfo "Installing a sample configuration to ${ROOT}/etc/${PN}/${PN}.conf" + cp "${ROOT}"/etc/${PN}/${PN}.conf.example "${ROOT}"/etc/${PN}/${PN}.conf || die + fi +} |