blob: a57cac34eb80be7a81d23f39d0635de108b5524e [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "Tools for managing kernel packet filtering capabilities"
2DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
3filtering code in Linux."
4HOMEPAGE = "http://www.netfilter.org/"
5BUGTRACKER = "http://bugzilla.netfilter.org/"
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
8 file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc"
9
Brad Bishop316dfdd2018-06-25 12:45:53 -040010SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
11 file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
12 file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
13"
14
15SRC_URI[md5sum] = "7d2b7847e4aa8832a18437b8a4c1873d"
16SRC_URI[sha256sum] = "55d02dfa46263343a401f297d44190f2a3e5113c8933946f094ed40237053733"
17
18inherit autotools pkgconfig
19
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR}"
21
Brad Bishop316dfdd2018-06-25 12:45:53 -040022PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
23
24PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
25
26# libnfnetlink recipe is in meta-networking layer
27PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
28
29# libnftnl recipe is in meta-networking layer(previously known as libnftables)
30PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl"
31
32do_configure_prepend() {
33 # Remove some libtool m4 files
34 # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
35 rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
36}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080037
38PACKAGES += "${PN}-modules"
39PACKAGES_DYNAMIC += "^${PN}-module-.*"
40
41python populate_packages_prepend() {
Brad Bishop19323692019-04-05 15:28:33 -040042 modules = do_split_packages(d, '${libdir}/xtables', r'lib(.*)\.so$', '${PN}-module-%s', '${PN} module %s', extra_depends='')
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043 if modules:
44 metapkg = d.getVar('PN') + '-modules'
45 d.appendVar('RDEPENDS_' + metapkg, ' ' + ' '.join(modules))
46}
47
48FILES_${PN} += "${datadir}/xtables"
49
50ALLOW_EMPTY_${PN}-modules = "1"
51
52RDEPENDS_${PN} = "${PN}-module-xt-standard"
53RRECOMMENDS_${PN} = " \
54 ${PN}-modules \
55 kernel-module-x-tables \
56 kernel-module-ip-tables \
57 kernel-module-iptable-filter \
58 kernel-module-iptable-nat \
59 kernel-module-nf-defrag-ipv4 \
60 kernel-module-nf-conntrack \
61 kernel-module-nf-conntrack-ipv4 \
62 kernel-module-nf-nat \
63 kernel-module-ipt-masquerade \
64"