1 |
blueness 15/07/06 12:03:08 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: xtables-addons-2.7.ebuild |
5 |
Log: |
6 |
Version bump. |
7 |
|
8 |
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA) |
9 |
|
10 |
Revision Changes Path |
11 |
1.49 net-firewall/xtables-addons/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/xtables-addons/ChangeLog?rev=1.49&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/xtables-addons/ChangeLog?rev=1.49&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/xtables-addons/ChangeLog?r1=1.48&r2=1.49 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-firewall/xtables-addons/ChangeLog,v |
20 |
retrieving revision 1.48 |
21 |
retrieving revision 1.49 |
22 |
diff -u -r1.48 -r1.49 |
23 |
--- ChangeLog 30 Sep 2014 21:35:28 -0000 1.48 |
24 |
+++ ChangeLog 6 Jul 2015 12:03:08 -0000 1.49 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for net-firewall/xtables-addons |
27 |
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/xtables-addons/ChangeLog,v 1.48 2014/09/30 21:35:28 blueness Exp $ |
29 |
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/xtables-addons/ChangeLog,v 1.49 2015/07/06 12:03:08 blueness Exp $ |
31 |
+ |
32 |
+*xtables-addons-2.7 (06 Jul 2015) |
33 |
+ |
34 |
+ 06 Jul 2015; Anthony G. Basile <blueness@g.o> |
35 |
+ +xtables-addons-2.7.ebuild: |
36 |
+ Version bump. |
37 |
|
38 |
*xtables-addons-2.6 (30 Sep 2014) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 net-firewall/xtables-addons/xtables-addons-2.7.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/xtables-addons/xtables-addons-2.7.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/xtables-addons/xtables-addons-2.7.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: xtables-addons-2.7.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2015 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/net-firewall/xtables-addons/xtables-addons-2.7.ebuild,v 1.1 2015/07/06 12:03:08 blueness Exp $ |
53 |
|
54 |
EAPI="5" |
55 |
|
56 |
inherit eutils linux-info linux-mod multilib |
57 |
|
58 |
DESCRIPTION="extensions not yet accepted in the main kernel/iptables (patch-o-matic(-ng) successor)" |
59 |
HOMEPAGE="http://xtables-addons.sourceforge.net/" |
60 |
SRC_URI="mirror://sourceforge/xtables-addons/${P}.tar.xz" |
61 |
|
62 |
LICENSE="GPL-2" |
63 |
SLOT="0" |
64 |
KEYWORDS="~amd64 ~x86" |
65 |
IUSE="modules" |
66 |
|
67 |
MODULES="quota2 psd pknock lscan length2 ipv4options ipp2p iface gradm geoip fuzzy condition tarpit sysrq logmark ipmark echo dnetmap dhcpmac delude chaos account" |
68 |
|
69 |
for mod in ${MODULES}; do |
70 |
IUSE="${IUSE} xtables_addons_${mod}" |
71 |
done |
72 |
|
73 |
DEPEND=">=net-firewall/iptables-1.4.5" |
74 |
|
75 |
RDEPEND="${DEPEND} |
76 |
xtables_addons_geoip? ( |
77 |
app-arch/unzip |
78 |
dev-perl/Text-CSV_XS |
79 |
virtual/perl-Getopt-Long |
80 |
) |
81 |
" |
82 |
|
83 |
DEPEND="${DEPEND} |
84 |
virtual/linux-sources" |
85 |
|
86 |
SKIP_MODULES="" |
87 |
|
88 |
# XA_kernel_check tee "2 6 32" |
89 |
XA_check4internal_module() { |
90 |
local mod=${1} |
91 |
local version=${2} |
92 |
local kconfigname=${3} |
93 |
|
94 |
if use xtables_addons_${mod} && kernel_is -gt ${version}; then |
95 |
ewarn "${kconfigname} should be provided by the kernel. Skipping its build..." |
96 |
if ! linux_chkconfig_present ${kconfigname}; then |
97 |
ewarn "Please enable ${kconfigname} target in your kernel |
98 |
configuration or disable checksum module in ${PN}." |
99 |
fi |
100 |
# SKIP_MODULES in case we need to disable building of everything |
101 |
# like having this USE disabled |
102 |
SKIP_MODULES+=" ${mod}" |
103 |
fi |
104 |
} |
105 |
|
106 |
pkg_setup() { |
107 |
if use modules; then |
108 |
get_version |
109 |
check_modules_supported |
110 |
CONFIG_CHECK="NF_CONNTRACK NF_CONNTRACK_MARK ~CONNECTOR" |
111 |
ERROR_CONNECTOR="Please, enable CONFIG_CONNECTOR if you wish to receive userspace notifications from pknock through netlink/connector" |
112 |
linux-mod_pkg_setup |
113 |
|
114 |
if ! linux_chkconfig_present IPV6; then |
115 |
SKIP_IPV6_MODULES="ip6table_rawpost" |
116 |
ewarn "No IPV6 support in kernel. Disabling: ${SKIP_IPV6_MODULES}" |
117 |
fi |
118 |
kernel_is -lt 3 7 && die "${P} requires kernel version >= 3.7, if you have older kernel please use 1.x version instead" |
119 |
fi |
120 |
} |
121 |
|
122 |
# Helper for maintainer: cheks if all possible MODULES are listed. |
123 |
XA_qa_check() { |
124 |
local all_modules |
125 |
all_modules=$(sed -n '/^build_/{s/build_\(.*\)=.*/\L\1/;G;s/\n/ /;s/ $//;h}; ${x;p}' "${S}/mconfig") |
126 |
if [[ ${all_modules} != ${MODULES} ]]; then |
127 |
ewarn "QA: Modules in mconfig differ from \$MODULES in ebuild." |
128 |
ewarn "Please, update MODULES in ebuild." |
129 |
ewarn "'${all_modules}'" |
130 |
fi |
131 |
} |
132 |
|
133 |
# Is there any use flag set? |
134 |
XA_has_something_to_build() { |
135 |
local mod |
136 |
for mod in ${MODULES}; do |
137 |
use xtables_addons_${mod} && return |
138 |
done |
139 |
|
140 |
eerror "All modules are disabled. What do you want me to build?" |
141 |
eerror "Please, set XTABLES_ADDONS to any combination of" |
142 |
eerror "${MODULES}" |
143 |
die "All modules are disabled." |
144 |
} |
145 |
|
146 |
# Parse Kbuid files and generates list of sources |
147 |
XA_get_module_name() { |
148 |
[[ $# != 1 ]] && die "XA_get_sources_for_mod: needs exactly one argument." |
149 |
local mod objdir build_mod sources_list |
150 |
mod=${1} |
151 |
objdir=${S}/extensions |
152 |
# Take modules name from mconfig |
153 |
build_mod=$(sed -n "s/\(build_${mod}\)=.*/\1/Ip" "${S}/mconfig") |
154 |
# strip .o, = and everything before = and print |
155 |
sources_list=$(sed -n "/^obj-[$][{]${build_mod}[}]/\ |
156 |
{s:obj-[^+]\+ [+]=[[:space:]]*::;s:[.]o::g;p}" \ |
157 |
"${objdir}/Kbuild") |
158 |
|
159 |
if [[ -d ${S}/extensions/${sources_list} ]]; then |
160 |
objdir=${S}/extensions/${sources_list} |
161 |
sources_list=$(sed -n "/^obj-m/\ |
162 |
{s:obj-[^+]\+ [+]=[[:space:]]*::;s:[.]o::g;p}" \ |
163 |
"${objdir}/Kbuild") |
164 |
fi |
165 |
for mod_src in ${sources_list}; do |
166 |
has ${mod_src} ${SKIP_IPV6_MODULES} || \ |
167 |
echo " ${mod_src}(xtables_addons:${S}/extensions:${objdir})" |
168 |
done |
169 |
} |
170 |
|
171 |
src_prepare() { |
172 |
XA_qa_check |
173 |
XA_has_something_to_build |
174 |
|
175 |
local mod module_name |
176 |
if use modules; then |
177 |
MODULE_NAMES="compat_xtables(xtables_addons:${S}/extensions:)" |
178 |
fi |
179 |
for mod in ${MODULES}; do |
180 |
if ! has ${mod} ${SKIP_MODULES} && use xtables_addons_${mod}; then |
181 |
sed "s/\(build_${mod}=\).*/\1m/I" -i mconfig || die |
182 |
if use modules; then |
183 |
for module_name in $(XA_get_module_name ${mod}); do |
184 |
MODULE_NAMES+=" ${module_name}" |
185 |
done |
186 |
fi |
187 |
else |
188 |
sed "s/\(build_${mod}=\).*/\1n/I" -i mconfig || die |
189 |
fi |
190 |
done |
191 |
einfo "${MODULE_NAMES}" # for debugging |
192 |
|
193 |
sed -e 's/depmod -a/true/' -i Makefile.in || die |
194 |
sed -e '/^all-local:/{s: modules::}' \ |
195 |
-e '/^install-exec-local:/{s: modules_install::}' \ |
196 |
-i extensions/Makefile.in || die |
197 |
|
198 |
use xtables_addons_geoip || sed -e '/^SUBDIRS/{s/geoip//}' -i Makefile.in |
199 |
} |
200 |
|
201 |
src_configure() { |
202 |
set_arch_to_kernel # .. or it'll look for /arch/amd64/Makefile |
203 |
econf --prefix="${EPREFIX}/" \ |
204 |
--libexecdir="${EPREFIX}/$(get_libdir)/" \ |
205 |
--with-kbuild="${KV_DIR}" |
206 |
} |
207 |
|
208 |
src_compile() { |
209 |
emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" V=1 |
210 |
use modules && BUILD_PARAMS="V=1" BUILD_TARGETS="modules" linux-mod_src_compile |
211 |
} |
212 |
|
213 |
src_install() { |
214 |
emake DESTDIR="${D}" install |
215 |
use modules && linux-mod_src_install |
216 |
dodoc -r README doc/* |
217 |
find "${ED}" -type f -name '*.la' -exec rm -rf '{}' '+' |
218 |
} |