Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipkungfu/, net-firewall/ipkungfu/files/
Date: Thu, 28 Apr 2016 23:44:56
Message-Id: 1461886595.574a37fafc49e0165c952af204821f8d25967f88.wizardedit@gentoo
1 commit: 574a37fafc49e0165c952af204821f8d25967f88
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 28 23:19:50 2016 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 28 23:36:35 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=574a37fa
7
8 net-firewall/ipkungfu: use #!/sbin/openrc-run instead of #!/sbin/runscript
9
10 Gentoo-Bug: https://bugs.gentoo.org/573846
11
12 Package-Manager: portage-2.2.26
13
14 net-firewall/ipkungfu/files/ipkungfu.init | 4 +-
15 net-firewall/ipkungfu/ipkungfu-0.5.2-r2.ebuild | 58 ++++++++++++++++++++++++++
16 net-firewall/ipkungfu/ipkungfu-0.6.1-r1.ebuild | 47 +++++++++++++++++++++
17 3 files changed, 107 insertions(+), 2 deletions(-)
18
19 diff --git a/net-firewall/ipkungfu/files/ipkungfu.init b/net-firewall/ipkungfu/files/ipkungfu.init
20 index 29f5442..f5c971f 100644
21 --- a/net-firewall/ipkungfu/files/ipkungfu.init
22 +++ b/net-firewall/ipkungfu/files/ipkungfu.init
23 @@ -1,5 +1,5 @@
24 -#!/sbin/runscript
25 -# Copyright 1999-2004 Gentoo Foundation
26 +#!/sbin/openrc-run
27 +# Copyright 1999-2016 Gentoo Foundation
28 # Distributed under the terms of the GNU General Public License v2
29 # $Id$
30
31
32 diff --git a/net-firewall/ipkungfu/ipkungfu-0.5.2-r2.ebuild b/net-firewall/ipkungfu/ipkungfu-0.5.2-r2.ebuild
33 new file mode 100644
34 index 0000000..804a529
35 --- /dev/null
36 +++ b/net-firewall/ipkungfu/ipkungfu-0.5.2-r2.ebuild
37 @@ -0,0 +1,58 @@
38 +# Copyright 1999-2016 Gentoo Foundation
39 +# Distributed under the terms of the GNU General Public License v2
40 +# $Id$
41 +
42 +inherit eutils
43 +
44 +DESCRIPTION="A nice iptables firewall script"
45 +HOMEPAGE="http://www.linuxkungfu.org/"
46 +SRC_URI="http://www.linuxkungfu.org/ipkungfu/${P}.tgz"
47 +
48 +LICENSE="GPL-2"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~ppc ~sparc x86"
51 +IUSE=""
52 +
53 +DEPEND="net-firewall/iptables"
54 +RDEPEND="${DEPEND}
55 + virtual/logger"
56 +
57 +src_unpack() {
58 + unpack ${A}
59 +
60 + # Patch ipkungfu to load the right module for ip_nat_ftp
61 + # Fixes bug #42443. Thanks to George L. Emigh <george@××××××××××××.com>
62 + cd "${WORKDIR}"/${P} && epatch "${FILESDIR}"/nat_ftp.patch
63 +
64 + # man page comes bzip2'd, so bunzip2 it.
65 + cd "${WORKDIR}"/${P}/files
66 + bunzip2 ipkungfu.8.bz2
67 +}
68 +
69 +src_install() {
70 +
71 + # Package comes with a hard coded shell script, so here we
72 + # replicate what they did, but so it's compatible with portage.
73 +
74 + # Install shell script executable
75 + dosbin ipkungfu
76 +
77 + # Install Gentoo init script
78 + newinitd "${FILESDIR}"/ipkungfu.init ipkungfu
79 +
80 + # Install config files into /etc
81 + dodir /etc/ipkungfu
82 + insinto /etc/ipkungfu
83 + doins files/*.conf
84 +
85 + # Install man page
86 + doman files/ipkungfu.8
87 +
88 + # Install documentation
89 + dodoc COPYRIGHT Changelog FAQ INSTALL README gpl.txt
90 +}
91 +
92 +pkg_postinst() {
93 + einfo "Be sure to edit the config files"
94 + einfo "in /etc/ipkungfu before running"
95 +}
96
97 diff --git a/net-firewall/ipkungfu/ipkungfu-0.6.1-r1.ebuild b/net-firewall/ipkungfu/ipkungfu-0.6.1-r1.ebuild
98 new file mode 100644
99 index 0000000..1901484
100 --- /dev/null
101 +++ b/net-firewall/ipkungfu/ipkungfu-0.6.1-r1.ebuild
102 @@ -0,0 +1,47 @@
103 +# Copyright 1999-2016 Gentoo Foundation
104 +# Distributed under the terms of the GNU General Public License v2
105 +# $Id$
106 +
107 +EAPI=6
108 +
109 +DESCRIPTION="A nice iptables firewall script"
110 +HOMEPAGE="http://www.linuxkungfu.org/"
111 +SRC_URI="http://www.linuxkungfu.org/ipkungfu/${P}.tar.bz2"
112 +
113 +LICENSE="GPL-2"
114 +SLOT="0"
115 +KEYWORDS="~amd64 ~ppc ~sparc ~x86"
116 +IUSE=""
117 +
118 +DEPEND="net-firewall/iptables"
119 +RDEPEND="${DEPEND}
120 + virtual/logger"
121 +
122 +src_prepare() {
123 + eapply "${FILESDIR}/ipkungfu_noiseless.patch"
124 + eapply_user
125 +}
126 +
127 +src_install() {
128 + default
129 +
130 + # Install configuration files
131 + emake DESTDIR="${D}" install-config
132 +
133 + # Install Gentoo init script
134 + newinitd "${FILESDIR}"/ipkungfu.init ipkungfu
135 +}
136 +
137 +pkg_postinst() {
138 + # Remove the cache dir so ipkungfu won't fail when running for
139 + # the first time, in case 0.6.0 was installed before.
140 + rm -rf /etc/ipkungfu/cache
141 +
142 + einfo "Be sure, before running ipkungfu, to edit the config files in:"
143 + einfo "/etc/ipkungfu/"
144 + einfo
145 + einfo "Also, be sure to run ipkungfu prior to rebooting,"
146 + einfo "especially if you you're updating from <0.6.0 to >=0.6.0."
147 + einfo "There are some significant configuration changes on this"
148 + einfo "release covered by the ipkungfu script."
149 +}