Gentoo Archives: gentoo-commits

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