commit: 574a37fafc49e0165c952af204821f8d25967f88 Author: Austin English <wizardedit <AT> gentoo <DOT> org> AuthorDate: Thu Apr 28 23:19:50 2016 +0000 Commit: Austin English <wizardedit <AT> gentoo <DOT> org> CommitDate: Thu Apr 28 23:36:35 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=574a37fa
net-firewall/ipkungfu: use #!/sbin/openrc-run instead of #!/sbin/runscript Gentoo-Bug: https://bugs.gentoo.org/573846 Package-Manager: portage-2.2.26 net-firewall/ipkungfu/files/ipkungfu.init | 4 +- net-firewall/ipkungfu/ipkungfu-0.5.2-r2.ebuild | 58 ++++++++++++++++++++++++++ net-firewall/ipkungfu/ipkungfu-0.6.1-r1.ebuild | 47 +++++++++++++++++++++ 3 files changed, 107 insertions(+), 2 deletions(-) diff --git a/net-firewall/ipkungfu/files/ipkungfu.init b/net-firewall/ipkungfu/files/ipkungfu.init index 29f5442..f5c971f 100644 --- a/net-firewall/ipkungfu/files/ipkungfu.init +++ b/net-firewall/ipkungfu/files/ipkungfu.init @@ -1,5 +1,5 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ diff --git a/net-firewall/ipkungfu/ipkungfu-0.5.2-r2.ebuild b/net-firewall/ipkungfu/ipkungfu-0.5.2-r2.ebuild new file mode 100644 index 0000000..804a529 --- /dev/null +++ b/net-firewall/ipkungfu/ipkungfu-0.5.2-r2.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils + +DESCRIPTION="A nice iptables firewall script" +HOMEPAGE="http://www.linuxkungfu.org/" +SRC_URI="http://www.linuxkungfu.org/ipkungfu/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc x86" +IUSE="" + +DEPEND="net-firewall/iptables" +RDEPEND="${DEPEND} + virtual/logger" + +src_unpack() { + unpack ${A} + + # Patch ipkungfu to load the right module for ip_nat_ftp + # Fixes bug #42443. Thanks to George L. Emigh <[email protected]> + cd "${WORKDIR}"/${P} && epatch "${FILESDIR}"/nat_ftp.patch + + # man page comes bzip2'd, so bunzip2 it. + cd "${WORKDIR}"/${P}/files + bunzip2 ipkungfu.8.bz2 +} + +src_install() { + + # Package comes with a hard coded shell script, so here we + # replicate what they did, but so it's compatible with portage. + + # Install shell script executable + dosbin ipkungfu + + # Install Gentoo init script + newinitd "${FILESDIR}"/ipkungfu.init ipkungfu + + # Install config files into /etc + dodir /etc/ipkungfu + insinto /etc/ipkungfu + doins files/*.conf + + # Install man page + doman files/ipkungfu.8 + + # Install documentation + dodoc COPYRIGHT Changelog FAQ INSTALL README gpl.txt +} + +pkg_postinst() { + einfo "Be sure to edit the config files" + einfo "in /etc/ipkungfu before running" +} diff --git a/net-firewall/ipkungfu/ipkungfu-0.6.1-r1.ebuild b/net-firewall/ipkungfu/ipkungfu-0.6.1-r1.ebuild new file mode 100644 index 0000000..1901484 --- /dev/null +++ b/net-firewall/ipkungfu/ipkungfu-0.6.1-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +DESCRIPTION="A nice iptables firewall script" +HOMEPAGE="http://www.linuxkungfu.org/" +SRC_URI="http://www.linuxkungfu.org/ipkungfu/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="" + +DEPEND="net-firewall/iptables" +RDEPEND="${DEPEND} + virtual/logger" + +src_prepare() { + eapply "${FILESDIR}/ipkungfu_noiseless.patch" + eapply_user +} + +src_install() { + default + + # Install configuration files + emake DESTDIR="${D}" install-config + + # Install Gentoo init script + newinitd "${FILESDIR}"/ipkungfu.init ipkungfu +} + +pkg_postinst() { + # Remove the cache dir so ipkungfu won't fail when running for + # the first time, in case 0.6.0 was installed before. + rm -rf /etc/ipkungfu/cache + + einfo "Be sure, before running ipkungfu, to edit the config files in:" + einfo "/etc/ipkungfu/" + einfo + einfo "Also, be sure to run ipkungfu prior to rebooting," + einfo "especially if you you're updating from <0.6.0 to >=0.6.0." + einfo "There are some significant configuration changes on this" + einfo "release covered by the ipkungfu script." +}
