open-plc-utils: new package
[buildroot-gz.git] / package / iptables / iptables.mk
blob38faa6899520c180042f8d880155a72e711ab5f4
1 ################################################################################
3 # iptables
5 ################################################################################
7 IPTABLES_VERSION = 1.4.21
8 IPTABLES_SOURCE = iptables-$(IPTABLES_VERSION).tar.bz2
9 IPTABLES_SITE = http://ftp.netfilter.org/pub/iptables
10 IPTABLES_INSTALL_STAGING = YES
11 IPTABLES_DEPENDENCIES = host-pkgconf \
12 $(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack)
13 IPTABLES_LICENSE = GPLv2
14 IPTABLES_LICENSE_FILES = COPYING
15 # Building static causes ugly warnings on some plugins
16 IPTABLES_CONF_OPTS = --libexecdir=/usr/lib --with-kernel=$(STAGING_DIR)/usr \
17 $(if $(BR2_STATIC_LIBS),,--disable-static)
18 # Because of iptables-01-fix-static-link.patch
19 IPTABLES_AUTORECONF = YES
21 # For connlabel match
22 ifeq ($(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),y)
23 IPTABLES_DEPENDENCIES += libnetfilter_conntrack
24 endif
26 # For nfnl_osf
27 ifeq ($(BR2_PACKAGE_LIBNFNETLINK),y)
28 IPTABLES_DEPENDENCIES += libnfnetlink
29 endif
31 define IPTABLES_TARGET_SYMLINK_CREATE
32 ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables
33 ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables-save
34 ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables-restore
35 endef
37 define IPTABLES_TARGET_IPV6_SYMLINK_CREATE
38 ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables
39 ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables-save
40 ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables-restore
41 endef
43 define IPTABLES_TARGET_IPV6_REMOVE
44 rm -f $(TARGET_DIR)/usr/lib/libip6tc.*
45 endef
47 IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_SYMLINK_CREATE
49 ifeq ($(BR2_INET_IPV6),y)
50 IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_IPV6_SYMLINK_CREATE
51 else
52 IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_IPV6_REMOVE
53 endif
55 $(eval $(autotools-package))