summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFerenc Erki <erkiferenc@gmail.com>2020-01-04 20:34:54 +0100
committerJoonas Niilola <juippis@gentoo.org>2020-01-09 08:01:05 +0200
commit55830aad1bcc551fa47569c6a24fe6baec598d2e (patch)
treeffda117499a265e4ca4621ae8cc9f0e39ddda83e /net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.0.ebuild
parentmedia-tv/plex-media-server: Bump to 1.18.4 (diff)
downloadgentoo-55830aad1bcc551fa47569c6a24fe6baec598d2e.tar.gz
gentoo-55830aad1bcc551fa47569c6a24fe6baec598d2e.tar.bz2
gentoo-55830aad1bcc551fa47569c6a24fe6baec598d2e.zip
net-firewall/arno-iptables-firewall: bump version to 2.1.0
Closes: https://bugs.gentoo.org/704790 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Ferenc Erki <erkiferenc@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/14243 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.0.ebuild')
-rw-r--r--net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.0.ebuild98
1 files changed, 98 insertions, 0 deletions
diff --git a/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.0.ebuild b/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.0.ebuild
new file mode 100644
index 000000000000..b5cdcda849b2
--- /dev/null
+++ b/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit readme.gentoo-r1 systemd
+
+DESCRIPTION="Arno's iptables firewall script"
+HOMEPAGE="https://rocky.eld.leidenuniv.nl"
+
+MY_PV=$(ver_rs 3 -)
+MY_PV=${MY_PV/rc/RC}
+SRC_URI="https://github.com/${PN}/aif/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+plugins rsyslog"
+
+DEPEND=""
+RDEPEND="net-firewall/ipset
+ net-firewall/iptables
+ sys-apps/coreutils
+ sys-apps/iproute2
+ plugins? ( net-dns/bind-tools )"
+
+S="${WORKDIR}/aif-${MY_PV}"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="You will need to configure /etc/${PN}/firewall.conf
+before using this package. To start the script, run:
+
+/etc/init.d/${PN} start (for OpenRC)
+systemctl start ${PN} (for systemd)
+
+If you want to start this script at boot, run:
+
+rc-update add ${PN} default (for OpenRC)
+systemctl enable ${PN} (for systemd)"
+
+src_prepare() {
+ sed -i -e 's:/usr/local/share/:/usr/libexec/:' \
+ etc/"${PN}"/firewall.conf || die "Sed failed!"
+ sed -i -e 's:/usr/local/sbin/:/usr/sbin/:' \
+ lib/systemd/system/"${PN}.service" || die "Sed failed!"
+ eapply_user
+}
+
+src_install() {
+ insinto /etc/"${PN}"
+ doins etc/"${PN}"/firewall.conf
+ doins etc/"${PN}"/custom-rules
+
+ doinitd "${FILESDIR}/${PN}"
+ systemd_dounit lib/systemd/system/"${PN}.service"
+
+ dobin bin/arno-fwfilter
+ dosbin bin/"${PN}"
+
+ insinto /usr/libexec/"${PN}"
+ doins share/"${PN}"/environment
+
+ dodoc CHANGELOG README
+ readme.gentoo_create_doc
+
+ if use plugins
+ then
+ insinto /etc/"${PN}"/plugins
+ doins etc/"${PN}"/plugins/*
+
+ insinto /usr/libexec/"${PN}"/plugins
+ doins share/"${PN}"/plugins/*.plugin
+
+ exeinto /usr/libexec/"${PN}"/plugins
+ doexe share/"${PN}"/plugins/dyndns-host-open-helper
+ doexe share/"${PN}"/plugins/traffic-accounting-helper
+ doexe share/"${PN}"/plugins/traffic-accounting-log-rotate
+ doexe share/"${PN}"/plugins/traffic-accounting-show
+
+ docinto plugins
+ dodoc share/"${PN}"/plugins/*.CHANGELOG
+ fi
+
+ if use rsyslog
+ then
+ insinto /etc/rsyslog.d
+ newins etc/rsyslog.d/"${PN}".conf 60-"${PN}".conf
+ fi
+
+ doman share/man/man1/arno-fwfilter.1 \
+ share/man/man8/"${PN}".8
+}
+
+pkg_postinst () {
+ ewarn "When you stop this script, all firewall rules are flushed!"
+ ewarn "Make sure to not use multiple firewall scripts simultaneously"
+ ewarn "unless you know what you are doing!"
+ readme.gentoo_print_elog
+}