blob: 43c2fea69ff24195458298182263e4ac7505217f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
################################################################################
#
# iptables
#
################################################################################
IPTABLES_VERSION = 1.4.21
IPTABLES_SOURCE = iptables-$(IPTABLES_VERSION).tar.bz2
IPTABLES_SITE = http://ftp.netfilter.org/pub/iptables
IPTABLES_INSTALL_STAGING = YES
IPTABLES_DEPENDENCIES = host-pkgconf \
$(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack)
IPTABLES_LICENSE = GPLv2
IPTABLES_LICENSE_FILES = COPYING
IPTABLES_CONF_OPT = --libexecdir=/usr/lib --with-kernel=$(STAGING_DIR)/usr
# Because of iptables-01-fix-static-link.patch
IPTABLES_AUTORECONF = YES
# For connlabel match
ifeq ($(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),y)
IPTABLES_DEPENDENCIES += libnetfilter_conntrack
endif
# For nfnl_osf
ifeq ($(BR2_PACKAGE_LIBNFNETLINK),y)
IPTABLES_DEPENDENCIES += libnfnetlink
endif
define IPTABLES_TARGET_SYMLINK_CREATE
ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables
ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables-save
ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables-restore
endef
define IPTABLES_TARGET_IPV6_SYMLINK_CREATE
ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables
ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables-save
ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables-restore
endef
define IPTABLES_TARGET_IPV6_REMOVE
rm -f $(TARGET_DIR)/usr/lib/libip6tc.*
endef
IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_SYMLINK_CREATE
ifeq ($(BR2_INET_IPV6),y)
IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_IPV6_SYMLINK_CREATE
else
IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_IPV6_REMOVE
endif
$(eval $(autotools-package))
|