Gentoo Archives: gentoo-commits

From: "Peter Volkov (pva)" <pva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-firewall/xtables-addons: ChangeLog xtables-addons-1.26.ebuild
Date: Sat, 08 May 2010 06:52:52
Message-Id: 20100508065248.D564E2950A@corvid.gentoo.org
1 pva 10/05/08 06:52:48
2
3 Modified: ChangeLog
4 Added: xtables-addons-1.26.ebuild
5 Log:
6 Version bump.
7 (Portage version: 2.1.8.3/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.2 net-firewall/xtables-addons/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/xtables-addons/ChangeLog?rev=1.2&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/xtables-addons/ChangeLog?rev=1.2&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/xtables-addons/ChangeLog?r1=1.1&r2=1.2
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-firewall/xtables-addons/ChangeLog,v
19 retrieving revision 1.1
20 retrieving revision 1.2
21 diff -u -r1.1 -r1.2
22 --- ChangeLog 29 Apr 2010 09:31:02 -0000 1.1
23 +++ ChangeLog 8 May 2010 06:52:48 -0000 1.2
24 @@ -1,6 +1,11 @@
25 # ChangeLog for net-firewall/xtables-addons
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/xtables-addons/ChangeLog,v 1.1 2010/04/29 09:31:02 pva Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/xtables-addons/ChangeLog,v 1.2 2010/05/08 06:52:48 pva Exp $
29 +
30 +*xtables-addons-1.26 (08 May 2010)
31 +
32 + 08 May 2010; Peter Volkov <pva@g.o> +xtables-addons-1.26.ebuild:
33 + Version bump.
34
35 *xtables-addons-1.25 (29 Apr 2010)
36
37
38
39
40 1.1 net-firewall/xtables-addons/xtables-addons-1.26.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/xtables-addons/xtables-addons-1.26.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/xtables-addons/xtables-addons-1.26.ebuild?rev=1.1&content-type=text/plain
44
45 Index: xtables-addons-1.26.ebuild
46 ===================================================================
47 # Copyright 1999-2010 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/net-firewall/xtables-addons/xtables-addons-1.26.ebuild,v 1.1 2010/05/08 06:52:48 pva Exp $
50
51 EAPI="2"
52
53 inherit eutils linux-mod
54
55 DESCRIPTION="extensions not yet accepted in the main kernel/iptables (patch-o-matic(-ng) successor)"
56 HOMEPAGE="http://xtables-addons.sourceforge.net/"
57 SRC_URI="mirror://sourceforge/xtables-addons/${P}.tar.bz2"
58
59 LICENSE="GPL-2"
60 SLOT="0"
61 KEYWORDS="~amd64 ~x86"
62 IUSE="modules"
63
64 MODULES="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark echo dhcpmac delude chaos account"
65
66 for mod in ${MODULES}; do
67 IUSE="${IUSE} xtables_addons_${mod}"
68 done
69
70 RDEPEND="virtual/modutils
71 >=net-firewall/iptables-1.4.3
72 >virtual/linux-sources-2.6.22
73 xtables_addons_ipset? ( !net-firewall/ipset )"
74
75 DEPEND="${RDEPEND}"
76
77 pkg_setup() {
78 if use modules; then
79 get_version
80 check_modules_supported
81 # CONFIG_IP_NF_CONNTRACK{,_MARK} doesn't exist in >virtual/linux-sources-2.6.22
82 CONFIG_CHECK="NF_CONNTRACK NF_CONNTRACK_MARK"
83 linux-mod_pkg_setup
84
85 if ! linux_chkconfig_present IPV6; then
86 SKIP_IPV6_MODULES="ip6table_rawpost"
87 fi
88 fi
89 }
90
91 # Helper for maintainer: cheks if all possible MODULES are listed.
92 XA_qa_check() {
93 local all_modules
94 all_modules=$(sed -n '/^build_/{s/build_\(.*\)=.*/\L\1/;G;s/\n/ /;s/ $//;h}; ${x;p}' "${S}/mconfig")
95 if [[ ${all_modules} != ${MODULES} ]]; then
96 ewarn "QA: Modules in mconfig differ from \$MODULES in ebuild."
97 ewarn "Please, update MODULES in ebuild."
98 ewarn "'${all_modules}'"
99 fi
100 }
101
102 # Is there any use flag set?
103 XA_has_something_to_build() {
104 local mod
105 for mod in ${MODULES}; do
106 use xtables_addons_${mod} && return
107 done
108
109 eerror "All modules are disabled. What do you want me to build?"
110 eerror "Please, set XTABLES_ADDONS to any combination of"
111 eerror "${MODULES}"
112 die "All modules are disabled."
113 }
114
115 # Parse Kbuid files and generates list of sources
116 XA_get_module_name() {
117 [[ $# != 1 ]] && die "XA_get_sources_for_mod: needs exactly one argument."
118 local mod objdir build_mod sources_list
119 mod=${1}
120 objdir=${S}/extensions
121 build_mod=$(sed -n "s/\(build_${mod}\)=.*/\1/Ip" "${S}/mconfig")
122 sources_list=$(sed -n "/^obj-[$][{]${build_mod}[}]/\
123 {s:obj-[^+]\+ [+]=[[:space:]]*::;s:[.]o::g;p}" \
124 "${objdir}/Kbuild")
125
126 if [[ -d ${S}/extensions/${sources_list} ]]; then
127 objdir=${S}/extensions/${sources_list}
128 sources_list=$(sed -n "/^obj-m/\
129 {s:obj-[^+]\+ [+]=[[:space:]]*::;s:[.]o::g;p}" \
130 "${objdir}/Kbuild")
131 fi
132 for mod_src in ${sources_list}; do
133 has ${mod_src} ${SKIP_IPV6_MODULES} || \
134 echo " ${mod_src}(xtables_addons:${S}/extensions:${objdir})"
135 done
136 }
137
138 src_prepare() {
139 XA_qa_check
140 XA_has_something_to_build
141
142 local mod module_name
143 if use modules; then
144 MODULE_NAMES="compat_xtables(xtables_addons:${S}/extensions:)"
145 fi
146 for mod in ${MODULES}; do
147 if use xtables_addons_${mod}; then
148 sed "s/\(build_${mod}=\).*/\1m/I" -i mconfig || die
149 if use modules; then
150 for module_name in $(XA_get_module_name ${mod}); do
151 MODULE_NAMES+=" ${module_name}"
152 done
153 fi
154 else
155 sed "s/\(build_${mod}=\).*/\1n/I" -i mconfig || die
156 fi
157 done
158
159 sed -e 's/depmod -a/true/' -i Makefile.{in,am} || die
160 sed -e '/^all-local:/{s: modules::}' \
161 -e '/^install-exec-local:/{s: modules_install::}' \
162 -i extensions/Makefile.{in,am} || die
163 }
164
165 src_configure() {
166 unset ARCH # .. or it'll look for /arch/amd64/Makefile in linux sources
167 export KBUILD_EXTMOD=${S} # Avoid build in /usr/src/linux #250407
168 econf --prefix=/ \
169 --libexecdir=/lib/ \
170 --with-kbuild="${KV_DIR}"
171 }
172
173 src_compile() {
174 emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" || die
175 use modules && BUILD_TARGETS="modules" linux-mod_src_compile
176 }
177
178 src_install() {
179 emake DESTDIR="${D}" install || die
180 use modules && linux-mod_src_install
181 dodoc README doc/* || die
182 find "${D}" -type f -name '*.la' -exec rm -rf '{}' '+'
183 }