summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2013-05-18 09:09:18 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2013-05-18 09:09:18 +0000
commit2e2ec6510a2c7a1adcddde6a0915c5928889a14d (patch)
treea43275292a12ddd91fd0e31aee08451c95eaafb2 /net-firewall/arno-iptables-firewall
parentVersion bump. (diff)
downloadgentoo-2-2e2ec6510a2c7a1adcddde6a0915c5928889a14d.tar.gz
gentoo-2-2e2ec6510a2c7a1adcddde6a0915c5928889a14d.tar.bz2
gentoo-2-2e2ec6510a2c7a1adcddde6a0915c5928889a14d.zip
Cleanup, EAPI5, initscript and other fixes thanks to Ferenc Erki <erkiferenc@gmail.com>. Bug #465114
(Portage version: 2.1.11.63/cvs/Linux x86_64, signed Manifest commit with key C2BA7F3C!)
Diffstat (limited to 'net-firewall/arno-iptables-firewall')
-rw-r--r--net-firewall/arno-iptables-firewall/ChangeLog11
-rw-r--r--net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.0.1d-r1.ebuild88
-rw-r--r--net-firewall/arno-iptables-firewall/files/arno-iptables-firewall27
3 files changed, 124 insertions, 2 deletions
diff --git a/net-firewall/arno-iptables-firewall/ChangeLog b/net-firewall/arno-iptables-firewall/ChangeLog
index 0a4f98db5ff2..659f3169d74c 100644
--- a/net-firewall/arno-iptables-firewall/ChangeLog
+++ b/net-firewall/arno-iptables-firewall/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-firewall/arno-iptables-firewall
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/arno-iptables-firewall/ChangeLog,v 1.6 2012/12/17 19:45:41 hwoarang Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/arno-iptables-firewall/ChangeLog,v 1.7 2013/05/18 09:09:18 hwoarang Exp $
+
+*arno-iptables-firewall-2.0.1d-r1 (18 May 2013)
+
+ 18 May 2013; Markos Chandras <hwoarang@gentoo.org>
+ +arno-iptables-firewall-2.0.1d-r1.ebuild, +files/arno-iptables-firewall:
+ Cleanup, EAPI5, initscript and other fixes thanks to Ferenc Erki
+ <erkiferenc@gmail.com>. Bug #465114
*arno-iptables-firewall-2.0.1d (17 Dec 2012)
diff --git a/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.0.1d-r1.ebuild b/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.0.1d-r1.ebuild
new file mode 100644
index 000000000000..99a23af84a21
--- /dev/null
+++ b/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.0.1d-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.0.1d-r1.ebuild,v 1.1 2013/05/18 09:09:18 hwoarang Exp $
+
+EAPI=5
+
+inherit readme.gentoo
+
+DESCRIPTION="Arno's iptables firewall script"
+HOMEPAGE="http://rocky.eld.leidenuniv.nl"
+SRC_URI="http://rocky.eld.leidenuniv.nl/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+plugins"
+
+# sys-apps/coreutils dependency wrt
+# https://bugs.gentoo.org/show_bug.cgi?id=448716
+
+DEPEND=""
+RDEPEND="net-firewall/iptables
+ || ( <sys-apps/coreutils-8.20 >sys-apps/coreutils-8.20-r1 )
+ sys-apps/iproute2
+ plugins? ( net-dns/bind-tools )"
+
+S="${WORKDIR}/${PN}_${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
+
+If you want to start this script at boot, run:
+
+rc-update add ${PN} default"
+
+src_prepare() {
+ sed -i -e 's:/usr/local/share/:/usr/libexec/:' \
+ etc/"${PN}"/firewall.conf || die "Sed failed!"
+}
+
+src_install() {
+
+ insinto /etc/"${PN}"
+ doins etc/"${PN}"/firewall.conf
+ doins etc/"${PN}"/custom-rules
+
+ doinitd "${FILESDIR}/${PN}"
+
+ 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
+
+ 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
+}
diff --git a/net-firewall/arno-iptables-firewall/files/arno-iptables-firewall b/net-firewall/arno-iptables-firewall/files/arno-iptables-firewall
new file mode 100644
index 000000000000..7a56dfb24654
--- /dev/null
+++ b/net-firewall/arno-iptables-firewall/files/arno-iptables-firewall
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+command=/usr/sbin/arno-iptables-firewall
+description="Single- & multi-homed firewall script with DSL/ADSL support"
+
+extra_started_commands="reload"
+description_reload="Reload blocked hosts (blackhole) file"
+
+depend() {
+ before net
+ use logger
+}
+
+start() {
+ ${command} start
+}
+
+stop() {
+ ${command} stop
+}
+
+restart() {
+ ${command} restart
+}
+
+reload() {
+ ${command} force-reload
+}